зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1478560 - Fix the compiling error of the struct nsXPTCVariant. r=glandium
This commit is contained in:
Родитель
9aff8f126b
Коммит
ffa75bd086
|
@ -15,7 +15,7 @@ invoke_count_words(uint32_t paramCount, nsXPTCVariant* s)
|
|||
uint32_t overflow = 0, gpr = 1 /*this*/, fpr = 0;
|
||||
for(uint32_t i = 0; i < paramCount; i++, s++)
|
||||
{
|
||||
if(s->IsPtrData())
|
||||
if(s->IsIndirect())
|
||||
{
|
||||
if (gpr < 5) gpr++; else overflow++;
|
||||
continue;
|
||||
|
@ -63,12 +63,12 @@ invoke_copy_to_stack(uint32_t paramCount, nsXPTCVariant* s, uint64_t* d_ov, uint
|
|||
|
||||
for(uint32_t i = 0; i < paramCount; i++, s++)
|
||||
{
|
||||
if(s->IsPtrData())
|
||||
if(s->IsIndirect())
|
||||
{
|
||||
if (gpr < 5)
|
||||
*((void**)d_gpr) = s->ptr, d_gpr++, gpr++;
|
||||
*((void**)d_gpr) = (void *) &s->val, d_gpr++, gpr++;
|
||||
else
|
||||
*((void**)d_ov ) = s->ptr, d_ov++;
|
||||
*((void**)d_ov ) = (void *) &s->val, d_ov++;
|
||||
continue;
|
||||
}
|
||||
switch(s->type)
|
||||
|
|
|
@ -21,7 +21,7 @@ invoke_count_words(uint32_t paramCount, nsXPTCVariant* s)
|
|||
uint32_t result = 1;
|
||||
for (uint32_t i = 0; i < paramCount; i++, result++, s++)
|
||||
{
|
||||
if (s->IsPtrData())
|
||||
if (s->IsIndirect())
|
||||
continue;
|
||||
|
||||
switch(s->type)
|
||||
|
@ -50,9 +50,9 @@ invoke_copy_to_stack(uint32_t* d, uint32_t paramCount,
|
|||
|
||||
for (uint32_t i = 0; i < paramCount; i++, d++, s++)
|
||||
{
|
||||
if (s->IsPtrData())
|
||||
if (s->IsIndirect())
|
||||
{
|
||||
*((void**)d) = s->ptr;
|
||||
*((void**)d) = (void*) &s->val;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,11 +25,11 @@ invoke_copy_to_stack(uint64_t* d, uint32_t paramCount,
|
|||
|
||||
for (uint32_t i = 0; i < paramCount; i++, s++)
|
||||
{
|
||||
if (s->IsPtrData()) {
|
||||
if (s->IsIndirect()) {
|
||||
if (i < N_ARG_REGS)
|
||||
regs[i] = (uint64_t)s->ptr;
|
||||
regs[i] = (uint64_t) &s->val;
|
||||
else
|
||||
*d++ = (uint64_t)s->ptr;
|
||||
*d++ = (uint64_t) &s->val;
|
||||
continue;
|
||||
}
|
||||
switch (s->type) {
|
||||
|
|
|
@ -42,8 +42,8 @@ invoke_copy_to_stack(uint64_t* gpregs,
|
|||
uint64_t tempu64;
|
||||
|
||||
for(uint32_t i = 0; i < paramCount; i++, s++) {
|
||||
if(s->IsPtrData())
|
||||
tempu64 = (uint64_t) s->ptr;
|
||||
if(s->IsIndirect())
|
||||
tempu64 = (uint64_t) &s->val;
|
||||
else {
|
||||
switch(s->type) {
|
||||
case nsXPTType::T_FLOAT: break;
|
||||
|
@ -63,13 +63,13 @@ invoke_copy_to_stack(uint64_t* gpregs,
|
|||
}
|
||||
}
|
||||
|
||||
if (!s->IsPtrData() && s->type == nsXPTType::T_DOUBLE) {
|
||||
if (!s->IsIndirect() && s->type == nsXPTType::T_DOUBLE) {
|
||||
if (i < FPR_COUNT)
|
||||
fpregs[i] = s->val.d;
|
||||
else
|
||||
*(double *)d = s->val.d;
|
||||
}
|
||||
else if (!s->IsPtrData() && s->type == nsXPTType::T_FLOAT) {
|
||||
else if (!s->IsIndirect() && s->type == nsXPTType::T_FLOAT) {
|
||||
if (i < FPR_COUNT) {
|
||||
fpregs[i] = s->val.f; // if passed in registers, floats are promoted to doubles
|
||||
} else {
|
||||
|
|
Загрузка…
Ссылка в новой задаче