michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: .set r0,0; .set sp,1; .set RTOC,2; .set r3,3; .set r4,4 michael@0: .set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9 michael@0: .set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14 michael@0: .set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19 michael@0: .set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24 michael@0: .set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29 michael@0: .set r30,30; .set r31,31 michael@0: .set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4 michael@0: .set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9 michael@0: .set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14 michael@0: .set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19 michael@0: .set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24 michael@0: .set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29 michael@0: .set f30,30; .set f31,31 michael@0: michael@0: # Define the correct name of the stub function based on the object model michael@0: michael@0: define(STUB_NAME, michael@0: ifelse(AIX_OBJMODEL, ibm, michael@0: `Stub'$1`__EI14nsXPTCStubBaseFv', michael@0: `Stub'$1`__14nsXPTCStubBaseFv')) michael@0: michael@0: define(STUB_ENTRY, ` michael@0: .rename H.10.NO_SYMBOL{PR},"" michael@0: .rename H.18.'STUB_NAME($1)`{TC},"'STUB_NAME($1)`" michael@0: .csect H.10.NO_SYMBOL{PR} michael@0: .globl .'STUB_NAME($1)` michael@0: .globl 'STUB_NAME($1)`{DS} michael@0: michael@0: .'STUB_NAME($1)`: michael@0: li r12, '$1` michael@0: b .SharedStub michael@0: nop michael@0: michael@0: michael@0: .toc michael@0: T.18.'STUB_NAME($1)`: michael@0: .tc H.18.'STUB_NAME($1)`{TC},'STUB_NAME($1)`{DS} michael@0: .csect 'STUB_NAME($1)`{DS} michael@0: .long .'STUB_NAME($1)` michael@0: .long TOC{TC0} michael@0: .long 0x00000000 michael@0: ') michael@0: michael@0: define(SENTINEL_ENTRY, `') michael@0: michael@0: include(xptcstubsdef.inc) michael@0: michael@0: .rename H.10.NO_SYMBOL{PR},"" michael@0: .rename H.18.SharedStub{TC},"SharedStub" michael@0: michael@0: # .text section michael@0: .csect H.10.NO_SYMBOL{PR} michael@0: .globl .SharedStub michael@0: .globl SharedStub{DS} michael@0: .extern .PrepareAndDispatch michael@0: michael@0: .SharedStub: michael@0: mflr r0 michael@0: stw r0,8(sp) michael@0: michael@0: stwu sp,-176(sp) # room for linkage (24), fprData (104), gprData(28) michael@0: # outgoing params to PrepareAndDispatch (20) michael@0: michael@0: stw r4,44(sp) # link area (24) + PrepareAndDispatch params (20) michael@0: stw r5,48(sp) michael@0: stw r6,52(sp) michael@0: stw r7,56(sp) michael@0: stw r8,60(sp) michael@0: stw r9,64(sp) michael@0: stw r10,68(sp) michael@0: stfd f1,72(sp) michael@0: stfd f2,80(sp) michael@0: stfd f3,88(sp) michael@0: stfd f4,96(sp) michael@0: stfd f5,104(sp) michael@0: stfd f6,112(sp) michael@0: stfd f7,120(sp) michael@0: stfd f8,128(sp) michael@0: stfd f9,136(sp) michael@0: stfd f10,144(sp) michael@0: stfd f11,152(sp) michael@0: stfd f12,156(sp) michael@0: stfd f13,164(sp) michael@0: michael@0: addi r6,sp,44 # gprData michael@0: michael@0: addi r7,sp,72 # fprData michael@0: # r3 has the 'self' pointer already michael@0: mr r4,r12 # methodIndex selector (it is now LATER) michael@0: addi r5,sp,232 # pointer to callers args area, beyond r3-r10 michael@0: # mapped range michael@0: michael@0: bl .PrepareAndDispatch michael@0: nop michael@0: michael@0: michael@0: lwz r0,184(sp) michael@0: addi sp,sp,176 michael@0: mtlr r0 michael@0: blr michael@0: michael@0: # .data section michael@0: michael@0: .toc # 0x00000038 michael@0: T.18.SharedStub: michael@0: .tc H.18.SharedStub{TC},SharedStub{DS} michael@0: michael@0: .csect SharedStub{DS} michael@0: .long .SharedStub # "\0\0\0\0" michael@0: .long TOC{TC0} # "\0\0\0008" michael@0: .long 0x00000000 # "\0\0\0\0" michael@0: # End csect SharedStub{DS} michael@0: michael@0: # .bss section