TriCore
®
TC1.6P & TC1.6E
32-bit Unified Processor Core
Instruction Set
V1.0 2013-07
User Manual (Volume 2) 3-120
IXMIN
Find Minimum Index
IXMIN.U
Find Minimum Index (unsigned)
Description
Enables search of minimum value and its related index in a vector of 16-bit signed (IXMIN) or unsigned (IXMIN.U)
values.
The IXMIN and IXMIN.U instructions are not available in the TriCore 1.2 Architecture.
For all operations:
• E[d][15:0] Working index.
• E[d][31:16] Current index of minimum.
• E[d][47:32] Current value of minimum.
• E[d][63:48] 00
H
.
• D[b][15:0] First compare value.
• D[b][31:16] Second compare value.
• E[c][15:0] Update working index.
• E[c][31:16] Update index of minimum.
• E[c][47:32] Update value of minimum.
• E[c][63:48] 00
H
.
IXMINE[c], E[d], D[b] (RRR)
E[c][15:0] = E[d][15:0] + 2;
E[c][63:48] = 00
H
;
if (D[b][15:0] <= D[b][31:16]) AND (D[b][15:0] < E[d][47:32]) then {
E[c][47:32] = D[b][15:0];
E[c][31:16] = E[d][15:0];
} else if (D[b][31:16] < D[b][15:0]) AND (D[b][31:16] < E[d][47:32]) then {
E[c][47:32] = D[b][31:16];
E[c][31:16] = E[d][15:0]+1;
} else {
E[c][47:32] = E[d][47:32];
E[c][31:16] = E[d][31:16];
}
IXMIN.UE[c], E[d], D[b] (RRR)
For IXMIN.U, the comparison is on unsigned numbers.
E[c][15:0] = E[d][15:0] + 2;
E[c][63:48] = 00
H
;
31
c
28 27
d
24 23
08
H
20 19
-
18 17
0
H
16 15
b
12 11
-
8 7
6B
H
0
31
c
28 27
d
24 23
09
H
20 19
-
18 17
0
H
16 15
b
12 11
-
8 7
6B
H
0