ADD.UW
Add Unsigned Word
ADD.UW rd, rs1, rs2
Zero-extends the lower 32 bits of rs1 and adds it to rs2. Useful for 64-bit address calculations with 32-bit unsigned indices.
Encoding
Binary Layout
0000100
31:25
rs2
24:20
rs1
19:15
000
14:12
rd
11:7
0111011
6:0
Operands
-
rd
Destination register (integer) -
rs1
Index (32-bit) -
rs2
Base
Example
ADD.UW x10, x11, x12
// x10 = x12 + (uint32_t)x11
Related
More in Zba
Reference
View in RISC-V Unprivileged ISA Specification ↗
RISC-V ISA Manual
Description
ADD.UW zero-extends the lower 32 bits of rs1 to XLEN bits, adds the result to rs2, and writes to rd. Used for pointer arithmetic with zero-extended 32-bit offsets.
Operation
R[rd] = R[rs2] + zext(R[rs1][31:0]);