Skip to content

Commit

Permalink
fix single-hart
Browse files Browse the repository at this point in the history
  • Loading branch information
romancardenas committed Jan 10, 2024
1 parent b443cf3 commit 173ea43
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions riscv-rt/src/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,11 @@ cfg_global_asm!(
addi t1, t1, -1
bnez t1, 1b
2: ",
"la t1, _stack_start",
"sub t1, t1, t0",
);
cfg_global_asm!(
"la t1, _stack_start",
#[cfg(not(feature = "single-hart"))]
"sub t1, t1, t0",
"andi sp, t1, -16 // align stack to 16-bytes
add s0, sp, zero",
);
Expand Down

0 comments on commit 173ea43

Please sign in to comment.