TriCore
®
TC1.6P & TC1.6E
32-bit Unified Processor Core
Instruction Set
V1.0 2013-07
User Manual (Volume 2) 3-416
QSEED.F
Inverse Square Root Seed
Description
An approximation of the reciprocal of the square root of D[a] is stored in D[c]. The accuracy of the result is no less
than 6.75 bits, and therefore always within ±1% of the accurate result.
The operand and result are floating-point numbers. If the operand is ±0 then the result will be the appropriately
signed ?. If the operand is a NaN (quiet or signalling), then the return result will be the quiet NaN 7FC00000
H
.
This instruction can be used to implement a floating-point square root function in software using the Newton-
Raphson iterative method.
QSEED.FD[c], D[a] (RR)
arg_a = denorm_to_zero(f_real(D[a]);
if(is_nan(D[a])) then result = QUIET_NAN;
else if(arg_a == +0.0) then result = POS_INFINITY;
else if(arg_a == -0.0) then result = NEG_INFINITY;
else if(arg_a < 0.0) then result = SQRT_NAN;
else {
normal_result = approx_inv_sqrt(arg_a);
result = ieee754_32bit_format(nomral_result);
}
D[c] = result[31:0];
Exception Flags
Examples
qseed.f d2, d1
See Also
-
FS if(set_FI) then PSW.FS = 1 else PSW.FS = 0;
FI if(is_s_nan(D[a]) OR (D[c] == SQRT_NAN)) then set_FI = 1 else set_FI = 0;
if(set_FI) then PSW.FI = 1;
FV Not set by this instruction.
FZ Not set by this instruction.
FU Not set by this instruction.
FX Not set by this instruction.
31
c
28 27
19
H
20 19
-
18 17
1
H
16 15
-
12 11
a
8 7
4B
H
0