Skip to content

riscv: canonicalize malformed half operands for fclass.h - #36

Open
carlosqwqqwq wants to merge 1 commit into
antmicro:masterfrom
carlosqwqqwq:958-fclass-h-nan-boxing
Open

riscv: canonicalize malformed half operands for fclass.h#36
carlosqwqqwq wants to merge 1 commit into
antmicro:masterfrom
carlosqwqqwq:958-fclass-h-nan-boxing

Conversation

@carlosqwqqwq

@carlosqwqqwq carlosqwqqwq commented Aug 11, 2026

Copy link
Copy Markdown

Summary

On RV64, a non-NaN-boxed half value is a canonical quiet NaN. The fclass.h translation path currently passes the raw FPR value to the classification helper, unlike the other half-precision paths. Unbox the operand before classification.

Validation

  • The malformed-operand witness returns the quiet-NaN class bit after the fix; the boxed control is unchanged.
  • Renode, QEMU and native RISC-V hardware controls agree.
  • The patch is limited to the fclass.h translation branch.

Fixes renode/renode#958

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.

fclass.h ignores NaN-boxing for malformed half operands

1 participant