Skip to content

Commit d597a71

Browse files
committed
fix single-hart
1 parent 1241212 commit d597a71

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
@@ -110,10 +110,11 @@ cfg_global_asm!(
110110
addi t1, t1, -1
111111
bnez t1, 1b
112112
2: ",
113-
"la t1, _stack_start",
114-
"sub t1, t1, t0",
115113
);
116114
cfg_global_asm!(
115+
"la t1, _stack_start",
116+
#[cfg(not(feature = "single-hart"))]
117+
"sub t1, t1, t0",
117118
"andi sp, t1, -16 // align stack to 16-bytes
118119
add s0, sp, zero",
119120
);

0 commit comments

Comments
 (0)