Encoding:

P32A

001000

rt

rs

rd

x

1111010

101

6

5

5

5

1

7

3

Format:

SHLLV_S.W rd, rt, rs

DSP

Shift Left Logical Variable Vector Word

Purpose:

Shift Left Logical Variable Vector Word

A left shift of the word in a vector data type by a variable number of bits, with optional saturation.

Description:

rd = sat32(rt31..0 << rs4..0)

The word element in register rt is shifted left by shift bits, inserting zeros into the least-significant bit positions emptied by the shift. If the shift results in an overflow the intermediate result is saturated to either the maximum positive or the minimum negative 32-bit value, depending on the sign of the original unshifted value.

The shifted result is then written to destination register rd.

The five least-significant bits of rs are used as the shift value, interpreted as a five-bit unsigned integer; the remaining bits of rs are ignored.

This instruction writes a 1 to bit 22 in the DSPControl register in the ouflag field if either of the left shift operations results in an overflow or saturation.

Restrictions:

No data-dependent exceptions are possible.

The operands must be values in the specified format. If they are not, the results are UNPREDICTABLE and the values of the operand vectors become UNPREDICTABLE.

Operation:

ValidateAccessToDSPResources()
temp31..0 = sat32ShiftLeft( GPR[rt]31..0, GPR[rs]4..0 )
GPR[rd]31..0 = temp31..0

Exceptions:

Reserved Instruction, DSP Disabled