Rotates the contents of a general-purpose register to the left by a specified number of bits, merges either the rotated data or a word of zeros with the contents of the MQ Register under control of a generated mask, and places the result in a general-purpose register.
Note: The srlq instruction is supported only in the POWER family architecture.
Bits | Value |
---|---|
0-5 | 31 |
6-10 | RS |
11-15 | RA |
16-20 | RB |
21-30 | 728 |
31 | Rc |
POWER family | |
---|---|
srlq | RA, RS, RB |
srlq. | RA, RS, RB |
The srlq instruction rotates the contents of the source general-purpose register (GPR) RS to the left 32 minus N bits, where N is the shift amount specified in bits 27-31 of GPR RB. The merge depends on the value of bit 26 in GPR RB.
Consider the following when using the srlq instruction:
The merged word is stored in GPR RA. The MQ Register is not altered.
The srlq 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 |
srlq | None | None | 0 | None |
srlq. | None | None | 1 | LT,GT,EQ,SO |
The two syntax forms of the srlq 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.
# Assume GPR 4 contains 0x9000 300F. # Assume GPR 8 contains 0x0000 0024. # Assume the MQ Register contains 0xFFFF FFFF. srlq 6,4,8 # GPR 6 now contains 0x0FFF FFFF. # The MQ Register remains unchanged.
# Assume GPR 4 contains 0xB004 3000. # Assume GPR 8 contains 0x00000 0004. # Assume the MQ Register contains 0xFFFF FFFF. srlq. 6,4,8 # GPR 6 now holds 0xFB00 4300. # The MQ Register remains unchanged. # Condition Register Field 0 now contains 0x8.
Fixed-Point Rotate and Shift Instructions .