MOP.RR.2

RISC-V MOP.RR.2 Instruction Details

Instruction ManualR-type

Zimop MOP.RR.2; by default writes zero to rd and may be redefined to read rs1/rs2 and write rd.

Instruction Syntax

mop.rr.2 rd, rs1, rs2
Operand Breakdown
Destination rd: register receiving the operation result.
Source rs1: register holding the first operand.
Source rs2: register holding the second operand.
ZimopSystem & Privileged

Instruction Behavior

MOP.RR.2 is a Zimop may-be-operation with recommended syntax mop.rr.2 rd, rs1, rs2. 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 x[rs2] and writing x[rd]. Standard software should not execute a MOP unless deliberately targeting an extension that redefines it.

Quick Understanding & Search Notes

MOP.RR.2 is a three-register Zimop MOP encoding; when not redefined, it writes zero to rd.

The official extension defines 8 MOP.RR.n instructions numbered 0 through 7.
MOP.RR.n allows a future extension to read rs1/rs2 and write rd, but by default it reads no source registers and creates no source-to-destination syntactic dependency.

Common Usage Scenarios

System & Privileged

Understand this scenario with real code like «mop.rr.2 t0, t1, t2».

Extension Compatibility

Understand this scenario with real code like «mop.rr.2 t0, t1, t2».

Pre-Use Checklist

Syntax Check
  • Confirm the current instruction format is R-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.RR.n writes zero to rd by default.
Default Zimop MOPs carry no syntactic dependency from rs1/rs2 to rd; a redefining extension may specify otherwise.
Zimop defines only MOP.RR.0 through MOP.RR.7.

FAQ

Does MOP.RR.2 write rd by default?

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

How is MOP.RR.2 different from MOP.R.2?

MOP.RR is reserved for future extensions that may read two source registers; MOP.R is reserved for future extensions that may read one source register.