SAT

Saturation of signed 32-bit data

SAT

SATurate signed 32-bit data


[Syntax]

SAT dest

 

[Operation]

if ( O == 1 && S == 1 )

dest = 7FFFFFFFh;

else if ( O == 1 && S == 0 )

dest = 80000000h;

 

[Function]

-

This instruction rotates dest left or right the number of bits indicated by src. Bits overflowing from LSB (MSB) are transferred to MSB (LSB) and the C flag.

-

The direction of rotation is determined by the sign of src. If src is positive, bits are rotated left; if negative, bits are rotated right.

-

If src is an immediate value, the number of bits rotated is −8 to −1 or +1 to +8. Values less than −8, equal to 0, or greater than +8 are not valid.

-

If src is a register and (.B) is selected as the size specifier (.size), the number of bits rotated is −8 to +8. Although a value of 0 may be set, no bits are rotated and no flags are changed. If a value less than −8 or greater than +8 is set, the result of the rotation is undefined.

-

If src is a register and (.W) is selected as the size specifier (.size), the number of bits rotated is −16 to +16. Although a value of 0 may be set, no bits are rotated and no flags are changed. If a value less than −16 or greater than +16 is set, the result of the rotation is undefined.

 

[Instruction Format]

Syntax

Processng Size

Operand

Code Size

(Byte)

dest

SAT dest

L

Rd

2

 

[Flag Change]

-

This instruction does not affect the states of flags.

 

[Description Example]

SAT R1