The labs function

Name

labs -- 

Synopsis

#include <stdlib.h>

long labs ( long);

Description

The labs function computes the absolute value of an integer j. If the result cannot be represented, the behavior is undefined.

Returns

The labs function returns the absolute value.

Implementation Notes

The labs function is both built-in and supplied as a library function. Usually the built-in function is used, and in this case the 1750 instruction DABS will be generated. If the address of the abs function is taken, then the address is the address of the library function.
In the special case where j is LONG_MIN, fixed point overflow will occur. If the corresponding interrupt is enabled the signal SIGFIXED_OVERFLOW will be raised.
The standard behavior may be modified in the run-time system file crt0.s.