Followup from bug 375449, #define renaming doesn't work with assembly files.
git-svn-id: svn://10.0.0.236/trunk@224951 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
3ef40e28af
commit
171a0984e9
@ -56,15 +56,15 @@
|
||||
|
||||
.section ".text"
|
||||
.align 2
|
||||
.globl NS_InvokeByIndex
|
||||
.type NS_InvokeByIndex,@function
|
||||
.globl NS_InvokeByIndex_P
|
||||
.type NS_InvokeByIndex_P,@function
|
||||
|
||||
//
|
||||
// NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
// NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
|
||||
// PRUint32 paramCount, nsXPTCVariant* params)
|
||||
//
|
||||
|
||||
NS_InvokeByIndex:
|
||||
NS_InvokeByIndex_P:
|
||||
stwu sp,-32(sp) // setup standard stack frame
|
||||
mflr r0 // save LR
|
||||
stw r3,8(sp) // r3 <= that
|
||||
|
||||
@ -47,12 +47,12 @@
|
||||
.text
|
||||
.align 2
|
||||
#
|
||||
# NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
# NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
|
||||
# PRUint32 paramCount, nsXPTCVariant* params)
|
||||
#
|
||||
|
||||
.globl __NS_InvokeByIndex
|
||||
__NS_InvokeByIndex:
|
||||
.globl __NS_InvokeByIndex_P
|
||||
__NS_InvokeByIndex_P:
|
||||
mflr r0
|
||||
stw r31,-4(r1)
|
||||
#
|
||||
|
||||
@ -37,13 +37,13 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/* Platform specific code to invoke XPCOM methods on native objects */
|
||||
.global NS_InvokeByIndex
|
||||
.global NS_InvokeByIndex_P
|
||||
/*
|
||||
NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
|
||||
PRUint32 paramCount, nsXPTCVariant* params);
|
||||
|
||||
*/
|
||||
NS_InvokeByIndex:
|
||||
NS_InvokeByIndex_P:
|
||||
save %sp,-(64 + 32),%sp ! room for the register window and
|
||||
! struct pointer, rounded up to 0 % 32
|
||||
mov %i2,%o0 ! paramCount
|
||||
|
||||
@ -42,12 +42,12 @@
|
||||
* Platform specific code to invoke XPCOM methods on native objects for
|
||||
* solaris/sparc with gcc 3 ABI.
|
||||
*/
|
||||
.global NS_InvokeByIndex
|
||||
.global NS_InvokeByIndex_P
|
||||
/*
|
||||
* NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
* NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
|
||||
* PRUint32 paramCount, nsXPTCVariant* params);
|
||||
*/
|
||||
NS_InvokeByIndex:
|
||||
NS_InvokeByIndex_P:
|
||||
save %sp,-(64 + 32),%sp ! room for the register window and
|
||||
! struct pointer, rounded up to 0 % 32
|
||||
mov %i2,%o0 ! paramCount
|
||||
|
||||
@ -38,14 +38,14 @@
|
||||
|
||||
/* Platform specific code to invoke XPCOM methods on native objects */
|
||||
|
||||
.global NS_InvokeByIndex
|
||||
.type NS_InvokeByIndex, #function
|
||||
.global NS_InvokeByIndex_P
|
||||
.type NS_InvokeByIndex_P, #function
|
||||
/*
|
||||
NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
|
||||
PRUint32 paramCount, nsXPTCVariant* params);
|
||||
|
||||
*/
|
||||
NS_InvokeByIndex:
|
||||
NS_InvokeByIndex_P:
|
||||
save %sp,-(64 + 32),%sp ! room for the register window and
|
||||
! struct pointer, rounded up to 0 % 32
|
||||
sll %i2,3,%l0 ! assume the worst case
|
||||
@ -85,4 +85,4 @@ NS_InvokeByIndex:
|
||||
ret
|
||||
restore
|
||||
|
||||
.size NS_InvokeByIndex, .-NS_InvokeByIndex
|
||||
.size NS_InvokeByIndex_P, .-NS_InvokeByIndex
|
||||
|
||||
@ -48,15 +48,15 @@
|
||||
The SCD is available from http://www.sparc.com/.
|
||||
*/
|
||||
|
||||
.global NS_InvokeByIndex
|
||||
.type NS_InvokeByIndex, #function
|
||||
.global NS_InvokeByIndex_P
|
||||
.type NS_InvokeByIndex_P, #function
|
||||
|
||||
/*
|
||||
NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
|
||||
PRUint32 paramCount, nsXPTCVariant* params);
|
||||
|
||||
*/
|
||||
NS_InvokeByIndex:
|
||||
NS_InvokeByIndex_P:
|
||||
save %sp,-(128 + 64),%sp ! room for the register window and
|
||||
! struct pointer, rounded up to 0 % 64
|
||||
sll %i2,4,%l0 ! assume the worst case
|
||||
@ -116,4 +116,4 @@ NS_InvokeByIndex:
|
||||
ret
|
||||
restore
|
||||
|
||||
.size NS_InvokeByIndex, .-NS_InvokeByIndex
|
||||
.size NS_InvokeByIndex_P, .-NS_InvokeByIndex
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
.globl NS_InvokeByIndex
|
||||
.type NS_InvokeByIndex, @function
|
||||
NS_InvokeByIndex:
|
||||
.globl NS_InvokeByIndex_P
|
||||
.type NS_InvokeByIndex_P, @function
|
||||
NS_InvokeByIndex_P:
|
||||
push %ebp
|
||||
movl %esp,%ebp
|
||||
push %ebx
|
||||
@ -51,5 +51,5 @@ NS_InvokeByIndex:
|
||||
movl %ebp,%esp
|
||||
pop %ebp
|
||||
ret
|
||||
.size NS_InvokeByIndex, . - NS_InvokeByIndex
|
||||
.size NS_InvokeByIndex_P, . - NS_InvokeByIndex
|
||||
|
||||
|
||||
@ -92,7 +92,7 @@ xptc_invoke_copy_to_stack_keeper (void)
|
||||
|
||||
/*
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
|
||||
PRUint32 paramCount, nsXPTCVariant* params);
|
||||
|
||||
Each param takes at most two 4-byte words.
|
||||
@ -117,12 +117,12 @@ xptc_invoke_copy_to_stack_keeper (void)
|
||||
*/
|
||||
#if defined(XP_WIN32) || defined(XP_OS2)
|
||||
extern "C" {
|
||||
nsresult _NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
nsresult _NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
|
||||
PRUint32 paramCount, nsXPTCVariant* params);
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
|
||||
PRUint32 paramCount, nsXPTCVariant* params) {
|
||||
return _NS_InvokeByIndex(that, methodIndex, paramCount, params);
|
||||
return _NS_InvokeByIndex_P(that, methodIndex, paramCount, params);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -133,12 +133,12 @@ __asm__ (
|
||||
is what xptcstubs uses. */
|
||||
".align 2\n\t"
|
||||
#if defined(XP_WIN32) || defined(XP_OS2)
|
||||
".globl " SYMBOL_UNDERSCORE "_NS_InvokeByIndex\n\t"
|
||||
SYMBOL_UNDERSCORE "_NS_InvokeByIndex:\n\t"
|
||||
".globl " SYMBOL_UNDERSCORE "_NS_InvokeByIndex_P\n\t"
|
||||
SYMBOL_UNDERSCORE "_NS_InvokeByIndex_P:\n\t"
|
||||
#else
|
||||
".globl " SYMBOL_UNDERSCORE "NS_InvokeByIndex\n\t"
|
||||
".type " SYMBOL_UNDERSCORE "NS_InvokeByIndex,@function\n"
|
||||
SYMBOL_UNDERSCORE "NS_InvokeByIndex:\n\t"
|
||||
".globl " SYMBOL_UNDERSCORE "NS_InvokeByIndex_P\n\t"
|
||||
".type " SYMBOL_UNDERSCORE "NS_InvokeByIndex_P,@function\n"
|
||||
SYMBOL_UNDERSCORE "NS_InvokeByIndex_P:\n\t"
|
||||
#endif
|
||||
"pushl %ebp\n\t"
|
||||
"movl %esp, %ebp\n\t"
|
||||
@ -193,7 +193,7 @@ __asm__ (
|
||||
"popl %ebp\n\t"
|
||||
"ret\n"
|
||||
#if !defined(XP_WIN32) && !defined(XP_OS2)
|
||||
".size " SYMBOL_UNDERSCORE "NS_InvokeByIndex, . -" SYMBOL_UNDERSCORE "NS_InvokeByIndex\n\t"
|
||||
".size " SYMBOL_UNDERSCORE "NS_InvokeByIndex_P, . -" SYMBOL_UNDERSCORE "NS_InvokeByIndex_P\n\t"
|
||||
#endif
|
||||
);
|
||||
|
||||
|
||||
@ -94,20 +94,20 @@ invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s)
|
||||
|
||||
/*
|
||||
* EXPORT_XPCOM_API(nsresult)
|
||||
* NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
* NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
|
||||
* PRUint32 paramCount, nsXPTCVariant* params)
|
||||
*/
|
||||
__asm__(
|
||||
"#### NS_InvokeByIndex ####\n"
|
||||
"#### NS_InvokeByIndex_P ####\n"
|
||||
".text\n\t"
|
||||
".align 5\n\t"
|
||||
".globl NS_InvokeByIndex\n\t"
|
||||
".ent NS_InvokeByIndex\n"
|
||||
"NS_InvokeByIndex:\n\t"
|
||||
".globl NS_InvokeByIndex_P\n\t"
|
||||
".ent NS_InvokeByIndex_P\n"
|
||||
"NS_InvokeByIndex_P:\n\t"
|
||||
".frame $15,32,$26,0\n\t"
|
||||
".mask 0x4008000,-32\n\t"
|
||||
"ldgp $29,0($27)\n"
|
||||
"$NS_InvokeByIndex..ng:\n\t"
|
||||
"$NS_InvokeByIndex_P..ng:\n\t"
|
||||
"subq $30,32,$30\n\t"
|
||||
"stq $26,0($30)\n\t"
|
||||
"stq $15,8($30)\n\t"
|
||||
@ -177,5 +177,5 @@ __asm__(
|
||||
"ldq $15,8($30)\n\t"
|
||||
"addq $30,32,$30\n\t"
|
||||
"ret $31,($26),1\n\t"
|
||||
".end NS_InvokeByIndex"
|
||||
".end NS_InvokeByIndex_P"
|
||||
);
|
||||
|
||||
@ -40,9 +40,9 @@
|
||||
|
||||
// Platform specific code to invoke XPCOM methods on native objects
|
||||
|
||||
// The purpose of NS_InvokeByIndex() is to map a platform
|
||||
// The purpose of NS_InvokeByIndex_P() is to map a platform
|
||||
// indepenpent call to the platform ABI. To do that,
|
||||
// NS_InvokeByIndex() has to determine the method to call via vtable
|
||||
// NS_InvokeByIndex_P() has to determine the method to call via vtable
|
||||
// access. The parameters for the method are read from the
|
||||
// nsXPTCVariant* and prepared for th native ABI. For the Linux/PPC
|
||||
// ABI this means that the first 8 integral and floating point
|
||||
@ -137,5 +137,5 @@ invoke_copy_to_stack(PRUint32* d,
|
||||
|
||||
extern "C"
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
|
||||
PRUint32 paramCount, nsXPTCVariant* params);
|
||||
|
||||
@ -133,13 +133,13 @@ invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount, nsXPTCVariant* s, double
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" nsresult _NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
extern "C" nsresult _NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
|
||||
PRUint32 paramCount,
|
||||
nsXPTCVariant* params);
|
||||
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
|
||||
PRUint32 paramCount, nsXPTCVariant* params)
|
||||
{
|
||||
return _NS_InvokeByIndex(that, methodIndex, paramCount, params);
|
||||
return _NS_InvokeByIndex_P(that, methodIndex, paramCount, params);
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ invoke_copy_to_stack(PRUint32 paramCount, nsXPTCVariant* s, PRUint32* d)
|
||||
}
|
||||
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
|
||||
PRUint32 paramCount, nsXPTCVariant* params)
|
||||
{
|
||||
#ifdef __GNUC__ /* Gnu compiler. */
|
||||
|
||||
@ -132,7 +132,7 @@ invoke_copy_to_stack(PRUint64 * d, PRUint32 paramCount, nsXPTCVariant * s,
|
||||
}
|
||||
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_InvokeByIndex(nsISupports * that, PRUint32 methodIndex,
|
||||
NS_InvokeByIndex_P(nsISupports * that, PRUint32 methodIndex,
|
||||
PRUint32 paramCount, nsXPTCVariant * params)
|
||||
{
|
||||
PRUint32 nr_gpr, nr_fpr, nr_stack;
|
||||
|
||||
@ -107,7 +107,7 @@ invoke_copy_to_stack(PRUint32 paramCount, nsXPTCVariant* s, PRUint32* d)
|
||||
|
||||
#if !defined(__SUNPRO_CC) /* Sun Workshop Compiler. */
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
|
||||
PRUint32 paramCount, nsXPTCVariant* params)
|
||||
{
|
||||
#ifdef __GNUC__ /* Gnu compiler. */
|
||||
|
||||
@ -78,7 +78,7 @@ invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount, nsXPTCVariant* s)
|
||||
|
||||
#pragma warning(disable : 4035) // OK to have no return value
|
||||
extern "C" NS_EXPORT __declspec(naked) nsresult NS_FROZENCALL
|
||||
NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
|
||||
PRUint32 paramCount, nsXPTCVariant* params)
|
||||
{
|
||||
__asm {
|
||||
|
||||
@ -83,7 +83,7 @@ XPTC__InvokebyIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
|
||||
extern "C"
|
||||
EXPORT_XPCOM_API(nsresult)
|
||||
NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
|
||||
NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
|
||||
PRUint32 paramCount, nsXPTCVariant* params)
|
||||
{
|
||||
return XPTC__InvokebyIndex(that, methodIndex, paramCount, params);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user