L_shlfts

Arithmetic left shift of 32-bit value by a specified shift amount. Saturation does occur during a left shift if required.

Note: This is not a bidirectional shift.
Assumptions

Assumed s_shftamount is positive.

OMR's SA bit was set to 1 at least three cycles before this code, that is, saturation on data ALU results enabled.

Prototype

  Word32 L_shlfts(Word32 lval2shft, Word16 s_shftamount)

  

  
Example
long result, l = 0x12345678;

short s1 = 3;



result = shlfts(l, s1);

// Expected value of result: 0x91A259E0