fix(asm): materialise RISC-V MOV immediates
This commit is contained in:
@@ -68,6 +68,13 @@ Unreleased changes on the `development` branch.
|
||||
`C.LUI`/`C.ADDIW` when their immediate fits six signed bits. The
|
||||
byte-exact ground-truth test covers positive, negative, and out-of-range
|
||||
immediates against `GOARCH=riscv64 go tool asm`.
|
||||
- **RISC-V `MOV $imm, rd` materialisation.** The immediate-loading
|
||||
pseudo-instruction now uses the toolchain's `Split32BitImmediate` split
|
||||
(previously it rounded the upper 20 bits, producing wrong results for
|
||||
negative and bit-11-set immediates) and compresses the emitted
|
||||
`ADDI`/`LUI`/`ADDIW` to `C.LI`/`C.LUI`/`C.ADDIW` when their immediate
|
||||
fits six signed bits. A byte-exact ground-truth test covers zero, small,
|
||||
negative, and 32-bit immediates against `GOARCH=riscv64 go tool asm`.
|
||||
- **Debugger watchpoint slots.** `gasm debug`'s `watch` command always used
|
||||
hardware watchpoint slot 0, so a second `watch` call silently overwrote
|
||||
the first. Watchpoint slots are now tracked in the `Session` (DR0–DR3);
|
||||
|
||||
Reference in New Issue
Block a user