TriCore
®
TC1.6P & TC1.6E
32-bit Unified Processor Core
Instruction Set
V1.0 2013-07
User Manual (Volume 2) 3-325
SAT.H
Saturate Half-word
Description
If the signed 32-bit value in D[a] is less than -32,768, then store the value -32,768 in D[c]. If D[a] is greater than
32,767, then store the value 32,767 in D[c]. Otherwise copy D[a] to D[c].
SAT.HD[c], D[a] (RR)
sat_neg = (D[a] < -8000
H
) ? -8000
H
: D[a];
D[c] = (sat_neg > 7FFF
H
) ? 7FFF
H
: sat_neg;
SAT.HD[a] (SR)
Status Flags
Examples
sat.h d3, d1
See Also
SAT.B, SAT.BU, SAT.HU
If the signed 32-bit value in D[a] is less than -32,768, then store the value -32,768 in D[a]. If D[a] is greater than
32,767, then store the value 32,767 in D[a]. Otherwise leave the contents of D[a] unchanged.
sat_neg = (D[a] < -8000
H
) ? -8000
H
: D[a];
D[a] = (sat_neg > 7FFF
H
) ? 7FFF
H
: sat_neg;
C Not set by this instruction.
V Not set by this instruction.
SV Not set by this instruction.
AV Not set by this instruction.
SAV Not set by this instruction.
sat.h d1
31
c
28 27
7E
H
20 19
-
18 17
-
16 15
-
12 11
a
8 7
0B
H
0