[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Assembler Language Reference

sle (Shift Left Extended) Instruction

Purpose

Shifts the contents of a general-purpose register to the left by a specified number of bits, puts a copy of the rotated data in the MQ Register, and places the result in another general-purpose register.

Note: The sle instruction is supported only in the POWER family architecture.

Syntax

Bits Value
0-5 31
6-10 RS
11-15 RA
16-20 RB
21-30 153
31 Rc
POWER family 
sle RA, RS, RB
sle. RA, RS, RB

Description

The sle instruction rotates the contents of the source general-purpose register (GPR) RS to the left by N bits, where N is the shift amount specified in bits 27-31 of GPR RB. The instruction also stores the rotated word in the MQ Register and the logical AND of the rotated word and the generated mask in GPR RA. The mask consists of 32 minus N ones followed by N zeros.

The sle 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
sle None None 0 None
sle. None None 1 LT,GT,EQ,SO

The two syntax forms of the sle 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

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

  1. The following code rotates the contents of GPR 4 to the left by 4 bits, places a copy of the rotated data in the MQ Register, and places the result of ANDing the rotated data with a mask into GPR 6:

    # Assume GPR 4 contains 0x9000 3000.
    # Assume GPR 5 contains 0x0000 0004.
    sle 6,4,5
    # GPR 6 now contains 0x0003 0000.
    # The MQ Register now contains 0x0003 0009.
  2. The following code rotates the contents of GPR 4 to the left by 4 bits, places a copy of the rotated data in the MQ Register, places the result of ANDing the rotated data with a mask into GPR 6, and sets Condition Register Field 0 to reflect the result of the operation:

    # Assume GPR 4 contains 0xB004 3000.
    # Assume GPR 5 contains 0x0000 0004.
    sle. 6,4,5
    # GPR 6 now contains 0x0043 0000.
    # The MQ Register now contains 0x0043 000B.
    # Condition Register Field 0 now contains 0x4.

Related Information

Fixed-Point Processor .

Fixed-Point Rotate and Shift Instructions .

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]