Rev. 1.50, 10/04, page 414 of 448
10.3.22 FSRRA (Floating Point Square Reciprocal Approximate): Floating-Point
Instruction
PR Format Operation Instruction Code Cycle T Bit
0
1
FSRRA FRn
—
1/ sqrt(FRn)* → FRn
reserved
1111nnnn01111101
1111nnnn01111101
1 —
Note: * sqrt(FRn) is the square root of FRn.
Description: This instruction takes the approximate inverse of the arithmetic square root (absolute
error is within ±2^–21) of the single-precision floating-point in FRn and writes the result to FRn.
Since the this instruction operates by approximation, an imprecision exception is required when
the input is a normalized value. In other cases, the instruction does not require an imprecision
exception.
When FPSCR.enable.I is set, an FPU exception trap is generated. When an exception occurs,
correct exception information is reflected in FPSCR.cause and FPSCR.flag, and FRn is not
updated. Appropriate processing should therefore be performed by software.
Notes: None
Operation:
Void FSRRA(int n){
case(FPSCR.PR){
0: fsrra_single(n); break;
1: undefined_operation(); break;
}
PC += 2;
}
fsrra_single(int n)
{ clear_cause();
case(data_type_of(n)){
NORM: if(sign_of(n)==0)
set_I();
FR[n] = 1/sqrt(FR[n]);
else invalid(n); break;
DENORM: if(sign_of(n)==0)
fpu_error(); break;
else invalid(n); break