commit d7e4c85917c6e43fbc1ab25a3663c176c9605b56
parent 52172af3ceef434ab693cadcb3a5dd0a538ec441
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Thu, 15 Oct 2020 22:40:23 +0200
os9: Use memset() in crt.s
It simplifies the crt.
Change-Id: Ie28b8d8e77d96d782bff686e26bd81ad33adfd36
Diffstat:
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/src/os9/arch/arm64/crt.s b/src/os9/arch/arm64/crt.s
@@ -41,17 +41,11 @@ EL1:
MOV SP,X9
MOV X29,0
- LDR X9,[X0,8]
- LDR X10,=edata
- LDR X11,=end
- SUB X11,X11,X10
- LSR X11,X11,3
- SUB X10,X10,X9
-
-1:
- STR XZR,[X10],8
- SUB X11,X11,1
- CBNZ X11,1b
+ ADR X0,edata
+ MOV X1,0
+ ADR X2,end
+ SUB X2,X2,X0
+ BL memset
BL imach
BL icache