| P32A 001000 | rt | rs | sa | x | 1111110 | 101 | 
| 6 | 5 | 5 | 5 | 1 | 7 | 3 | 
| SHLL_S.W rt, rs, sa | DSP | Shift Left Logical Word with Saturation | 
Shift Left Logical Word with Saturation
To execute a left shift of a word with saturation by a fixed number of bits.
rt = sat32(rs << sa)
The 32-bit word in register rs is shifted left by sa bits, with zeros inserted into the bit positions emptied by the shift. If the shift results in a signed overflow, the shifted result is saturated to either the maximum positive (hexadecimal
0x7FFFFFFF) or minimum negative (hexadecimal 0x80000000) 32-bit value, depending on the sign of the original unshifted value. The shifted result is then written to destination register rt.
The instruction’s sa field specifies the shift value, interpreted as a five-bit unsigned integer.
If the shift operation results in an overflow and saturation, this instruction writes a 1 to bit 22 of the DSPControl register within the ouflag field.
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.
ValidateAccessToDSPResources()
temp31..0 = sat32ShiftLeft( GPR[rs]31..0, sa4..0 )
GPR[rt]31..0 = temp31..0
function sat32ShiftLeft( a13..0, s4..0 )
   if ( s = 0 ) then
      temp31..0 = a
   else
      sign = a31
      temp31..0 = ( a31-s..0 || 0s )
      discard31..0 = ( sign(32-s) || a30..30-(s-1) )
      if (( discard31..0 != 0x00000000 ) and ( discard31..0 != 0xFFFFFFFF )) then
          temp31..0 = ( sign = 0 ? 0x7FFFFFFF : 0x80000000 )
          DSPControlouflag:22 = 1
      endif
   endif
   return temp31..0
endfunction sat32ShiftLeft
Reserved Instruction, DSP Disabled
To do a logical left shift of a word in a register without saturation, use the MIPS32 SLL instruction.