← Home

c.addw

Add word

Add the 32-bit values in xs2 from xd, and store the result in xd. The xd and xs2 register indexes should be used as xd+8 and xs2+8 (registers x8-x15). C.ADDW expands into `addw xd, xd, xs2`.

This instruction has data-independent execution timing.

Assembly format

c.addw xd, xs2

Encoding

1514131211109876543210
100111xd01xs201

Decode variables

VariableBitsWidth
xs2[4:2]3
xd[9:7]3

Execution

Bits<32> t0 = X[creg2reg(xd)][31:0];
Bits<32> t1 = X[creg2reg(xs2)][31:0];
X[creg2reg(xd)] = $signed(t0 + t1);

Defined by

RV64 and Zca

Access

SUVSVU
AlwaysAlwaysAlwaysAlways

Version af3eaf9+cheriot.f635218

Data from the RISC-V Unified Database, copyright RISC-V International and contributors.

CHERIoT extensions from the CHERIoT specification and Sail model, copyright Microsoft and the CHERIoT Platform contributors.

This site is provided as a community resource and is NOT affiliated with nor endorsed by RISC-V International.