Skip to content

Commit

Permalink
HACK(RVE): use a5 instead of t3 for RAM init
Browse files Browse the repository at this point in the history
RVE does not support registers x16--x31, including t3 (x28). I replaced
the use of t3 in the flash algorithm with a5 (x15) to make it compile.
  • Loading branch information
hegza committed Mar 7, 2024
1 parent ebab8f7 commit cac0390
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions riscv-rt/src/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ cfg_global_asm!(
bgeu t0, t2, 2f
1: ",
#[cfg(target_arch = "riscv32")]
"lw t3, 0(t1)
"lw a5, 0(t1)
addi t1, t1, 4
sw t3, 0(t0)
sw a5, 0(t0)
addi t0, t0, 4
bltu t0, t2, 1b",
#[cfg(target_arch = "riscv64")]
Expand Down

0 comments on commit cac0390

Please sign in to comment.