ori or oril (OR Immediate) instruction

Purpose

Logically ORs the lower 16 bits of the contents of a general-purpose register with a 16-bit unsigned integer and stores the result in another general-purpose register.

Syntax

Bits Value
0 - 5 24
6 - 10 RS
11 - 15 RA
16 - 31 UI
PowerPC® 
ori RA, RS, UI
POWER® family 
oril RA, RS, UI

See Extended Mnemonics of Fixed-Point Logical Instructions for more information.

Description

The ori and oril instructions logically OR the contents of general-purpose register (GPR) RS with the concatenation of x'0000' and a 16-bit unsigned integer, UI, and place the result in GPR RA.

The ori and oril instructions have one syntax form and do not affect Condition Register Field 0 or the Fixed-Point Exception Register.

Parameters

Item Description
RA Specifies target general-purpose register where result of operation is stored.
RS Specifies source general-purpose register for operation.
UI Specifies a16-bit unsigned integer for operation.

Examples

The following code ORs the lower 16 bits of the contents of GPR 4 with 0x0079 and stores the result in GPR 6:


# Assume GPR 4 contains 0x9000 3000.
ori 6,4,0x0079
# GPR 6 now contains 0x9000 3079.