Skip to content

riscv: write zero for default Zimop MOPs - #311

Open
carlosqwqqwq wants to merge 1 commit into
LekKit:stagingfrom
carlosqwqqwq:fix/zimop-mop-zero
Open

riscv: write zero for default Zimop MOPs#311
carlosqwqqwq wants to merge 1 commit into
LekKit:stagingfrom
carlosqwqqwq:fix/zimop-mop-zero

Conversation

@carlosqwqqwq

Copy link
Copy Markdown

riscv: write zero for default Zimop MOPs

Fixes #305

Commit message

riscv: write zero for default Zimop MOPs

Description

The accepted mop.r/mop.rr decode path returns without performing the architectural default writeback. The Zimop default operation writes zero to x[rd]; add that writeback while leaving extension-admission policy unchanged. The change is limited to src/cpu/riscv_priv.c and applies independently to the staging branch.

Validation

  • Native RISC-V hardware and QEMU are the references; disabled-extension code points trap, while the default Zimop operation writes rd = 0 on the mop.r.0, mop.r.31, mop.rr.0 and mop.rr.7 witnesses.

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.

mop.r / mop.rr preserve rd instead of trapping or zeroing it

1 participant