orc.

OR with Complement (Record)

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
 
Format X-form
Opcode 0x7C000338
Extension Base

Operands

  • RA
    Target
  • RS
    Src A
  • RB
    Src B

Example

orc r4, r3, r5

Registers Altered

CR0

Related

More in Base

Reference

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.