add.uw

Add unsigned word RV64 only

Sets the first register to the low 32 bits of the second, zero-extended, plus the third.

RISC-V manual: add.uw

Forms

  • add.uw , ,

Operands

t1
Any integer register, x0 to x31, or its named alias, such as zero, t0 or t6.
t2
An integer register. It may be the same register as t1.
t3
An integer register. It may be the same register as t1.

Adds an unsigned 32 bit index to a 64 bit base without a separate zero extension

This example runs on RV64.

.text
li t0, -2147483647
li t1, 1
# t0=0xFFFFFFFF80000001 is treated as an unsigned low word, then t1=1 is added; add.uw writes 2147483650 to t2.
add.uw t2, t0, t1