frsqrts

FRSQRTS <Zd>.<T>, <Zn>.<T>, <Zm>.<T>

Floating-point Reciprocal Sqrt Step.

Pseudocode Operation

No pseudocode available.

Encoding

Binary Layout
01100101
31:24
size
23:22
0
21
Zm
20:16
000
15:13
11
12:11
1
10
Zn
9:5
Zd
4:0
 
Format SVE
Opcode 0x65001C00
Extension SVE

Related

Other forms of frsqrts

  • frsqrts Vector Floating-Point Reciprocal Sqrt Step

More in SVE

Reference

Instruction Forms

Encoding Instruction ISA Bit pattern
0x5EC03C00 FRSQRTS <Hd>, <Hn>, <Hm> A64 01 | 0 | 11110 | 1 | 10 | Rm | 00 | 111 | 1 | Rn | Rd
0x5EA0FC00 FRSQRTS <V><d>, <V><n>, <V><m> A64 01 | 0 | 111101 | sz | 1 | Rm | 11111 | 1 | Rn | Rd
0x0EC03C00 FRSQRTS <Vd>.<T>, <Vn>.<T>, <Vm>.<T> A64 0 | Q | 0 | 01110 | 1 | 10 | Rm | 00 | 111 | 1 | Rn | Rd
0x0EA0FC00 FRSQRTS <Vd>.<T>, <Vn>.<T>, <Vm>.<T> A64 0 | Q | 0 | 011101 | sz | 1 | Rm | 11111 | 1 | Rn | Rd
0x65001C00 FRSQRTS <Zd>.<T>, <Zn>.<T>, <Zm>.<T> A64 01100101 | size | 0 | Zm | 000 | 11 | 1 | Zn | Zd

Description

Multiply corresponding floating-point elements of the first and second source vectors, subtract the products from 3.0 and divide the results by 2.0 without any 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 square root 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] = FPRSqrtStepFused(element1, element2, FPCR);

Z[d, VL] = result;