Skip to content

riscv: allow Zfa fli.d on RV32 - #283

Merged
LekKit merged 1 commit into
LekKit:stagingfrom
carlosqwqqwq:fix/flid-rv32-gate
Sep 21, 2026
Merged

LekKit merged 1 commit into
LekKit:stagingfrom
carlosqwqqwq:fix/flid-rv32-gate

Conversation

@carlosqwqqwq

@carlosqwqqwq carlosqwqqwq commented Aug 12, 2026

Copy link
Copy Markdown

riscv: allow Zfa fli.d on RV32

Fixes #278

Description

src/cpu/riscv_fpu.c, case 0xF2000000UL: move the fli.d branch out of the vm->rv64 check. fmv.d.x remains gated to RV64. No other decode path changes.

Validation

  • RV32 guest (rv32imafdc_zfa) probe with fli.d 1.0/fli.d 2.0/fli.s/fadd.s: patched RVVM output bit-identical to QEMU qemu-riscv32 -cpu max.
  • RV64 regression: fli.d/fround.d/fcvtmod probes byte-identical to pre-patch RV64 runs.

@LekKit
LekKit merged commit ef21f64 into LekKit:staging Sep 21, 2026
15 checks passed
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.

RVVM rejects legal Zfa fli.d on RV32 hosts (gated behind rv64)

2 participants