aarch64: Fix incorrect init/fini stack manipulation

The pre-index operator ('!') was missing at the end of the stp
instruction.

As a result, the stack pointer wasn't updated after the
store of the 64-bit pair and the stored values were basically lost when
follow on code used the stack for later store ops.
This commit is contained in:
Robin Randhawa
2019-02-25 19:12:49 +00:00
parent 269b8a1d3e
commit 17bed54103
+2 -2
View File
@@ -30,7 +30,7 @@ global_asm!(r#"
.global _init
.type _init,%function
_init:
stp x29,x30,[sp,-16]
stp x29,x30,[sp,-16]!
mov x29,sp
// stp: "stores two doublewords from the first and second argument to memory addressed by addr"
// Body will be filled in by gcc and ended by crtn.o
@@ -39,7 +39,7 @@ global_asm!(r#"
.global _fini
.type _fini,%function
_fini:
stp x29,x30,[sp,-16]
stp x29,x30,[sp,-16]!
mov x29,sp
// stp: "stores two doublewords from the first and second argument to memory addressed by addr"
// Body will be filled in by gcc and ended by crtn.o