orc (OR with Complement) instruction
Purpose
Logically ORs the contents of a general-purpose register with the complement of the contents of another general-purpose register and stores the result in a third general-purpose register.
Syntax
Bits | Value |
---|---|
0 - 5 | 31 |
6 - 10 | RS |
11 - 15 | RA |
16 - 20 | RB |
21 - 30 | 412 |
31 | Rc |
Description
The orc instruction logically ORs the contents of general-purpose register (GPR) RS with the complement of the contents of GPR RB and stores the result in GPR RA.
The orc instruction has two syntax forms. Each syntax form has a different effect on Condition Register Field 0.
Item | Description | |||
---|---|---|---|---|
Syntax Form | Overflow Exception (OE) | Fixed-Point Exception Register | Record Bit (Rc) | Condition Register Field 0 |
orc | None | None | 0 | None |
orc. | None | None | 1 | LT,GT,EQ,SO |
The two syntax forms of the orc instruction never affect the Fixed-Point Exception Register. If the syntax form sets the Record (Rc) bit to 1, the instruction affects the Less Than (LT) zero, Greater Than (GT) zero, Equal To (EQ) zero, and Summary Overflow (SO) bits in Condition Register Field 0.
Parameters
Item | Description |
---|---|
RA | Specifies target general-purpose register where result of operation is stored. |
RS | Specifies source general-purpose register for operation. |
RB | Specifies source general-purpose register for operation. |
Examples
- The following code logically ORs the contents of
GPR 4 with the complement of the contents of GPR 7 and stores the
result in GPR 6:
# Assume GPR 4 contains 0x9000 3000. # Assume GPR 7 contains 0x789A 789B, whose # complement is 0x8765 8764. orc 6,4,7 # GPR 6 now contains 0x9765 B764.
- The following code logically ORs the contents of
GPR 4 with the complement of the contents GPR 7, stores the result
in GPR 6, and sets Condition Register Field 0 to reflect the result
of the operation:
# Assume GPR 4 contains 0xB004 3000. # Assume GPR 7 contains 0x789A 789B, whose # complement is 0x8765 8764. orc. 6,4,7 # GPR 6 now contains 0xB765 B764.