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
Summary of Contents for SuperH SH-4A
Page 2: ...Rev 1 50 10 04 page ii of xx ...
Page 8: ...Rev 1 50 10 04 page viii of xx ...
Page 116: ...Rev 1 50 10 04 page 96 of 448 ...
Page 178: ...Rev 1 50 10 04 page 158 of 448 ...
Page 206: ...Rev 1 50 10 04 page 186 of 448 ...
Page 231: ...Rev 1 50 10 04 page 211 of 448 Possible Exceptions Slot illegal instruction exception ...
Page 235: ...Rev 1 50 10 04 page 215 of 448 Possible Exceptions Slot illegal instruction exception ...
Page 238: ...Rev 1 50 10 04 page 218 of 448 Possible Exceptions Slot illegal instruction exception ...
Page 408: ...Rev 1 50 10 04 page 388 of 448 Possible Exceptions Inexact Not generated when FPSCR PR 1 ...
Page 446: ...Rev 1 50 10 04 page 426 of 448 ...
Page 468: ...Rev 1 50 10 04 page 448 of 448 ...
Page 471: ......
Page 472: ...SH 4A Software Manual ...