Skip to content

Commit 173ea43

Browse files
committed
fix single-hart
1 parent b443cf3 commit 173ea43

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

riscv-rt/src/asm.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,11 @@ cfg_global_asm!(
9090
addi t1, t1, -1
9191
bnez t1, 1b
9292
2: ",
93-
"la t1, _stack_start",
94-
"sub t1, t1, t0",
9593
);
9694
cfg_global_asm!(
95+
"la t1, _stack_start",
96+
#[cfg(not(feature = "single-hart"))]
97+
"sub t1, t1, t0",
9798
"andi sp, t1, -16 // align stack to 16-bytes
9899
add s0, sp, zero",
99100
);

0 commit comments

Comments
 (0)