Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* -*- Mode: asm; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 * Version: MPL 1.1
3 *
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 .LEVEL 1.1
9 .TEXT
10 .ALIGN 4
12 curframesz:
13 .EQU 128
16 ; SharedStub has stack size of 128 bytes
18 lastframesz:
19 .EQU 64
21 ; the StubN C++ function has a small stack size of 64 bytes
24 .globl SharedStub
25 .type SharedStub, @function
27 SharedStub:
28 .PROC
29 .CALLINFO CALLER,FRAME=80,SAVE_RP
31 .ENTRY
32 STW %rp,-20(%sp)
33 LDO 128(%sp),%sp
35 STW %r19,-32(%r30)
36 STW %r26,-36-curframesz(%r30) ; save arg0 in previous frame
38 LDO -80(%r30),%r28
39 FSTD,MA %fr5,8(%r28) ; save darg0
40 FSTD,MA %fr7,8(%r28) ; save darg1
41 FSTW,MA %fr4L,4(%r28) ; save farg0
42 FSTW,MA %fr5L,4(%r28) ; save farg1
43 FSTW,MA %fr6L,4(%r28) ; save farg2
44 FSTW,MA %fr7L,4(%r28) ; save farg3
46 ; Former value of register 26 is already properly saved by StubN,
47 ; but register 25-23 are not because of the argument mismatch
48 STW %r25,-40-curframesz-lastframesz(%r30) ; save r25
49 STW %r24,-44-curframesz-lastframesz(%r30) ; save r24
50 STW %r23,-48-curframesz-lastframesz(%r30) ; save r23
51 COPY %r26,%r25 ; method index is arg1
52 LDW -36-curframesz-lastframesz(%r30),%r26 ; self is arg0
53 LDO -40-curframesz-lastframesz(%r30),%r24 ; normal args is arg2
54 LDO -80(%r30),%r23 ; floating args is arg3
56 .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR ;in=23-26;out=28;
57 BL PrepareAndDispatch, %r31
58 COPY %r31,%r2
60 LDW -32(%r30),%r19
62 LDW -148(%sp),%rp
63 LDO -128(%sp),%sp
66 BV,N (%rp)
67 NOP
68 NOP
70 .EXIT
71 .PROCEND ;in=26;out=28;
73 .SIZE SharedStub, .-SharedStub