orc

OR with Complement

orc RA,RS,RB
orc. RA,RS,RB

Performs a bitwise OR operation between the contents of two registers and the complement of the third register.

Details

The contents of register RS are ORed with the complement of the contents of register RB, and the result is placed into register RA.

Pseudocode 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.

Example

orc r4, r3, r5

Encoding

Binary Layout
31
0
RS
6
RA
11
RB
16
412
21
/
31
 
Format X-form
Opcode 0x7C000338
Extension Base
Registers Altered CR0

Operands

  • RA
    Target
  • RS
    Src A
  • RB
    Src B