fix(asm): encode RISC-V CALL sym(SB) as JAL
Assisted-by: DeepSeek V4 Pro
This commit is contained in:
@@ -82,6 +82,14 @@ Unreleased changes on the `development` branch.
|
||||
encoders were removed, and the `C.LUI` direct-instruction compression now
|
||||
uses the correct six-bit signed range. A byte-exact ground-truth test
|
||||
covers the branch family and jumps against `GOARCH=riscv64 go tool asm`.
|
||||
- **RISC-V `CALL sym(SB)`.** The call pseudo-instruction now emits the
|
||||
toolchain's `JAL X1, sym(SB)` with a single `R_RISCV_JAL` relocation
|
||||
(previously it emitted an `AUIPC`+`JALR` pair against a local branch
|
||||
label, a form `go tool asm` rejects). The GOOBJ and ELF emitters now map
|
||||
that relocation (Go objabi 59 / ELF `R_RISCV_JAL` 17, a 4-byte field), and
|
||||
relocation offsets are recorded relative to the function start (including
|
||||
the prologue). A byte-exact ground-truth test covers a call 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