Which registers can C.ADD use?
The CR-format rd and rs2 fields are full 5-bit fields, so the encoding can name registers x0-x31; regular C.ADD semantics require both rd and rs2 not to be x0.
Regular C.ADD adds rd and rs2 and writes the result to rd. CR format; both rd and rs2 must be nonzero.
Extension condition: C (or Zca) on RV32I/RV64I; 16-bit encoding, IALIGN=16. The animation assumes successful instruction fetch and no asynchronous interrupt.
C.ADD (CR format, with access to all 32 registers) adds rd and rs2 and writes the result to rd, equivalent to add rd, rd, rs2. Regular C.ADD requires rd!=x0 and rs2!=x0: with rs2=x0, rd!=x0 encodes C.JALR and rd=x0 encodes C.EBREAK. With nonzero rs2 and rd=x0, the encoding is normally a HINT; when Zihintntl is implemented, rs2=x2-x5 instead encode C.NTL.P1, C.NTL.PALL, C.NTL.S1, and C.NTL.ALL.
RV32I/RV64I + C (or Zca), 16-bit encoding, IALIGN=16.
c.add rd, rs20x952E = 1001010100101110Restore full register fields and the immediate, distinguishing ordinary instructions, HINTs, and shared encodings.
These are teaching steps for architectural effects, not processor pipeline stages or cycles.
C.ADD uses the CR format and writes rd + rs2 back to rd; the regular C.ADD form requires both rd and rs2 not to be x0.
RV32I/RV64I + C/Zca, old x10=7 and x11=9: c.add x10, x11 yields x10=16, leaves x11 unchanged, and advances PC by 2.
The CR-format rd and rs2 fields are full 5-bit fields, so the encoding can name registers x0-x31; regular C.ADD semantics require both rd and rs2 not to be x0.