Webcentive RISC-V Reference

Zcmop instructions

Compressed May-Be-Operations

The "Zcmop" extension, which defines eight 16-bit MOP instructions named C.MOP.n, where n is an odd integer between 1 and 15, inclusive. C.MOP.n is encoded in the reserved encoding space corresponding to C.LUI xn, 0, as shown in c mop. Unlike the MOPs defined in the Zimop extension, the C.MOP.n instructions are defined to not write any register. Their encoding allows future extensions to define them to read register x[__n__].

The Zcmop extension depends upon the Zca extension.

Note: Very few suitable 16-bit encoding spaces exist. This space was chosen because it already has unusual behavior with respect to the rd/rs1 field--it encodes c.addi16sp when the field contains x2--and is therefore of lower value for most purposes.

C.MOP.n instruction encoding.

MnemonicEncodingRedefinable to read register
C.MOP.10110000010000001x1
C.MOP.30110000110000001x3
C.MOP.50110001010000001x5
C.MOP.70110001110000001x7
C.MOP.90110010010000001x9
C.MOP.110110010110000001x11
C.MOP.130110011010000001x13
C.MOP.150110011110000001x15

Note: The recommended assembly syntax for C.MOP.n is simply the nullary C.MOP.n. The possibly accessed register is implicitly x__n__.

Note: The expectation is that each Zcmop instruction is equivalent to some Zimop instruction, but the choice of expansion (if any) is left to the extension that redefines the MOP. Note, a Zcmop instruction that does not write a value can expand into a write to x0.

Extension description from riscv-unified-db, reformatted.

Specification chapter: The RISC-V Instruction Set Manual, src/unpriv/zcmop.adoc.

Instructions (9)

MnemonicName (riscv-unified-db)XLEN
c.mop.1Compressed May-Be-Operation 1 (pseudo-op)RV32 and RV64
c.mop.3Compressed May-Be-Operation 3 (pseudo-op)RV32 and RV64
c.mop.5Compressed May-Be-Operation 5 (pseudo-op)RV32 and RV64
c.mop.7Compressed May-Be-Operation 7 (pseudo-op)RV32 and RV64
c.mop.9Compressed May-Be-Operation 9 (pseudo-op)RV32 and RV64
c.mop.11Compressed May-Be-Operation 11 (pseudo-op)RV32 and RV64
c.mop.13Compressed May-Be-Operation 13 (pseudo-op)RV32 and RV64
c.mop.15Compressed May-Be-Operation 15 (pseudo-op)RV32 and RV64
c.mop.NRV32 and RV64