gccint: Library Calls
1
1 18.12 Implicit Calls to Library Routines
1 ========================================
1
1 Here is an explanation of implicit calls to library routines.
1
1 -- Macro: DECLARE_LIBRARY_RENAMES
1 This macro, if defined, should expand to a piece of C code that
1 will get expanded when compiling functions for libgcc.a. It can be
1 used to provide alternate names for GCC's internal library
1 functions if there are ABI-mandated names that the compiler should
1 provide.
1
1 -- Target Hook: void TARGET_INIT_LIBFUNCS (void)
1 This hook should declare additional library routines or rename
1 existing ones, using the functions 'set_optab_libfunc' and
1 'init_one_libfunc' defined in 'optabs.c'. 'init_optabs' calls this
1 macro after initializing all the normal library routines.
1
1 The default is to do nothing. Most ports don't need to define this
1 hook.
1
1 -- Target Hook: bool TARGET_LIBFUNC_GNU_PREFIX
1 If false (the default), internal library routines start with two
1 underscores. If set to true, these routines start with '__gnu_'
1 instead. E.g., '__muldi3' changes to '__gnu_muldi3'. This
1 currently only affects functions defined in 'libgcc2.c'. If this
1 is set to true, the 'tm.h' file must also '#define
1 LIBGCC2_GNU_PREFIX'.
1
1 -- Macro: FLOAT_LIB_COMPARE_RETURNS_BOOL (MODE, COMPARISON)
1 This macro should return 'true' if the library routine that
1 implements the floating point comparison operator COMPARISON in
1 mode MODE will return a boolean, and FALSE if it will return a
1 tristate.
1
1 GCC's own floating point libraries return tristates from the
1 comparison operators, so the default returns false always. Most
1 ports don't need to define this macro.
1
1 -- Macro: TARGET_LIB_INT_CMP_BIASED
1 This macro should evaluate to 'true' if the integer comparison
1 functions (like '__cmpdi2') return 0 to indicate that the first
1 operand is smaller than the second, 1 to indicate that they are
1 equal, and 2 to indicate that the first operand is greater than the
1 second. If this macro evaluates to 'false' the comparison
1 functions return -1, 0, and 1 instead of 0, 1, and 2. If the
1 target uses the routines in 'libgcc.a', you do not need to define
1 this macro.
1
1 -- Macro: TARGET_HAS_NO_HW_DIVIDE
1 This macro should be defined if the target has no hardware divide
1 instructions. If this macro is defined, GCC will use an algorithm
1 which make use of simple logical and arithmetic operations for
1 64-bit division. If the macro is not defined, GCC will use an
1 algorithm which make use of a 64-bit by 32-bit divide primitive.
1
1 -- Macro: TARGET_EDOM
1 The value of 'EDOM' on the target machine, as a C integer constant
1 expression. If you don't define this macro, GCC does not attempt
1 to deposit the value of 'EDOM' into 'errno' directly. Look in
1 '/usr/include/errno.h' to find the value of 'EDOM' on your system.
1
1 If you do not define 'TARGET_EDOM', then compiled code reports
1 domain errors by calling the library function and letting it report
1 the error. If mathematical functions on your system use 'matherr'
1 when there is an error, then you should leave 'TARGET_EDOM'
1 undefined so that 'matherr' is used normally.
1
1 -- Macro: GEN_ERRNO_RTX
1 Define this macro as a C expression to create an rtl expression
1 that refers to the global "variable" 'errno'. (On certain systems,
1 'errno' may not actually be a variable.) If you don't define this
1 macro, a reasonable default is used.
1
1 -- Target Hook: bool TARGET_LIBC_HAS_FUNCTION (enum function_class
1 FN_CLASS)
1 This hook determines whether a function from a class of functions
1 FN_CLASS is present at the runtime.
1
1 -- Macro: NEXT_OBJC_RUNTIME
1 Set this macro to 1 to use the "NeXT" Objective-C message sending
1 conventions by default. This calling convention involves passing
1 the object, the selector and the method arguments all at once to
1 the method-lookup library function. This is the usual setting when
1 targeting Darwin/Mac OS X systems, which have the NeXT runtime
1 installed.
1
1 If the macro is set to 0, the "GNU" Objective-C message sending
1 convention will be used by default. This convention passes just
1 the object and the selector to the method-lookup function, which
1 returns a pointer to the method.
1
1 In either case, it remains possible to select code-generation for
1 the alternate scheme, by means of compiler command line switches.
1