frecps
FRECPS <Zd>.<T>, <Zn>.<T>, <Zm>.<T>
Floating-point Reciprocal Step.
Pseudocode Operation
No pseudocode available.
Reference
View in Arm A64 ISA Reference ↗
Arm A64 ISA
Instruction Forms
| Encoding | Instruction | ISA | Bit pattern | ||
|---|---|---|---|---|---|
| 0x5E403C00 | FRECPS <Hd>, <Hn>, <Hm> | A64 | 01 | 0 | 11110 | 0 | 10 | Rm | 00 | 111 | 1 | Rn | Rd | ||
| 0x5E20FC00 | FRECPS <V><d>, <V><n>, <V><m> | A64 | 01 | 0 | 111100 | sz | 1 | Rm | 11111 | 1 | Rn | Rd | ||
| 0x0E403C00 | FRECPS <Vd>.<T>, <Vn>.<T>, <Vm>.<T> | A64 | 0 | Q | 0 | 01110 | 0 | 10 | Rm | 00 | 111 | 1 | Rn | Rd | ||
| 0x0E20FC00 | FRECPS <Vd>.<T>, <Vn>.<T>, <Vm>.<T> | A64 | 0 | Q | 0 | 011100 | sz | 1 | Rm | 11111 | 1 | Rn | Rd | ||
| 0x65001800 | FRECPS <Zd>.<T>, <Zn>.<T>, <Zm>.<T> | A64 | 01100101 | size | 0 | Zm | 000 | 11 | 0 | Zn | Zd |
Description
Multiply corresponding floating-point elements of the first and second source vectors, subtract the products from 2.0 without intermediate rounding and place the results in the corresponding elements of the destination vector. This instruction is unpredicated. This instruction can be used to perform a single Newton-Raphson iteration for calculating the reciprocal of a vector of floating-point values.
Operation
CheckSVEEnabled();
constant integer VL = CurrentVL;
constant integer PL = VL DIV 8;
constant integer elements = VL DIV esize;
bits(VL) operand1 = Z[n, VL];
bits(VL) operand2 = Z[m, VL];
bits(VL) result;
for e = 0 to elements-1
bits(esize) element1 = Elem[operand1, e, esize];
bits(esize) element2 = Elem[operand2, e, esize];
Elem[result, e, esize] = FPRecipStepFused(element1, element2, FPCR);
Z[d, VL] = result;