orc.b sets the bits of each byte in the result rd to all zeros if no bit within the respective byte of rs is set, or to all ones if any bit within the respective byte of rs is set.
One use-case is string-processing functions, such as strlen and strcpy, which can use orc.b to test for the terminating zero byte by counting the set bits in leading non-zero bytes in a word.
RV32 | RV64 | Mnemonic | Instruction |
---|---|---|---|
✓ |
✓ |
orc.b rd, rs |