zext.h

Zero extend halfword

Sets the first register to the low 16 bits of the second, with the rest of the register cleared.

RISC-V manual: zext.h

Forms

  • zext.h ,

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.
.text
li t0, -1
# t0=-1; zext.h writes 65535 to t2.
zext.h t2, t0