File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -120,12 +120,12 @@ cfg_global_asm!(
120120// STORE A0..A2 IN THE STACK, AS THEY WILL BE NEEDED LATER BY main
121121cfg_global_asm ! (
122122 #[ cfg( target_arch = "riscv32" ) ]
123- "addi sp, sp, -4 * 3
123+ "addi sp, sp, -4 * 4 // we must keep stack aligned to 16-bytes
124124 sw a0, 4 * 0(sp)
125125 sw a1, 4 * 1(sp)
126126 sw a2, 4 * 2(sp)" ,
127127 #[ cfg( target_arch = "riscv64" ) ]
128- "addi sp, sp, -8 * 3
128+ "addi sp, sp, -8 * 4 // we must keep stack aligned to 16-bytes
129129 sd a0, 8 * 0(sp)
130130 sd a1, 8 * 1(sp)
131131 sd a2, 8 * 2(sp)" ,
@@ -210,12 +210,12 @@ cfg_global_asm!(
210210 "lw a0, 4 * 0(sp)
211211 lw a1, 4 * 1(sp)
212212 lw a2, 4 * 2(sp)
213- addi sp, sp, 4 * 3 " ,
213+ addi sp, sp, 4 * 4 " ,
214214 #[ cfg( target_arch = "riscv64" ) ]
215215 "ld a0, 8 * 0(sp)
216216 ld a1, 8 * 1(sp)
217217 ld a2, 8 * 2(sp)
218- addi sp, sp, 8 * 3 " ,
218+ addi sp, sp, 8 * 4 " ,
219219 "jal zero, main
220220 .cfi_endproc" ,
221221) ;
You can’t perform that action at this time.
0 commit comments