fmax
Multi-vector Floating-point Maximum (SME2)
FMAX { <Zdn1>.<T>-<Zdn2>.<T> }, { <Zdn1>.<T>-<Zdn2>.<T> }, { <Zm1>.<T>-<Zm2>.<T> }
Maximum of 2 or 4 FP vectors.
Pseudocode Operation
No pseudocode available.
Reference
View in Arm A64 ISA Reference ↗
Arm A64 ISA
Instruction Forms
| Encoding | Instruction | ISA | Bit pattern | ||
|---|---|---|---|---|---|
| 0x0E403400 | FMAX <Vd>.<T>, <Vn>.<T>, <Vm>.<T> | A64 | 0 | Q | 0 | 01110 | 0 | 10 | Rm | 00 | 110 | 1 | Rn | Rd | ||
| 0x0E20F400 | FMAX <Vd>.<T>, <Vn>.<T>, <Vm>.<T> | A64 | 0 | Q | 0 | 01110 | 0 | sz | 1 | Rm | 11110 | 1 | Rn | Rd | ||
| 0x1EE04800 | FMAX <Hd>, <Hn>, <Hm> | A64 | 0 | 0 | 0 | 11110 | 11 | 1 | Rm | 01 | 00 | 10 | Rn | Rd | ||
| 0x1E204800 | FMAX <Sd>, <Sn>, <Sm> | A64 | 0 | 0 | 0 | 11110 | 00 | 1 | Rm | 01 | 00 | 10 | Rn | Rd | ||
| 0x1E604800 | FMAX <Dd>, <Dn>, <Dm> | A64 | 0 | 0 | 0 | 11110 | 01 | 1 | Rm | 01 | 00 | 10 | Rn | Rd | ||
| 0xC120A100 | FMAX { <Zdn1>.<T>-<Zdn2>.<T> }, { <Zdn1>.<T>-<Zdn2>.<T> }, <Zm>.<T> | A64 | 11000001 | size | 10 | Zm | 101000 | 0100 | 0 | Zdn | 0 | ||
| 0xC120A900 | FMAX { <Zdn1>.<T>-<Zdn4>.<T> }, { <Zdn1>.<T>-<Zdn4>.<T> }, <Zm>.<T> | A64 | 11000001 | size | 10 | Zm | 101010 | 0100 | 0 | Zdn | 0 | 0 | ||
| 0xC120B100 | FMAX { <Zdn1>.<T>-<Zdn2>.<T> }, { <Zdn1>.<T>-<Zdn2>.<T> }, { <Zm1>.<T>-<Zm2>.<T> } | A64 | 11000001 | size | 1 | Zm | 0101100 | 010 | 0 | 0 | Zdn | 0 | ||
| 0xC120B900 | FMAX { <Zdn1>.<T>-<Zdn4>.<T> }, { <Zdn1>.<T>-<Zdn4>.<T> }, { <Zm1>.<T>-<Zm4>.<T> } | A64 | 11000001 | size | 1 | Zm | 00101110 | 010 | 0 | 0 | Zdn | 0 | 0 | ||
| 0x651E8000 | FMAX <Zdn>.<T>, <Pg>/M, <Zdn>.<T>, <const> | A64 | 01100101 | size | 011 | 11 | 0 | 100 | Pg | 0000 | i1 | Zdn | ||
| 0x65068000 | FMAX <Zdn>.<T>, <Pg>/M, <Zdn>.<T>, <Zm>.<T> | A64 | 01100101 | size | 00 | 011 | 0 | 100 | Pg | Zm | Zdn |
Description
Determine the maximum of floating-point elements of the two or four second source vectors and the corresponding floating-point 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. When FPCR.AH is 0, the behavior is as follows: When FPCR.AH is 1, the behavior is as follows: This instruction follows SME2 floating-point numerical behaviors corresponding to instructions that place their results in one or more SVE Z 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
bits(esize) element1 = Elem[operand1, e, esize];
bits(esize) element2 = Elem[operand2, e, esize];
Elem[results[r], e, esize] = FPMax(element1, element2, FPCR);
for r = 0 to nreg-1
Z[dn+r, VL] = results[r];