frintz
FRINTZ <Zd>.<T>, <Pg>/M, <Zn>.<T>
FP Round to Integral (Zero)
Pseudocode Operation
No pseudocode available.
Reference
View in Arm A64 ISA Reference ↗
Arm A64 ISA
Instruction Forms
| Encoding | Instruction | ISA | Bit pattern | ||
|---|---|---|---|---|---|
| 0x6503A000 | FRINTZ <Zd>.<T>, <Pg>/M, <Zn>.<T> | A64 | 01100101 | size | 000 | 01 | 1 | 101 | Pg | Zn | Zd | ||
| 0x0EF99800 | FRINTZ <Vd>.<T>, <Vn>.<T> | A64 | 0 | Q | 0 | 01110 | 1 | 1111001100 | 1 | 10 | Rn | Rd | ||
| 0x0EA19800 | FRINTZ <Vd>.<T>, <Vn>.<T> | A64 | 0 | Q | 0 | 01110 | 1 | sz | 100001100 | 1 | 10 | Rn | Rd | ||
| 0x1EE5C000 | FRINTZ <Hd>, <Hn> | A64 | 0 | 0 | 0 | 11110 | 11 | 1001 | 011 | 10000 | Rn | Rd | ||
| 0x1E25C000 | FRINTZ <Sd>, <Sn> | A64 | 0 | 0 | 0 | 11110 | 00 | 1001 | 011 | 10000 | Rn | Rd | ||
| 0x1E65C000 | FRINTZ <Dd>, <Dn> | A64 | 0 | 0 | 0 | 11110 | 01 | 1001 | 011 | 10000 | Rn | Rd |
Description
Round to an integral floating-point value with the specified rounding option from each active floating-point element of the source vector, and place the results in the corresponding elements of the destination vector. Inactive elements in the destination vector register remain unmodified.
Operation
CheckSVEEnabled();
constant integer VL = CurrentVL;
constant integer PL = VL DIV 8;
constant integer elements = VL DIV esize;
bits(PL) mask = P[g, PL];
bits(VL) operand = if AnyActiveElement(mask, esize) then Z[n, VL] else Zeros(VL);
bits(VL) result = Z[d, VL];
for e = 0 to elements-1
if ActivePredicateElement(mask, e, esize) then
bits(esize) element = Elem[operand, e, esize];
Elem[result, e, esize] = FPRoundInt(element, FPCR, rounding, exact);
Z[d, VL] = result;