Saturate a 40-Bit Integer to a 32-Bit Integer SAT
3-209 Instruction SetSPRU733
Example 1 SAT .L2 B1:B0,B5
Before instruction 1 cycle after instruction 2 cycles after instruction
B1:B0
0000 001Fh
3413 539Ah B1:B0 0000 001Fh 3413 539Ah B1:B0 0000 001Fh 3413 539Ah
B5 xxxx xxxxh B5 7FFF FFFFh B5 7FFF FFFFh
CSR 0001 0100h CSR 0001 0100h CSR 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 B1:B0 0000 0000h A190 7321h B1:B0 0000 0000h A190 7321h
B5 xxxx xxxxh B5 7FFF FFFFh B5 7FFF FFFFh
CSR 0001 0100h CSR 0001 0100h CSR 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 B1:B0 0000 00FFh A190 7321h B1:B0 0000 00FFh A190 7321h
B5 xxxx xxxxh B5 A190 7321h B5 A190 7321h
CSR 0001 0100h CSR 0001 0100h CSR 0001 0100h Not saturated