Skip to content

fix(riscv): decode HLVX.WU on RV32 with H extension - #304

Closed
carlosqwqqwq wants to merge 1 commit into
HexRaysSA:masterfrom
carlosqwqqwq:fix-riscv-hlvxwu-rv32
Closed

fix(riscv): decode HLVX.WU on RV32 with H extension#304
carlosqwqqwq wants to merge 1 commit into
HexRaysSA:masterfrom
carlosqwqqwq:fix-riscv-hlvxwu-rv32

Conversation

@carlosqwqqwq

Copy link
Copy Markdown
Contributor

Summary

HLVX.WU is valid on both RV32 and RV64 with the H extension, but decode_hypervisor_mem gates the (0x34, 3, _) arm with if rv64, rejecting the legal RV32 encoding as Op::Illegal. This change removes the gate so the encoding decodes on RV32 as well.

Validation

  • New regression test: hlvx_wu_valid_on_rv32_with_h — RV32+H decodes to Op::HlvxWu, RV64 decodes to Op::HlvxWu, and no-H stays illegal.
  • cargo test --lib targeted test passes; full suite shows no regressions.

Closes #299

@19h

19h commented Aug 22, 2026

Copy link
Copy Markdown
Member

Thank you for the report and implementation proposal. I independently reproduced and validated the accepted behavior, then reimplemented it with direct and SMIR/JIT coverage in #296 at commit 9027ae1. No contributor patch was imported; the consolidation commit records @carlosqwqqwq as co-author. I am closing this implementation PR because it is now consolidated into #296. Please review the rollup there.

@19h 19h closed this Aug 22, 2026
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.

HLVX.WU is rejected as illegal on RV32 with the H extension

2 participants