orc.b

Bitwise OR combine within bytes

Sets each byte of the first register to all 1 bits if the matching byte of the second is nonzero, and to 0 otherwise.

RISC-V manual: orc.b

Forms

  • orc.b ,

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.

Used to find a zero byte inside a word

.text
li t0, 16777728
# t0=0x01000200; orc.b writes 4278255360 (0xFF00FF00) to t2.
orc.b t2, t0