changelog shortlog tags branches changeset files revisions annotate raw help

Mercurial > hg > plan9front / sys/src/ape/lib/ap/arm64/main9.s

changeset 7190: 41fb44a3b2dc
author: cinap_lenrek@felloff.net
date: Fri, 03 May 2019 21:06:46 +0200
permissions: -rw-r--r--
description: ape: initial support for arm64
1 #define NPRIVATES 16
2 
3 GLOBL _tos(SB), $8
4 GLOBL _errnoloc(SB), $8
5 GLOBL _plan9err(SB), $128
6 GLOBL _privates(SB), $8
7 GLOBL _nprivates(SB), $4
8 
9 TEXT _main(SB), 1, $(32 + 8+128 + NPRIVATES*8)
10  MOV $setSB(SB), R28
11  MOV R0, _tos(SB)
12 
13  ADD $32, RSP, R1
14 
15  MOV R1, _errnoloc(SB)
16  ADD $8, R1
17 
18  MOV R1, _plan9err(SB)
19  ADD $128, R1
20 
21  MOV R1, _privates(SB)
22  MOVW $NPRIVATES, R2
23  MOVW R2, _nprivates(SB)
24 
25  BL _envsetup(SB)
26 
27  MOV environ(SB), R2
28  MOV R2, 24(RSP)
29 
30  MOV $inargv+0(FP), R1
31  MOV R1, 16(RSP)
32 
33  MOVW inargc-8(FP), R0
34  MOV R0, 8(RSP)
35 
36  BL main(SB)
37 loop:
38  BL exit(SB)
39  B loop