MOP.R.5

RISC-V MOP.R.5 Instruction Details

Instruction ManualSYSTEM (Zimop MOP.R)

MOP.R.5 is a Zimop 1.0 may-be-operation; unless redefined, it writes zero to x[rd].

Instruction Syntax

mop.r.5 rd, rs1
Operand Breakdown
rd: the default semantics write 0 to x[rd]; with rd=x0 the architectural write is discarded and x0 remains 0.
rs1: an explicit register field in the recommended assembly syntax; the default Zimop definition does not read it and carries no syntactic dependency from rs1 to rd.
Bits 31..20 are a fixed MOP.R.n selector, not an assembly immediate and not a 12-bit signed value to sign-extend; only a future redefining extension may specify an rs1 read.
ZimopSystem & Privileged

Extension condition: RV32/RV64, requiring Zimop 1.0. Zero-writing below applies only when another extension has not redefined the encoding; it does not guarantee execution without Zimop.

Instruction Encoding

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

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

Format: Zimop MOP.R SYSTEM fields (n=5)
opcode: 1110011 (0x73)
funct3: 100 (0x4)
Fixed n selector (bits 31..20): 100001011101 (0x85d)

Instruction Behavior

MOP.R.5 has recommended syntax mop.r.5 rd, rs1; both operands accept x0–x31 and may overlap. Default Zimop behavior only writes zero to x[rd], without reading x[rs1] or carrying an rs1-to-rd syntactic dependency; rd=x0 leaves x0 at zero. Another extension may redefine the encoding to read rs1 and change architectural effects. Standard software should execute it only when deliberately targeting an extension that redefines this MOP.

Quick Understanding & Search Notes

MOP.R.5 is a Zimop 1.0 may-be-operation; unless redefined, it writes zero to x[rd].

Zimop 1.0 defines 32 MOP.R.n instructions (n=0–31); MOP.R.5 is the 32-bit instruction numbered 5.
Bits 31..20 are fixed to 100001011101 (0x85d); 19..15 hold rs1, 14..12 hold funct3=100, 11..7 hold rd, and 6..0 hold SYSTEM opcode=1110011.
The syntax has only two integer register operands, rd and rs1, with no immediate; any x-register is valid and they may overlap.
Unless redefined, the result is zero regardless of old rs1; rd=x0 leaves the hardwired zero register unchanged.

Common Usage Scenarios

Zimop extension compatibility

Default Zimop behavior only: mop.r.5 x5, x6 sets x5 to zero regardless of the old x6 value; x6 is unchanged. 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 and rs1; bits 31..20 are the fixed MOP.R.n selector, not an immediate.
  • Confirm any x-register is valid for rd or rs1; the default definition does not read rs1 and carries no syntactic rs1-to-rd dependency.
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

Unless redefined, default behavior writes zero; this is not a no-register-write NOP or HINT. rd=x0 does not guarantee that redefined effects disappear.
There is no immediate operand; the mnemonic suffix selects fixed encoding bits.
Default behavior does not read rs1 or carry an rs1-to-rd syntactic dependency; a redefining extension may specify otherwise.
Standard software should execute this MOP only when deliberately targeting an extension that redefines it.

FAQ

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

No. Unless redefined by another extension, mop.r.5 x5, x6 writes zero to x5 regardless of x6; x6 is unchanged. With rd=x0, x0 stays zero.

Does MOP.R.5 have an immediate operand?

No. The syntax is mop.r.5 rd, rs1; bits 31..20 are fixed to 0x85d, an instruction selector rather than a signed immediate.