C.MV

Compressed Move

C.MV rd, rs2

Copies register rs2 to rd.

Details

Copies the value of rs2 (≠ x0) to rd (≠ x0). Equivalent to C.ADD rd, x0, rs2.

Pseudocode Operation

R[rd] = R[rs2];

Example

C.MV x10, x11

Encoding

Binary Layout
?
31:16
1000
15:12
rd_n0
11:7
c_rs2_n0
6:2
10
1:0
 
Format CR
Opcode 0x00008002
Extension C

Operands

  • rd
    Destination register (integer)
  • rs2
    Source