MOP.R.4

RISC-V MOP.R.4 Instruction Details

Instruction ManualI-type

Zimop MOP.R.4; by default writes zero to rd and may be redefined to read rs1 and write rd.

Instruction Syntax

mop.r.4 rd, rs1
Operand Breakdown
Destination rd: general-purpose register receiving the result.
Source rs1: register holding the first operand.
Immediate imm: 12-bit signed value, sign-extended before operation with rs1.
ZimopSystem & Privileged

Instruction Behavior

MOP.R.4 is a Zimop may-be-operation with recommended syntax mop.r.4 rd, rs1. If no other extension redefines the encoding, the official default behavior writes 0 to x[rd]. The encoding space allows future extensions to define it as reading x[rs1] and writing x[rd]. Standard software should not execute a MOP unless deliberately targeting an extension that redefines it.

Quick Understanding & Search Notes

MOP.R.4 is a Zimop compatible encoding reserved for future extensions; when not redefined, its visible result is rd receiving zero.

The official extension defines 32 MOP.R.n instructions numbered 0 through 31.
MOP.R.n allows a future extension to read rs1 and write rd, but by default it does not read rs1 and creates no rs1-to-rd syntactic dependency.

Common Usage Scenarios

System & Privileged

Understand this scenario with real code like «mop.r.4 t0, t1».

Extension Compatibility

Understand this scenario with real code like «mop.r.4 t0, t1».

Pre-Use Checklist

Syntax Check
  • Confirm the current instruction format is I-type.
  • Confirm the operand order matches the example.
Semantic Check
  • Ensure the destination register usage is compatible with the calling convention.
  • Confirm this is not the lower-level form of a pseudo-instruction expansion.

Pitfalls / Common Confusions

The default is not a true no-register-write NOP; MOP.R.n writes zero to rd by default.
Default Zimop MOPs carry no syntactic dependency from rs1 to rd; a redefining extension may specify otherwise.
MOP encodings are in the SYSTEM major opcode; ordinary software should not treat them as regular integer instructions.

FAQ

Is MOP.R.4 a pure no-op by default?

No. The official Zimop rule says it writes zero to rd by default.

Should ordinary software execute MOP.R.4?

No, unless the software deliberately targets an extension that redefines that MOP.