Skip to content

riscv: gate fmvh.x.d on RV32 - #300

Open
carlosqwqqwq wants to merge 1 commit into
LekKit:stagingfrom
carlosqwqqwq:fix/fmvh-rv32-gate
Open

riscv: gate fmvh.x.d on RV32#300
carlosqwqqwq wants to merge 1 commit into
LekKit:stagingfrom
carlosqwqqwq:fix/fmvh-rv32-gate

Conversation

@carlosqwqqwq

Copy link
Copy Markdown

riscv: gate fmvh.x.d on RV32

Fixes #291

Commit message

riscv: gate fmvh.x.d on RV32

Description

fmvh.x.d is a Zfa RV32 instruction. The RVVM decode branch currently checks rs2 == 1 without checking the configured XLEN, so the same code point is accepted on RV64. Add the missing !vm->rv64 condition; no other floating-point operation is changed.

Validation

  • Native RISC-V hardware and QEMU both trap 0xe2150553 (fmvh.x.d a0, fa0) on RV64; the patched build matches and retires only the RV32 form.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RV64 executes RV32-only Zfa fmvh.x.d instead of raising illegal instruction

1 participant