Crossware

Table of Contents        Previous topic       Next topic       

MICROPROCESSOR INSTRUCTION REFERENCE->FABS

Floating-Point Absolute Value

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

Absolute value of source ->FPx

    
Assembler Syntax:FABS.fmt <ea>,FPx
FABS.D FPy,FPx
FABS.D FPx
FrABS.fmt <ea>,FPx
FrABS.D FPy,FPx
FrABS.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 stores its absolute value in the destination floating point data register.

FSABS rounds to single-precision, FDABS rounds to double-precision and FABS 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 source is not-a-number, else cleared
IDESet if source is a denormalised number, else cleared
OPERR Always cleared
OVFL Always cleared
UNFL Always cleared
DZ Always cleared
INEX Always cleared
    
Allowable Addressing Modes
    
Dn,FPn
(An),FPn
(An)+,FPn
-(An),FPn
(d16,An),FPn
(d16,PC),FPn