Skip to content

riscv: reject scalar M instructions without the M extension - #39

Open
carlosqwqqwq wants to merge 1 commit into
antmicro:masterfrom
carlosqwqqwq:961-scalar-m-extension-gate
Open

riscv: reject scalar M instructions without the M extension#39
carlosqwqqwq wants to merge 1 commit into
antmicro:masterfrom
carlosqwqqwq:961-scalar-m-extension-gate

Conversation

@carlosqwqqwq

@carlosqwqqwq carlosqwqqwq commented Aug 11, 2026

Copy link
Copy Markdown

Summary

The ordinary OP/OP-W M translator family does not enforce the M extension gate. Add the gate before lowering the family, without changing legal M-enabled execution or the separate compressed Zcb checks.

Validation

  • The M-disabled profile traps the raw MUL witness after the fix; M-enabled QEMU and native controls remain legal.
  • The patch is limited to the scalar M translation family.

Fixes renode/renode#961

Public reproduction and integration

The corresponding public Robot reproduction is available at
https://github.com/carlosqwqqwq/renode-issue-reproduction-template/tree/main.
The focused change is also included in the combined integration branch in
tlib #44, followed by
renode-infrastructure #245
and Renode #989.

@carlosqwqqwq
carlosqwqqwq force-pushed the 961-scalar-m-extension-gate branch from 1e8325c to 1648fa7 Compare September 7, 2026 16:19
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.

Renode executes scalar M instructions on an RV64 CPU without M

1 participant