C.MV

Compressed Move

C.MV rd, rs2

Copies register rs2 to rd.

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

Example

C.MV x10, x11

// Copy x11 to x10.

Related

More in C

Description

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

Operation

R[rd] = R[rs2];