aboutsummaryrefslogtreecommitdiff
path: root/gcc/optabs.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2003-02-09 10:35:22 -0800
committerRichard Henderson <rth@gcc.gnu.org>2003-02-09 10:35:22 -0800
commit8275b011ca18ef074a86f39f67b16718e0d647fc (patch)
treec8d1fe4271c9afc4b804ffb4eb37b6fa41c21ecb /gcc/optabs.c
parent5d4b76c0a92e9392304030f8400c760d5a674bd4 (diff)
downloadgcc-8275b011ca18ef074a86f39f67b16718e0d647fc.zip
gcc-8275b011ca18ef074a86f39f67b16718e0d647fc.tar.gz
gcc-8275b011ca18ef074a86f39f67b16718e0d647fc.tar.bz2
libgcc-std.ver (__clztf2): New.
* libgcc-std.ver (__clztf2): New. (__ctztf2, __popcounttf2, __paritytf2): New. * libgcc2.c (__clzSI2, __clzDI2, __ctzSI2, __ctzDI2, __popcountSI2, __popcountDI2, __paritySI2, __parityDI2): Use UWmode and UDWmode; adjust code to match the different type sizes. * libgcc2.h (__clzSI2, __ctzSI2, __popcountSI2, __paritySI2, __clzDI2, __ctzDI2, __popcountDI2, __parityDI2): New macros. * optabs.c (init_integral_libfuncs): Don't hard-code SImode and TImode; select word_mode and twice that. (init_floating_libfuncs): Don't hard-code SFmode and TFmode; select the modes from float, double, and long double. (init_optabs): Remove duplicate initializations. From-SVN: r62606
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r--gcc/optabs.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c
index 226b199..fbd7bdf 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -5396,7 +5396,9 @@ init_integral_libfuncs (optable, opname, suffix)
const char *opname;
int suffix;
{
- init_libfuncs (optable, SImode, TImode, opname, suffix);
+ init_libfuncs (optable, word_mode,
+ mode_for_size (2*BITS_PER_WORD, MODE_INT, 0),
+ opname, suffix);
}
/* Initialize the libfunc fields of an entire group of entries in some
@@ -5410,7 +5412,18 @@ init_floating_libfuncs (optable, opname, suffix)
const char *opname;
int suffix;
{
- init_libfuncs (optable, SFmode, TFmode, opname, suffix);
+ enum machine_mode fmode, dmode, lmode;
+
+ fmode = float_type_node ? TYPE_MODE (float_type_node) : VOIDmode;
+ dmode = double_type_node ? TYPE_MODE (double_type_node) : VOIDmode;
+ lmode = long_double_type_node ? TYPE_MODE (long_double_type_node) : VOIDmode;
+
+ if (fmode != VOIDmode)
+ init_libfuncs (optable, fmode, fmode, opname, suffix);
+ if (dmode != fmode && dmode != VOIDmode)
+ init_libfuncs (optable, dmode, dmode, opname, suffix);
+ if (lmode != dmode && lmode != VOIDmode)
+ init_libfuncs (optable, lmode, lmode, opname, suffix);
}
rtx
@@ -5659,17 +5672,6 @@ init_optabs ()
/* The ffs function operates on `int'. */
ffs_optab->handlers[(int) mode_for_size (INT_TYPE_SIZE, MODE_INT, 0)].libfunc
= init_one_libfunc ("ffs");
- ffs_optab->handlers[(int) DImode].libfunc = init_one_libfunc ("__ffsdi2");
- clz_optab->handlers[(int) SImode].libfunc = init_one_libfunc ("__clzsi2");
- clz_optab->handlers[(int) DImode].libfunc = init_one_libfunc ("__clzdi2");
- ctz_optab->handlers[(int) SImode].libfunc = init_one_libfunc ("__ctzsi2");
- ctz_optab->handlers[(int) DImode].libfunc = init_one_libfunc ("__ctzdi2");
- popcount_optab->handlers[(int) SImode].libfunc
- = init_one_libfunc ("__popcountsi2");
- popcount_optab->handlers[(int) DImode].libfunc
- = init_one_libfunc ("__popcountdi2");
- parity_optab->handlers[(int) SImode].libfunc = init_one_libfunc ("__paritysi2");
- parity_optab->handlers[(int) DImode].libfunc = init_one_libfunc ("__paritydi2");
extendsfdf2_libfunc = init_one_libfunc ("__extendsfdf2");
extendsfxf2_libfunc = init_one_libfunc ("__extendsfxf2");