diff --git a/mozilla/xpcom/reflect/xptcall/public/genstubs.pl b/mozilla/xpcom/reflect/xptcall/public/genstubs.pl index b8962930d49..aa6618c878c 100644 --- a/mozilla/xpcom/reflect/xptcall/public/genstubs.pl +++ b/mozilla/xpcom/reflect/xptcall/public/genstubs.pl @@ -44,7 +44,7 @@ for($i = 0; $i < $entry_count; $i++) { } print OUTFILE "#else\n"; for($i = 0; $i < $entry_count; $i++) { - print OUTFILE "NS_IMETHOD Stub",$i+3,"(PRUint64,\n"; + print OUTFILE "NS_IMETHOD Stub",$i+3,"(PRUint64,PRUint64,\n"; print OUTFILE " PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64);\n"; } diff --git a/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ipf32.s b/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ipf32.s index 591e88e5ade..720dd6cc71a 100644 --- a/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ipf32.s +++ b/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ipf32.s @@ -15,15 +15,17 @@ .type PrepareAndDispatch,@function SharedStub:: -// 9 arguments, first 8 are the input arguments of previous -// function call. The last one is methodIndex, and is passed in memory +// 10 arguments, first 8 are the input arguments of previous +// function call. The 9th one is methodIndex and the 10th is the +// pointer to the remaining input arguments. The last two arguments +// are passed in memory. .prologue .save ar.pfs , r41 // allocate 8 input args, 4 local args, and 5 output args alloc r41 = ar.pfs, 8, 4, 5, 0 // M .save rp, r40 mov r40 = rp // I - nop.i 0 ;; // I + addp4 out4 = 28, sp ;; // I .save ar.unat, r42 mov r42 = ar.unat // M @@ -46,12 +48,9 @@ SharedStub:: .body add out0 = 0, in0 // A move self ptr // 144 bytes = 16 byte stack header + 64 byte int space + 64 byte float space -// current frame is 144 bytes, previous frame is 112 bytes -// restarg is at 144 + 112 + 16 bytes away from current sp -// (current frame + previous frame + previous previous frame header) // methodIndex is at 144 + 16 bytes away from current sp // (current frame + previous frame header) - add out4 = 192, sp // A restarg address + ld4 out4 = [out4] // A restarg address add r11 = 160, sp ;; // A address of methodIndex ld8 out1 = [r11] // M load methodIndex diff --git a/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ipf64.s b/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ipf64.s index 6cdc60f264d..4c07836d720 100644 --- a/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ipf64.s +++ b/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ipf64.s @@ -15,15 +15,17 @@ .type PrepareAndDispatch,@function SharedStub:: -// 9 arguments, first 8 are the input arguments of previous -// function call. The last one is methodIndex, and is passed in memory +// 10 arguments, first 8 are the input arguments of previous +// function call. The 9th one is methodIndex and the 10th is the +// pointer to the remaining input arguments. The last two arguments +// are passed in memory. .prologue .save ar.pfs , r41 // allocate 8 input args, 4 local args, and 5 output args alloc r41 = ar.pfs, 8, 4, 5, 0 // M .save rp, r40 mov r40 = rp // I - nop.i 0 ;; // I + add out4 = 24, sp ;; // I .save ar.unat, r42 mov r42 = ar.unat // M @@ -46,12 +48,9 @@ SharedStub:: .body add out0 = 0, in0 // A move self ptr // 144 bytes = 16 byte stack header + 64 byte int space + 64 byte float space -// current frame is 144 bytes, previous frame is 112 bytes -// restarg is at 144 + 112 + 16 bytes away from current sp -// (current frame + previous frame + previous previous frame header) // methodIndex is at 144 + 16 bytes away from current sp // (current frame + previous frame header) - add out4 = 192, sp // A restarg address + ld8 out4 = [out4] // M restarg address add r11 = 160, sp ;; // A address of methodIndex ld8 out1 = [r11] // M load methodIndex diff --git a/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ipf32.cpp b/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ipf32.cpp index 844f55dda31..31029966b63 100644 --- a/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ipf32.cpp +++ b/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ipf32.cpp @@ -162,16 +162,17 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, } extern "C" int SharedStub(PRUint64,PRUint64,PRUint64,PRUint64, - PRUint64,PRUint64,PRUint64,PRUint64,PRUint64); + PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64 *); /* Variable a0-a7 were put there so we can have access to the 8 input registers on Stubxyz entry */ #define STUB_ENTRY(n) \ nsresult nsXPTCStubBase::Stub##n(PRUint64 a1, \ -PRUint64 a2,PRUint64 a3,PRUint64 a4,PRUint64 a5,PRUint64 a6,PRUint64 a7) \ +PRUint64 a2,PRUint64 a3,PRUint64 a4,PRUint64 a5,PRUint64 a6,PRUint64 a7, \ +PRUint64 a8) \ { uint64_t a0 = (uint64_t) this; \ - return SharedStub(a0,a1,a2,a3,a4,a5,a6,a7,(PRUint64) n); \ + return SharedStub(a0,a1,a2,a3,a4,a5,a6,a7,(PRUint64) n, &a8); \ } #define SENTINEL_ENTRY(n) \ diff --git a/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ipf64.cpp b/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ipf64.cpp index 6a11f692de0..d7445099a54 100644 --- a/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ipf64.cpp +++ b/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ipf64.cpp @@ -163,16 +163,17 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, } extern "C" int SharedStub(PRUint64,PRUint64,PRUint64,PRUint64, - PRUint64,PRUint64,PRUint64,PRUint64,PRUint64); + PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64 *); /* Variable a0-a7 were put there so we can have access to the 8 input registers on Stubxyz entry */ #define STUB_ENTRY(n) \ nsresult nsXPTCStubBase::Stub##n(PRUint64 a1, \ -PRUint64 a2,PRUint64 a3,PRUint64 a4,PRUint64 a5,PRUint64 a6,PRUint64 a7) \ +PRUint64 a2,PRUint64 a3,PRUint64 a4,PRUint64 a5,PRUint64 a6,PRUint64 a7, \ +PRUint64 a8) \ { uint64_t a0 = (uint64_t) this; \ - return SharedStub(a0,a1,a2,a3,a4,a5,a6,a7,(PRUint64) n); \ + return SharedStub(a0,a1,a2,a3,a4,a5,a6,a7,(PRUint64) n, &a8); \ } #define SENTINEL_ENTRY(n) \