Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 535 Bytes

_or_combine.adoc

File metadata and controls

18 lines (14 loc) · 535 Bytes

OR Combine

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

[insns-orc_b]