Skip to content

Commit 46cce0c

Browse files
authored
push/pop issue fix
1 parent 4dc3dbc commit 46cce0c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

macrolib/macrolib_arm64.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
macro clr [reg] { mov reg, #0 } ; clears the specified registers using mov
44

5-
macro push [reg] { str reg, [sp, -16] } ; saves multiple registers onto the stack
5+
macro push [reg] { str reg, [sp, #-8]! } ; saves multiple registers onto the stack
66

7-
macro pop [reg] { ldr reg, [sp, -16] } ; restores multiple registers from the stack
7+
macro pop [reg] { ldr reg, [sp], #8 } ; restores multiple registers from the stack
88

99
macro exit value {
1010
mov x8, #93 ; sets syscall number for exit
@@ -87,4 +87,4 @@ macro printtim times, str, str_len {
8787
; Data Section
8888

8989
newline db 10
90-
buffer rb 32
90+
buffer rb 32

0 commit comments

Comments
 (0)