orc
OR with Complement
orc RA,RS,RB
Performs a bitwise OR operation between the contents of two registers and the complement of the third register.
Encoding
Binary Layout
31
0:5
RS
6:10
RA
11:15
RB
16:20
412
21:30
/
31
Operands
-
RA
Target -
RS
Src A -
RB
Src B
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
The contents of register RS are ORed with the complement of the contents of register RB, and the result is placed into register RA.
Operation
if 'orc' then
RA <- (RS) | ¬(RB)
else if 'orc.' then
RA <- (RS) | ¬(RB)
CR0 <- result of OR operation
Programming Note
The orc instruction is useful for setting bits in a register based on the complement of another register. Be cautious with bit manipulation as incorrect usage can lead to unexpected results. The instruction operates at user privilege level and does not generate exceptions under normal conditions. Performance may vary depending on the specific implementation and architecture.