Rotates bit 0 in a general-purpose register to the right by the number of bits specified by another general-purpose register and stores the rotated bit in a third general-purpose register.
Note: The rrib instruction is supported only in the POWER architecture.
The rrib instruction rotates bit 0 of the source general-purpose register (GPR) RS to the right by the number of bits specified by bits 27-31 of GPR RB and then stores the rotated bit in GPR RA.
The rrib instruction has two syntax forms. Each syntax form has a different effect on Condition Register Field 0.
|Syntax Form||Overflow Exception (OE)||Fixed-Point Exception Register||Record Bit (Rc)||Condition Register Field 0|
The two syntax forms of the rrib 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.
|RA||Specifies target general-purpose register where result of operation is stored.|
|RS||Specifies source general-purpose register for operation.|
|RB||Specifies general-purpose register that contains the number of bits for rotation of data.|
# Assume GPR 5 contains 0x0000 0000. # Assume GPR 6 contains 0x0000 0004. # Assume GPR 4 contains 0xFFFF FFFF. rrib 4,5,6 # GPR 4 now contains 0xF7FF FFFF.
# Assume GPR 5 contains 0xB004 3000. # Assume GPR 6 contains 0x0000 0004. # Assume GPR 4 contains 0x0000 0000. rrib. 4,5,6 # GPR 4 now contains 0x0800 0000.
Fixed-Point Rotate and Shift Instructions.