SHL : Shift Left

Format

SPA 5.0:
        {@{!}Pg}   SHL{.mode}{.X}   Rd{.CC},Ra,Sb   {&req_6}   {?sched}   ;   

.mode:      { .W, .C* } 
            .C (Clamp): Sb is treated as an unsigned integer and is clamped to (0-32).
            .W (Wrap):  Sb is treated as an unsigned integer and is masked by 0x001f

.X:         Extended precision shift

.CC:        Write condition codes


SHL allows the following source Sb:
    Sb(register)
    Sb(constant with immediate address)
    Sb(#IMM20)

Description

Shift Ra left by contents of Sb. The lsb insertion is always 0.

An extended-precision left shift is performed by processing words in order from most-significant to least-significant. At the end of the extended-precision shift sequence, the condition code flags reflect the overall multi-word result. The sign, carry, and overflow flags are set by the initial left shift instruction. The zero flag value is accumulated by shift instructions in .X mode.

Examples:

SHL.C R0,R1,R7;
SHL   R0,R1,0x6;

Back to Index of Instructions