Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

riscv32: align stack pointer to 16-bytes #21

Merged
merged 1 commit into from
Dec 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/unwinder/arch/riscv32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ pub extern "C-unwind" fn save_context(f: extern "C" fn(&mut Context, *mut ()), p
asm!(
"
mv t0, sp
add sp, sp, -0x188
add sp, sp, -0x190
sw ra, 0x180(sp)
",
code!(save_gp),
Expand All @@ -186,7 +186,7 @@ pub extern "C-unwind" fn save_context(f: extern "C" fn(&mut Context, *mut ()), p
mv a0, sp
jalr t0
lw ra, 0x180(sp)
add sp, sp, 0x188
add sp, sp, 0x190
ret
",
options(noreturn)
Expand All @@ -197,7 +197,7 @@ pub extern "C-unwind" fn save_context(f: extern "C" fn(&mut Context, *mut ()), p
asm!(
"
mv t0, sp
add sp, sp, -0x88
add sp, sp, -0x90
sw ra, 0x80(sp)
",
code!(save_gp),
Expand All @@ -206,7 +206,7 @@ pub extern "C-unwind" fn save_context(f: extern "C" fn(&mut Context, *mut ()), p
mv a0, sp
jalr t0
lw ra, 0x80(sp)
add sp, sp, 0x88
add sp, sp, 0x90
ret
",
options(noreturn)
Expand Down