Crossware

Table of Contents        Previous topic       Next topic       

MICROPROCESSOR INSTRUCTION REFERENCE->FSQRT

Floating-Point Square Root

Compatibility: ColdFire chips with a floating-point unit (FPU)

Square Root of Source -> FPx

    
Assembler Syntax:FSQRT.fmt <ea>,FPx
FSQRT.D FPy,FPx
FSQRT.D FPx
FrSQRT.fmt <ea>,FPx
FrSQRT.D FPy,FPx
FrSQRT.D FPx
where r is rounding precision, S or D

Format: Byte (B), Word (W), Long (L), Single-precision (S), Double-precision (D)

Converts the source operand to double-precision (if necessary) and calculates the square root of that number.  Stores the result in the destination floating point data register.

FSSQRT rounds to single-precision, FDSQRT rounds to double-precision and FSQRT rounds to the precision specified by the floating point control register FPCR (which by default is double-precision).

Floating-Point Status Register:

NSet if result is negative;else cleared
ZSet if result is zero;else cleared
ISet if result is infinity;else cleared
NANSet if result is a NAN;else cleared
BSUNAlways cleared
INANSet if the input is not-a-number; else cleared
IDESet if the input is a denormalised number; else cleared
OPERR Set if the source operand is negative and not zero; else cleared
OVFL Always cleared
UNFL Always cleared
DZ Always cleared
INEX Set if the infinitely-precise mantissa of the intermediate result has more significant bits than can be represented exactly in the selected rounding precision; or if the input is a denormalised number and the IDE exception is disabled; or if the result overflowed; or if the result underflowed and the underflow exception is disabled; else cleared

    
Allowable Addressing Modes
    
Dn,FPn
(An),FPn
(An)+,FPn
-(An),FPn
(d16,An),FPn
(d16,PC),FPn