xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,73 @@
     1.4 +/* -*- Mode: asm; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
     1.5 + * Version: MPL 1.1
     1.6 + *
     1.7 + * This Source Code Form is subject to the terms of the Mozilla Public
     1.8 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.9 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
    1.10 +
    1.11 +  .LEVEL  1.1
    1.12 +  .TEXT
    1.13 +  .ALIGN 4
    1.14 +
    1.15 +curframesz:
    1.16 +  .EQU 128
    1.17 +
    1.18 +
    1.19 +; SharedStub has stack size of 128 bytes
    1.20 +
    1.21 +lastframesz:
    1.22 +  .EQU 64
    1.23 +
    1.24 +; the StubN C++ function has a small stack size of 64 bytes
    1.25 +
    1.26 +
    1.27 +.globl SharedStub
    1.28 +  .type SharedStub, @function
    1.29 +
    1.30 +SharedStub:
    1.31 +  .PROC
    1.32 +  .CALLINFO CALLER,FRAME=80,SAVE_RP
    1.33 +
    1.34 +  .ENTRY
    1.35 +        STW     %rp,-20(%sp)
    1.36 +        LDO     128(%sp),%sp
    1.37 +
    1.38 +        STW     %r19,-32(%r30)
    1.39 +        STW     %r26,-36-curframesz(%r30) ; save arg0 in previous frame
    1.40 +
    1.41 +        LDO     -80(%r30),%r28
    1.42 +        FSTD,MA %fr5,8(%r28)   ; save darg0
    1.43 +        FSTD,MA %fr7,8(%r28)   ; save darg1
    1.44 +        FSTW,MA %fr4L,4(%r28)  ; save farg0
    1.45 +        FSTW,MA %fr5L,4(%r28)  ; save farg1
    1.46 +        FSTW,MA %fr6L,4(%r28)  ; save farg2
    1.47 +        FSTW,MA %fr7L,4(%r28)  ; save farg3
    1.48 +
    1.49 +        ; Former value of register 26 is already properly saved by StubN,
    1.50 +        ; but register 25-23 are not because of the argument mismatch
    1.51 +        STW     %r25,-40-curframesz-lastframesz(%r30) ; save r25
    1.52 +        STW     %r24,-44-curframesz-lastframesz(%r30) ; save r24
    1.53 +        STW     %r23,-48-curframesz-lastframesz(%r30) ; save r23
    1.54 +        COPY    %r26,%r25                             ; method index is arg1
    1.55 +        LDW     -36-curframesz-lastframesz(%r30),%r26 ; self is arg0
    1.56 +        LDO     -40-curframesz-lastframesz(%r30),%r24 ; normal args is arg2
    1.57 +        LDO     -80(%r30),%r23                        ; floating args is arg3
    1.58 +
    1.59 +        .CALL   ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR ;in=23-26;out=28;
    1.60 +        BL     PrepareAndDispatch, %r31
    1.61 +        COPY    %r31,%r2
    1.62 +
    1.63 +        LDW     -32(%r30),%r19
    1.64 +
    1.65 +        LDW     -148(%sp),%rp
    1.66 +        LDO     -128(%sp),%sp
    1.67 +
    1.68 +
    1.69 +        BV,N     (%rp)
    1.70 +        NOP
    1.71 +        NOP
    1.72 +
    1.73 +  .EXIT
    1.74 +  .PROCEND        ;in=26;out=28;
    1.75 +
    1.76 +  .SIZE SharedStub, .-SharedStub

mercurial