C.ADD
Compressed Add
C.ADD rd, rs2
Adds two registers.
Encoding
Binary Layout
?
31:16
1001
15:12
rd_rs1_n0
11:7
c_rs2_n0
6:2
10
1:0
Operands
-
rd
Dest/Src1 -
rs2
Source register 2 (integer)
Example
C.ADD x10, x11
// x10 = x10 + x11
Related
More in C
Reference
View in RISC-V Unprivileged ISA Specification ↗
RISC-V ISA Manual
Description
Adds the value of a register to rd/rs1 and writes the result back to rd. 16-bit encoding of ADD.
Operation
R[rd] = R[rd] + R[rs2];