SAT
Saturate a 40-Bit Integer to a 32-Bit Integer
3-104
Syntax
SAT (.unit)
src2, dst
.unit = .L1 or .L2
Opcode map field used...
For operand type...
Unit
src2
dst
slong
sint
.L1, .L2
Opcode
31
29 28 27
23 22
18 17
creg
z
dst
13 12 11
5
4
3
2
1
0
x
1 0 0 0 0 0 0
1
1
0
s
p
3
5
5
5
7
src2
0 0 0 0 0
Description
A 40-bit
src2 value is converted to a 32-bit value. If the value in src2 is greater
than what can be represented in 32-bits,
src2 is saturated. The result is placed
in
dst. If a saturate occurs, the SAT bit in the control status register (CSR) is
set one cycle after
dst is written.
Execution
if (cond)
{
if (
src2
>
(2
31
– 1) )
(2
31
– 1)
→
dst
else if (
src2
<
–2
31
)
–2
31
→
dst
else
src2
31..0
→
dst
}
else
nop
Pipeline
Stage
E1
Read
src2
Written
dst
Unit in use
.L
Instruction Type
Single-cycle
Delay Slots
0
Pipeline