michael@0: /* -*- Mode: asm; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- michael@0: * Version: MPL 1.1 michael@0: * 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: .LEVEL 1.1 michael@0: .TEXT michael@0: .ALIGN 4 michael@0: michael@0: curframesz: michael@0: .EQU 128 michael@0: michael@0: michael@0: ; SharedStub has stack size of 128 bytes michael@0: michael@0: lastframesz: michael@0: .EQU 64 michael@0: michael@0: ; the StubN C++ function has a small stack size of 64 bytes michael@0: michael@0: michael@0: .globl SharedStub michael@0: .type SharedStub, @function michael@0: michael@0: SharedStub: michael@0: .PROC michael@0: .CALLINFO CALLER,FRAME=80,SAVE_RP michael@0: michael@0: .ENTRY michael@0: STW %rp,-20(%sp) michael@0: LDO 128(%sp),%sp michael@0: michael@0: STW %r19,-32(%r30) michael@0: STW %r26,-36-curframesz(%r30) ; save arg0 in previous frame michael@0: michael@0: LDO -80(%r30),%r28 michael@0: FSTD,MA %fr5,8(%r28) ; save darg0 michael@0: FSTD,MA %fr7,8(%r28) ; save darg1 michael@0: FSTW,MA %fr4L,4(%r28) ; save farg0 michael@0: FSTW,MA %fr5L,4(%r28) ; save farg1 michael@0: FSTW,MA %fr6L,4(%r28) ; save farg2 michael@0: FSTW,MA %fr7L,4(%r28) ; save farg3 michael@0: michael@0: ; Former value of register 26 is already properly saved by StubN, michael@0: ; but register 25-23 are not because of the argument mismatch michael@0: STW %r25,-40-curframesz-lastframesz(%r30) ; save r25 michael@0: STW %r24,-44-curframesz-lastframesz(%r30) ; save r24 michael@0: STW %r23,-48-curframesz-lastframesz(%r30) ; save r23 michael@0: COPY %r26,%r25 ; method index is arg1 michael@0: LDW -36-curframesz-lastframesz(%r30),%r26 ; self is arg0 michael@0: LDO -40-curframesz-lastframesz(%r30),%r24 ; normal args is arg2 michael@0: LDO -80(%r30),%r23 ; floating args is arg3 michael@0: michael@0: .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR ;in=23-26;out=28; michael@0: BL PrepareAndDispatch, %r31 michael@0: COPY %r31,%r2 michael@0: michael@0: LDW -32(%r30),%r19 michael@0: michael@0: LDW -148(%sp),%rp michael@0: LDO -128(%sp),%sp michael@0: michael@0: michael@0: BV,N (%rp) michael@0: NOP michael@0: NOP michael@0: michael@0: .EXIT michael@0: .PROCEND ;in=26;out=28; michael@0: michael@0: .SIZE SharedStub, .-SharedStub