Skip to content

Trap reserved vfrdiv.vf encoding as illegal-instruction#743

Open
yc199911 wants to merge 1 commit into
sysprog21:masterfrom
yc199911:fix-vfrdiv-reserved
Open

Trap reserved vfrdiv.vf encoding as illegal-instruction#743
yc199911 wants to merge 1 commit into
sysprog21:masterfrom
yc199911:fix-vfrdiv-reserved

Conversation

@yc199911

@yc199911 yc199911 commented May 20, 2026

Copy link
Copy Markdown
Contributor

The reserved encoding (funct6=0x21, funct3=1, OPFVV) was decoded
as vfrdiv.vf in op_100001 case 1, executing the FP divide kernel
instead of trapping. Per riscv-opcodes, vfrdiv.vf is defined only
at funct3=5 (OPFVF). Return false in case 1.


Summary by cubic

Fix incorrect decode of reserved vfrdiv.vf encoding: OPFVV with funct6=0x21, funct3=1 now returns false to trigger an illegal-instruction trap. Per RISC-V V 1.0, vfrdiv.vf is only valid in OPFVF with funct3=5.

Written for commit 8656e04. Summary will update on new commits. Review in cubic

The reserved encoding (funct6=0x21, funct3=1, OPFVV) was decoded
as vfrdiv.vf in op_100001 case 1, executing the FP divide kernel
instead of trapping. Per riscv-opcodes, vfrdiv.vf is defined only
at funct3=5 (OPFVF). Return false in case 1.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Re-trigger cubic

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.

1 participant