diff options
author | Bernd Schmidt <bernds@codesourcery.com> | 2011-05-25 12:11:42 +0000 |
---|---|---|
committer | Bernd Schmidt <bernds@gcc.gnu.org> | 2011-05-25 12:11:42 +0000 |
commit | cdbf45414aecd8ec143a0f2634ba7c53b11053ca (patch) | |
tree | 76324632de5089be2fc6b436d8ac4682fc89b374 /gcc/libgcc2.h | |
parent | f242c0a5c0415bda56f33a13ef65e962ac995797 (diff) | |
download | gcc-cdbf45414aecd8ec143a0f2634ba7c53b11053ca.zip gcc-cdbf45414aecd8ec143a0f2634ba7c53b11053ca.tar.gz gcc-cdbf45414aecd8ec143a0f2634ba7c53b11053ca.tar.bz2 |
libgcc2.h (__NW, __NDW): Define using a __gnu_ prefix if LIBGCC2_GNU_PREFIX is defined.
gcc/
* libgcc2.h (__NW, __NDW): Define using a __gnu_ prefix if
LIBGCC2_GNU_PREFIX is defined.
(__N): New macro.
(__powisf2, __powidf2, __powitf2, __powixf2, __bswapsi2, __bswapdi2,
__mulsc3, __muldc3, __mulxc3, __multc3, __divsc3, __divdc3, __divxc3,
__divtc3, __udiv_w_sdiv, __clear_cache, __enable_execute_stack,
__clz_tab): Define using __N.
(__absvsi2, __negvsi2, __addvsi3, __subvsi3, __mulvsi3): Likewise if
COMPAT_SIMODE_TRAPPING_ARITHMETIC.
* target.def (libfunc_gnu_prefix): New hook.
* doc/tm.texi.in (LIBGCC2_GNU_PREFIX): Document.
(TARGET_LIBFUNC_GNU_PREFIX): Add hook.
* doc/tm.texi: Regenerate.
* system.h (LIBGCC2_GNU_PREFIX): Poison.
* optabs.c (gen_libfunc): Take the libfunc_gnu_prefix hook into
account.
(gen_interclass_conv_libfunc, gen_intraclass_conv_libfunc): Likewise.
(init_optabs): Likewise for the bswap libfuncs.
* tree.c (build_common_builtin_nodes): Likewise for complex multiply
and divide.
* config/t-slibgcc-elf-ver (SHLIB_MAPFILES): Use $$(libgcc_objdir).
* config/t-slibgcc-sld (SHLIB_MAPFILES): Likewise.
* libgcc-std.ver: Remove.
* Makefile.in (srcdirify): Handle $$(libgcc_objdir).
* config/frv/t-linux (SHLIB_MAPFILES): Use $$(libgcc_objdir) for
libgcc-std.ver.
* config/i386/t-linux (SHLIB_MAPFILES): Likewise.
* config/mips/t-slibgcc-irix (SHLIB_MAPFILES): Likewise.
* config/rs6000/t-aix43 (SHLIB_MAPFILES): Likewise.
* config/rs6000/t-aix52 (SHLIB_MAPFILES): Likewise.
* config/sparc/t-linux (SHLIB_MAPFILES): Likewise.
* config/i386/t-linux (SHLIB_MAPFILES): Likewise.
* config/i386/t-linux (SHLIB_MAPFILES): Likewise.
* config/fixed-bit.h (FIXED_OP): Define differently depending on
LIBGCC2_GNU_PREFIX. All uses changed not to pass leading underscores.
(FIXED_CONVERT_OP, FIXED_CONVERT_OP2): Likewise.
libgcc/
* libgcc-std.ver.in: New file.
* Makefile.in (LIBGCC_VER_GNU_PREFIX, LIBGCC_VER_SYMBOLS_PREFIX): New
variables.
(libgcc-std.ver): New rule.
* config/t-gnu-prefix: New file.
From-SVN: r174187
Diffstat (limited to 'gcc/libgcc2.h')
-rw-r--r-- | gcc/libgcc2.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/gcc/libgcc2.h b/gcc/libgcc2.h index 4e6fd23..aee6d19 100644 --- a/gcc/libgcc2.h +++ b/gcc/libgcc2.h @@ -193,8 +193,13 @@ typedef int shift_count_type __attribute__((mode (__libgcc_shift_count__))); #define UHWtype UDItype #define DWtype TItype #define UDWtype UTItype +#ifdef LIBGCC2_GNU_PREFIX +#define __NW(a,b) __gnu_ ## a ## di ## b +#define __NDW(a,b) __gnu_ ## a ## ti ## b +#else #define __NW(a,b) __ ## a ## di ## b #define __NDW(a,b) __ ## a ## ti ## b +#endif #define COMPAT_SIMODE_TRAPPING_ARITHMETIC #elif LIBGCC2_UNITS_PER_WORD == 4 #define W_TYPE_SIZE (4 * BITS_PER_UNIT) @@ -204,8 +209,13 @@ typedef int shift_count_type __attribute__((mode (__libgcc_shift_count__))); #define UHWtype USItype #define DWtype DItype #define UDWtype UDItype +#ifdef LIBGCC2_GNU_PREFIX +#define __NW(a,b) __gnu_ ## a ## si ## b +#define __NDW(a,b) __gnu_ ## a ## di ## b +#else #define __NW(a,b) __ ## a ## si ## b #define __NDW(a,b) __ ## a ## di ## b +#endif #elif LIBGCC2_UNITS_PER_WORD == 2 #define W_TYPE_SIZE (2 * BITS_PER_UNIT) #define Wtype HItype @@ -214,8 +224,13 @@ typedef int shift_count_type __attribute__((mode (__libgcc_shift_count__))); #define UHWtype UHItype #define DWtype SItype #define UDWtype USItype +#ifdef LIBGCC2_GNU_PREFIX +#define __NW(a,b) __gnu_ ## a ## hi ## b +#define __NDW(a,b) __gnu_ ## a ## si ## b +#else #define __NW(a,b) __ ## a ## hi ## b #define __NDW(a,b) __ ## a ## si ## b +#endif #else #define W_TYPE_SIZE BITS_PER_UNIT #define Wtype QItype @@ -224,10 +239,20 @@ typedef int shift_count_type __attribute__((mode (__libgcc_shift_count__))); #define UHWtype UQItype #define DWtype HItype #define UDWtype UHItype +#ifdef LIBGCC2_GNU_PREFIX +#define __NW(a,b) __gnu_ ## a ## qi ## b +#define __NDW(a,b) __gnu_ ## a ## hi ## b +#else #define __NW(a,b) __ ## a ## qi ## b #define __NDW(a,b) __ ## a ## hi ## b #endif +#endif +#ifdef LIBGCC2_GNU_PREFIX +#define __N(a) __gnu_ ## a +#else +#define __N(a) __ ## a +#endif #define Wtype_MAX ((Wtype)(((UWtype)1 << (W_TYPE_SIZE - 1)) - 1)) #define Wtype_MIN (- Wtype_MAX - 1) @@ -298,6 +323,25 @@ typedef int shift_count_type __attribute__((mode (__libgcc_shift_count__))); #define __popcountDI2 __NDW(popcount,2) #define __parityDI2 __NDW(parity,2) +#define __clz_tab __N(clz_tab) +#define __powisf2 __N(powisf2) +#define __powidf2 __N(powidf2) +#define __powitf2 __N(powitf2) +#define __powixf2 __N(powixf2) +#define __bswapsi2 __N(bswapsi2) +#define __bswapdi2 __N(bswapdi2) +#define __mulsc3 __N(mulsc3) +#define __muldc3 __N(muldc3) +#define __mulxc3 __N(mulxc3) +#define __multc3 __N(multc3) +#define __divsc3 __N(divsc3) +#define __divdc3 __N(divdc3) +#define __divxc3 __N(divxc3) +#define __divtc3 __N(divtc3) +#define __udiv_w_sdiv __N(udiv_w_sdiv) +#define __clear_cache __N(clear_cache) +#define __enable_execute_stack __N(enable_execute_stack) + extern DWtype __muldi3 (DWtype, DWtype); extern DWtype __divdi3 (DWtype, DWtype); extern UDWtype __udivdi3 (UDWtype, UDWtype); @@ -347,6 +391,12 @@ extern DWtype __mulvDI3 (DWtype, DWtype); extern DWtype __negvDI2 (DWtype); #ifdef COMPAT_SIMODE_TRAPPING_ARITHMETIC +#define __absvsi2 __N(absvsi2) +#define __negvsi2 __N(negvsi2) +#define __addvsi3 __N(addvsi3) +#define __subvsi3 __N(subvsi3) +#define __mulvsi3 __N(mulvsi3) + extern SItype __absvsi2 (SItype); extern SItype __addvsi3 (SItype, SItype); extern SItype __subvsi3 (SItype, SItype); |