MOP.RR.5

RISC-V MOP.RR.5 Instruction Details

Instruction ManualZimop MOP.RR SYSTEM fields

MOP.RR.5 writes zero to rd under its default Zimop definition; a redefining extension may use rs1 and rs2.

Instruction Syntax

mop.rr.5 rd, rs1, rs2
Operand Breakdown
rd: the default semantics write 0 to x[rd]; with rd=x0 the architectural write is discarded and x0 remains 0.
rs1 and rs2: explicit register fields in the recommended assembly syntax; the default Zimop definition reads neither and carries no syntactic dependency from either source to rd.
Bits 31..25 are a fixed MOP.RR.n selector; only a future redefining extension may specify reads of rs1, rs2, or both.
ZimopSystem & Privileged

Instruction Encoding

31..25
fixed n selector
24..20
rs2
19..15
rs1
14..12
funct3
11..7
rd
6..0
opcode

MOP.RR.5 uses opcode 1110011 (0x73), funct3 100, fixed n selector 1100011. MOP.RR.n uses SYSTEM fields: bits 31..25 are the fixed n selector, rs2, rs1, and rd are explicit register fields, funct3=100, and opcode=SYSTEM. The default definition writes only 0 to x[rd]; neither rs1 nor rs2 is a default read source.

Format: Zimop MOP.RR SYSTEM fields (n=5)
opcode: 1110011 (0x73)
funct3: 100 (0x4)
fixed n selector: 1100011 (0x63)

Instruction Behavior

MOP.RR.5 is a Zimop may-be-operation with recommended syntax mop.rr.5 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. In RV32/RV64, rd may be x0, in which case x0 remains zero; register overlap does not turn the default behavior into a copy or computation.

Quick Understanding & Search Notes

MOP.RR.5 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.
In the 32-bit SYSTEM encoding, bits 31..25 are fixed to 1100011; rs2, rs1, and rd are explicit 5-bit fields, funct3=100, and opcode=1110011.
The Zimop 1.0 default semantics apply to RV32/RV64: the result is XLEN-bit zero, with no arithmetic on the source fields.

Common Usage Scenarios

System & Privileged

Assume RV32/RV64 Zimop 1.0 is implemented and no redefinition applies: mop.rr.5 x5, x6, x7 writes x5=0 regardless of old x6 and x7; x6 and x7 are unchanged. Overlapping rd with a source field still writes zero; rd=x0 leaves x0 zero. Standard software should execute it only when deliberately targeting an extension that redefines this MOP.

Extension Compatibility

Assume RV32/RV64 Zimop 1.0 is implemented and no redefinition applies: mop.rr.5 x5, x6, x7 writes x5=0 regardless of old x6 and x7; x6 and x7 are unchanged. Overlapping rd with a source field still writes zero; rd=x0 leaves x0 zero. Standard software should execute it only when deliberately targeting an extension that redefines this MOP.

Pre-Use Checklist

Syntax Check
  • Confirm the assembly syntax has only rd, rs1, and rs2; bits 31..25 are the fixed MOP.RR.n selector, not an ordinary R-type funct7 operation.
  • Confirm any x-register is valid for all three fields; the default definition reads neither rs1 nor rs2 and carries no syntactic dependency from either source to rd.
Semantic Check
  • Confirm that, unless another extension has redefined it, the instruction only writes 0 to x[rd]; with rd=x0, x0 remains 0.
  • Do not assume a specific future redefining operation; standard software should execute this MOP only when deliberately targeting that redefining extension.

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.5 write rd by default?

Yes, when the default Zimop definition applies; with rd=x0, x0 remains zero. Use the redefining extension’s semantics when applicable.

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

Both write zero by default. The recommended MOP.RR syntax has rd, rs1, and rs2, allowing a redefining extension to use two sources; MOP.R has rd and rs1, allowing one source.