mirror of
https://github.com/NotAShelf/microfetch.git
synced 2026-04-12 04:47:40 +00:00
crates/asm: fix aarch64 stack alignment in _start
This commit is contained in:
parent
1539533c54
commit
c4b7afbf46
1 changed files with 3 additions and 1 deletions
|
|
@ -225,7 +225,9 @@ mod entry {
|
|||
// Move stack pointer to first argument register
|
||||
"mov x0, sp",
|
||||
// Align stack to 16-byte boundary (AArch64 ABI requirement)
|
||||
"and sp, sp, -16",
|
||||
"mov x9, sp",
|
||||
"and x9, x9, #-16",
|
||||
"mov sp, x9",
|
||||
// Call into Rust code
|
||||
"bl {entry_rust}",
|
||||
// Move return code to syscall argument
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue