smin
Multi-vector Signed Minimum (SME2)
SMIN { <Zdn1>.<T>-<Zdn2>.<T> }, { <Zdn1>.<T>-<Zdn2>.<T> }, { <Zm1>.<T>-<Zm2>.<T> }
Signed minimum of 2 or 4 vectors.
Pseudocode Operation
No pseudocode available.
Reference
View in Arm A64 ISA Reference ↗
Arm A64 ISA
Instruction Forms
| Encoding | Instruction | ISA | Bit pattern | ||
|---|---|---|---|---|---|
| 0x0E206C00 | SMIN <Vd>.<T>, <Vn>.<T>, <Vm>.<T> | A64 | 0 | Q | 0 | 01110 | size | 1 | Rm | 0110 | 1 | 1 | Rn | Rd | ||
| 0x11C80000 | SMIN <Wd>, <Wn>, #<simm> | A64 | 0 | 0 | 0 | 1000111 | 0010 | imm8 | Rn | Rd | ||
| 0x91C80000 | SMIN <Xd>, <Xn>, #<simm> | A64 | 1 | 0 | 0 | 1000111 | 0010 | imm8 | Rn | Rd | ||
| 0xC120A020 | SMIN { <Zdn1>.<T>-<Zdn2>.<T> }, { <Zdn1>.<T>-<Zdn2>.<T> }, <Zm>.<T> | A64 | 11000001 | size | 10 | Zm | 101000 | 0000 | 1 | Zdn | 0 | ||
| 0xC120A820 | SMIN { <Zdn1>.<T>-<Zdn4>.<T> }, { <Zdn1>.<T>-<Zdn4>.<T> }, <Zm>.<T> | A64 | 11000001 | size | 10 | Zm | 101010 | 0000 | 1 | Zdn | 0 | 0 | ||
| 0xC120B020 | SMIN { <Zdn1>.<T>-<Zdn2>.<T> }, { <Zdn1>.<T>-<Zdn2>.<T> }, { <Zm1>.<T>-<Zm2>.<T> } | A64 | 11000001 | size | 1 | Zm | 0101100 | 000 | 0 | 1 | Zdn | 0 | ||
| 0xC120B820 | SMIN { <Zdn1>.<T>-<Zdn4>.<T> }, { <Zdn1>.<T>-<Zdn4>.<T> }, { <Zm1>.<T>-<Zm4>.<T> } | A64 | 11000001 | size | 1 | Zm | 00101110 | 000 | 0 | 1 | Zdn | 0 | 0 | ||
| 0x1AC06800 | SMIN <Wd>, <Wn>, <Wm> | A64 | 0 | 0 | 0 | 11010110 | Rm | 011010 | Rn | Rd | ||
| 0x9AC06800 | SMIN <Xd>, <Xn>, <Xm> | A64 | 1 | 0 | 0 | 11010110 | Rm | 011010 | Rn | Rd | ||
| 0x040A0000 | SMIN <Zdn>.<T>, <Pg>/M, <Zdn>.<T>, <Zm>.<T> | A64 | 00000100 | size | 001 | 0 | 1 | 0 | 000 | Pg | Zm | Zdn | ||
| 0x252AC000 | SMIN <Zdn>.<T>, <Zdn>.<T>, #<imm> | A64 | 00100101 | size | 101 | 01 | 0 | 11 | 0 | imm8 | Zdn |
Description
Determine the signed minimum of elements of the two or four second source vectors and the corresponding elements of the two or four first source vectors and destructively place the results in the corresponding elements of the two or four first source vectors. This instruction is unpredicated.
Operation
CheckStreamingSVEEnabled();
constant integer VL = CurrentVL;
constant integer elements = VL DIV esize;
array [0..3] of bits(VL) results;
for r = 0 to nreg-1
bits(VL) operand1 = Z[dn+r, VL];
bits(VL) operand2 = Z[m+r, VL];
for e = 0 to elements-1
integer element1 = Int(Elem[operand1, e, esize], unsigned);
integer element2 = Int(Elem[operand2, e, esize], unsigned);
integer res = Min(element1, element2);
Elem[results[r], e, esize] = res<esize-1:0>;
for r = 0 to nreg-1
Z[dn+r, VL] = results[r];