TriCore
®
TC1.6P & TC1.6E
32-bit Unified Processor Core
Instruction Set
V1.0 2013-07
User Manual (Volume 2) 3-71
CLS.H
Count Leading Signs in Packed Half-words
Description
Count the number of consecutive bits in each half-word in data register D[a] which have the same value as the
most-significant bit in that half-word, starting with the next bit right of the most-significant bit. Put each result in the
corresponding half-word of D[c].
The results are the number of leading sign bits minus one in each half-word, giving the number of redundant sign
bits in the half-words of D[a].
CLS.HD[c], D[a] (RR)
result_halfword1 = zero_ext(leading_signs(D[a][31:16]) - 1);
result_halfword0 = zero_ext(leading_signs(D[a][15:0]) - 1);
D[c] = {result_halfword1[15:0],result_halfword0[15:0]};
Status Flags
Examples
cls.h d3, d1
See Also
CLO, CLO.H, CLS, CLZ, CLZ.H
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.
31
c
28 27
7E
H
20 19
-
18 17
-
16 15
-
12 11
a
8 7
0F
H
0