Webcentive RISC-V Reference

mop.rr.2

May-be-operation 2 (2 source registers)

Extension
Zimop
XLEN
RV32 and RV64
Assembly (riscv-unified-db)
mop.rr.2 xd, xs1, xs2
Length
32-bit

Encoding

listed in riscv-opcodes as a pseudo-op of mop.rr.N

313029282726252420191514121176210
1000101rs2rs1100rd1110011

Match 0x8a004073, mask 0xfe00707f. Source: $pseudo_op rv_zimop::mop.rr.N mop.rr.2 rd rs1 rs2 30=0 27=1 26=0 31=1 29..28=0 25=1 14..12=4 6..2=0x1C 1..0=3 in riscv-opcodes/extensions/rv_zimop.

FieldBitsriscv-opcodes name
rs224:20rs2
rs119:15rs1
rd11:7rd

Description

The Zimop extension defines 8 MOP instructions named MOP.RR.n, where n is an integer between 0 and 7, inclusive. Unless redefined by another extension, this instruction simply writes 0 to X[xd]. Its encoding allows future extensions to define it to read X[xs1] and X[xs2], as well as write X[xd].

This is mop.rr.2 from the MOP.RR instruction family (n=2).

Description from riscv-unified-db, reformatted.

Operation

X[xd] = 0;

Pseudocode in riscv-unified-db’s IDL, quoted unchanged.

Specification and related pages