crates/asm: fix aarch64 stack alignment in _start

This commit is contained in:
Amaan Qureshi 2026-04-11 02:05:16 -04:00
commit c4b7afbf46
No known key found for this signature in database

View file

@ -225,7 +225,9 @@ mod entry {
// Move stack pointer to first argument register // Move stack pointer to first argument register
"mov x0, sp", "mov x0, sp",
// Align stack to 16-byte boundary (AArch64 ABI requirement) // 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 // Call into Rust code
"bl {entry_rust}", "bl {entry_rust}",
// Move return code to syscall argument // Move return code to syscall argument