diff --git a/rvgo/fast/vm.go b/rvgo/fast/vm.go index 504ddd1..ce4b26f 100644 --- a/rvgo/fast/vm.go +++ b/rvgo/fast/vm.go @@ -632,7 +632,8 @@ func (inst *InstrumentedState) riscvStep() (outErr error) { pc = add64(pc, imm) } - if pc&3 != 0 { // quick target alignment check + // The PC must be aligned to 4 bytes. + if pc&3 != 0 { revertWithCode(riscv.ErrNotAlignedAddr, fmt.Errorf("pc %d not aligned with 4 bytes", pc)) }