b=476903; additional ARM xptc marshalling fixes (avoid unsigned char dependency); r=bsmedberg

This commit is contained in:
Vladimir Vukicevic 2009-03-20 08:23:44 -07:00
Родитель 5bd2c2a63f
Коммит 1c456f3481
2 изменённых файлов: 3 добавлений и 9 удалений

Просмотреть файл

@ -130,9 +130,6 @@ invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount, nsXPTCVariant* s)
}
// According to the ARM EABI, integral types that are smaller than a word
// are to be sign/zero-extended to a full word and treated as 4-byte values.
// NOTE: on ARM/gcc, char is unsigned by default, and PRunichar is unisgned.
PR_STATIC_ASSERT(char(0xFF) == PRUint32(0xFF));
PR_STATIC_ASSERT(PRUnichar(0xFFFF) == PRUint32(0xFFFF));
switch(s->type)
{
@ -150,8 +147,8 @@ invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount, nsXPTCVariant* s)
case nsXPTType::T_DOUBLE : d = DOUBLEWORD_ALIGN(d);
*((double*) d) = s->val.d; d++; break;
case nsXPTType::T_BOOL : *((PRInt32*) d) = s->val.b; break;
case nsXPTType::T_CHAR : *((PRUint32*)d) = s->val.c; break;
case nsXPTType::T_WCHAR : *((PRUint32*)d) = s->val.wc; break;
case nsXPTType::T_CHAR : *((PRInt32*) d) = s->val.c; break;
case nsXPTType::T_WCHAR : *((PRInt32*) d) = s->val.wc; break;
default:
// all the others are plain pointer types
*((void**)d) = s->val.p;

Просмотреть файл

@ -63,9 +63,6 @@ invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount, nsXPTCVariant* s)
}
// According to the ARM EABI, integral types that are smaller than a word
// are to be sign/zero-extended to a full word and treated as 4-byte values.
// NOTE: on ARM/CE, char is signed, but PRunichar is unsigned.
PR_STATIC_ASSERT(char(0xFF) < 0);
PR_STATIC_ASSERT(PRUnichar(0xFFFF) == PRUint32(0xFFFF));
switch(s->type)
{
@ -81,7 +78,7 @@ invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount, nsXPTCVariant* s)
case nsXPTType::T_DOUBLE : *((double*) d) = s->val.d; d++; break;
case nsXPTType::T_BOOL : *((PRInt32*) d) = s->val.b; break;
case nsXPTType::T_CHAR : *((PRInt32*) d) = s->val.c; break;
case nsXPTType::T_WCHAR : *((PRUint32*)d) = s->val.wc; break;
case nsXPTType::T_WCHAR : *((PRInt32*) d) = s->val.wc; break;
default:
// all the others are plain pointer types
*((void**)d) = s->val.p;