VxWorks Reference Manual : Libraries

mathHardLib

NAME

mathHardLib - hardware floating-point math library

ROUTINES

mathHardInit( ) - initialize hardware floating-point math support

DESCRIPTION

This library provides support routines for using hardware floating-point units with high-level math functions. The high-level functions include triginometric operations, exponents, and so forth.

The routines in this library are used automatically for high-level math functions only if mathHardInit( ) has been called previously.

WARNING

Not all architectures support hardware floating-point. See the architecture-specific appendices of the VxWorks Programmer's Guide.

INCLUDE FILES

math.h

SEE ALSO

mathHardLib, mathSoftLib, mathALib, VxWorks Programmer's Guide architecture-specific appendices


Libraries : Routines

mathHardInit( )

NAME

mathHardInit( ) - initialize hardware floating-point math support

SYNOPSIS


void mathHardInit ()

DESCRIPTION

This routine places the addresses of the hardware high-level math functions (trigonometric functions, etc.) in a set of global variables. This allows the standard math functions (e.g., sin( ), pow( )) to have a single entry point but to be dispatched to the hardware or software support routines, as specified.

This routine is called from usrConfig.c if INCLUDE_HW_FP is defined. This definition causes the linker to include the floating-point hardware support library.

Certain routines in the floating-point software emulation library do not have equivalent hardware support routines. (These are primarily routines that handle single-precision floating-point numbers.) If no emulation routine address has already been put in the global variable for this function, the address of a dummy routine that logs an error message is placed in the variable; if an emulation routine address is present (the emulation initialization, via mathSoftInit( ), must be done prior to hardware floating-point initialization), the emulation routine address is left alone. In this way, hardware routines will be used for all available functions, while emulation will be used for the missing functions.

RETURNS

N/A

SEE ALSO

mathHardLib, mathSoftInit( )