Skip to content
Snippets Groups Projects
Commit 17bed541 authored by Robin Randhawa's avatar Robin Randhawa
Browse files

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.
parent 269b8a1d
No related branches found
No related tags found
1 merge request!202Aarch64 prep redux
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment