Saturate a 40-Bit Integer to a 32-Bit Integer SAT

Example 1

SAT .L2

B1:B0,B5

 

Before instruction

1 cycle after instruction

2 cycles after instruction

B1:B0 0000 001Fh 3413 539Ah B5 xxxx xxxxh

CSR 0001 0100h

B1:B0

B5

CSR

0000 001Fh 3413 539Ah

7FFF FFFFh

0001 0100h

B1:B0

B5

CSR

0000 001Fh

3413 539Ah

 

 

 

 

 

 

7FFF

FFFFh

 

 

 

 

 

 

 

0001

0300h

Saturated

 

 

 

Example 2

SAT .L2

B1:B0,B5

 

Before instruction

1 cycle after instruction

2 cycles after instruction

B1:B0 0000 0000h A190 7321h B5 xxxx xxxxh

CSR 0001 0100h

B1:B0

B5

CSR

0000 0000h A190 7321h

7FFF FFFFh

0001 0100h

B1:B0

B5

CSR

0000 0000h

A190 7321h

 

 

 

 

 

 

7FFF

FFFFh

 

 

 

 

 

 

 

0001

0300h

Saturated

 

 

 

Example 3

SAT .L2

B1:B0,B5

 

Before instruction

1 cycle after instruction

2 cycles after instruction

B1:B0 0000 00FFh A190 7321h B5 xxxx xxxxh

CSR 0001 0100h

B1:B0

B5

CSR

0000 00FFh A190 7321h

A190 7321h

0001 0100h

B1:B0

B5

CSR

0000 00FFh A190 7321h

A190 7321h

0001 0100h Not saturated

SPRU733

Instruction Set

3-209

Page 269
Image 269
Texas Instruments TMS320C67X/C67X+ DSP manual SAT .L2