diff options
| author | cheapie <cheapiephp@gmail.com> | 2026-11-12 17:55:10 -0600 |
|---|---|---|
| committer | cheapie <cheapiephp@gmail.com> | 2026-11-12 17:55:10 -0600 |
| commit | d9642b3b31bd15d460a179f620a75f6b1248be81 (patch) | |
| tree | 33876ddfa89528ed9e0b3357c3bb4e94495d81cd /rvcontroller.lua | |
| parent | 48f1ecd573e839a945c5920a74a7adb0b8577aaf (diff) | |
| download | rvcontroller-d9642b3b31bd15d460a179f620a75f6b1248be81.tar rvcontroller-d9642b3b31bd15d460a179f620a75f6b1248be81.tar.gz rvcontroller-d9642b3b31bd15d460a179f620a75f6b1248be81.tar.bz2 rvcontroller-d9642b3b31bd15d460a179f620a75f6b1248be81.tar.xz rvcontroller-d9642b3b31bd15d460a179f620a75f6b1248be81.zip | |
Fix sd instruction with rs2=x0
Diffstat (limited to 'rvcontroller.lua')
| -rw-r--r-- | rvcontroller.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rvcontroller.lua b/rvcontroller.lua index aad6e99..942504c 100644 --- a/rvcontroller.lua +++ b/rvcontroller.lua @@ -1274,7 +1274,7 @@ local operations = { if imm >= 2^11 then imm = imm - 2^12 end local address = getreg(rs1)+imm writeram(address+(mem.mbe and 4 or 0),getreg(rs2),4) - writeram(address+(mem.mbe and 0 or 4),getreg(rs2+1),4) + writeram(address+(mem.mbe and 0 or 4),getreg((rs2 == 0) and rs2 or rs2+1),4) end, ecall = function() local func = mem.isa.i and getreg(17) or getreg(15) |
