1# This Source Code Form is subject to the terms of the Mozilla Public
2# License, v. 2.0. If a copy of the MPL was not distributed with this
3# file, You can obtain one at http://mozilla.org/MPL/2.0/.
4
5            .set NGPREGS,8
6            .set NFPREGS,8
7
8            .section ".text"
9            .globl SharedStub
10            .hidden SharedStub
11            .type  SharedStub,@function
12SharedStub:
13            .cfi_startproc
14            stp         x29, x30, [sp,#-16]!
15            .cfi_adjust_cfa_offset 16
16            .cfi_rel_offset x29, 0
17            .cfi_rel_offset x30, 8
18            mov         x29, sp
19            .cfi_def_cfa_register x29
20
21            sub         sp, sp, #8*(NGPREGS+NFPREGS)
22            stp         x0, x1, [sp, #64+(0*8)]
23            stp         x2, x3, [sp, #64+(2*8)]
24            stp         x4, x5, [sp, #64+(4*8)]
25            stp         x6, x7, [sp, #64+(6*8)]
26            stp         d0, d1, [sp, #(0*8)]
27            stp         d2, d3, [sp, #(2*8)]
28            stp         d4, d5, [sp, #(4*8)]
29            stp         d6, d7, [sp, #(6*8)]
30
31            # methodIndex passed from stub
32            mov         w1, w17
33
34            add         x2, sp, #16+(8*(NGPREGS+NFPREGS))
35            add         x3, sp, #8*NFPREGS
36            add         x4, sp, #0
37
38            bl          PrepareAndDispatch
39
40            add         sp, sp, #8*(NGPREGS+NFPREGS)
41            .cfi_def_cfa_register sp
42            ldp         x29, x30, [sp],#16
43            .cfi_adjust_cfa_offset -16
44            .cfi_restore x29
45            .cfi_restore x30
46            ret
47            .cfi_endproc
48
49            .size SharedStub, . - SharedStub
50