aboutsummaryrefslogtreecommitdiff
path: root/gcc/toplev.h
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2010-11-30 16:36:19 +0000
committerJoseph Myers <jsm28@gcc.gnu.org>2010-11-30 16:36:19 +0000
commitc59ffc4195b245eecb574418f13f27b1f13d654e (patch)
treec381c35f0952d6ecccac229a039bf3585647cf4c /gcc/toplev.h
parent5b55141a954febb2c069b237166d7478827d336c (diff)
downloadgcc-c59ffc4195b245eecb574418f13f27b1f13d654e.zip
gcc-c59ffc4195b245eecb574418f13f27b1f13d654e.tar.gz
gcc-c59ffc4195b245eecb574418f13f27b1f13d654e.tar.bz2
hwint.c: New.
* hwint.c: New. Extracted from toplev.c. * hwint.h (clz_hwi, ctz_hwi, ffs_hwi, exact_log2, floor_log2): Move from toplev.h. * toplev.c (clz_hwi, ctz_hwi, ffs_hwi, exact_log2, floor_log2): Move to hwint.c. * toplev.h (clz_hwi, ctz_hwi, ffs_hwi, exact_log2, floor_log2): Move to hwint.h. * builtins.c, combine.c, config/i386/winnt.c, double-int.c, explow.c, expmed.c, fold-const.c, ggc-page.c, ggc-zone.c, ifcvt.c, ipa-struct-reorg.c, ira-color.c, matrix-reorg.c, omp-low.c, real.c, recog.c, reload.c, rtlanal.c, simplify-rtx.c, stor-layout.c, tree-dfa.c, tree-ssa-alias.c, tree-ssa-loop-niter.c, tree-vect-data-refs.c, tree-vect-loop-manip.c, tree-vect-loop.c, tree-vect-stmts.c, tree-vrp.c: Don't include toplev.h. * genattrtab.c, genconditions.c, genemit.c, genextract.c, genoutput.c, genpeep.c, genpreds.c, genrecog.c: Don't include toplev.h in generated output. * Makefile.in (OBJS-common): Add hwint.o. Dependencies for above files changed to remove toplev.h. (hwint.o): New. (insn-attrtab.o, insn-emit.o, insn-extract.o, insn-output.o, insn-peep.o, insn-preds.o, insn-recog.o): Don't depend on toplev.h. * config/i386/t-cygming (winnt.o): Don't depend on toplev.h. * config/i386/t-interix (winnt.o): Don't depend on toplev.h. fortran: * trans-common.c: Don't include toplev.h. java: * boehm.c: Don't include toplev.h. * Make-lang.in (java/boehm.o): Don't depend on toplev.h. lto: * lto-object.c: Don't include toplev.h. * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h. From-SVN: r167301
Diffstat (limited to 'gcc/toplev.h')
-rw-r--r--gcc/toplev.h70
1 files changed, 0 insertions, 70 deletions
diff --git a/gcc/toplev.h b/gcc/toplev.h
index 08cbbc1..925e357 100644
--- a/gcc/toplev.h
+++ b/gcc/toplev.h
@@ -88,76 +88,6 @@ extern const char * default_pch_valid_p (const void *, size_t);
/* The hashtable, so that the C front ends can pass it to cpplib. */
extern struct ht *ident_hash;
-/* Inline versions of the above for speed. */
-#if GCC_VERSION < 3004
-
-extern int clz_hwi (unsigned HOST_WIDE_INT x);
-extern int ctz_hwi (unsigned HOST_WIDE_INT x);
-extern int ffs_hwi (unsigned HOST_WIDE_INT x);
-
-/* Return log2, or -1 if not exact. */
-extern int exact_log2 (unsigned HOST_WIDE_INT);
-
-/* Return floor of log2, with -1 for zero. */
-extern int floor_log2 (unsigned HOST_WIDE_INT);
-
-#else /* GCC_VERSION >= 3004 */
-
-/* For convenience, define 0 -> word_size. */
-static inline int
-clz_hwi (unsigned HOST_WIDE_INT x)
-{
- if (x == 0)
- return HOST_BITS_PER_WIDE_INT;
-# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
- return __builtin_clzl (x);
-# elif HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONGLONG
- return __builtin_clzll (x);
-# else
- return __builtin_clz (x);
-# endif
-}
-
-static inline int
-ctz_hwi (unsigned HOST_WIDE_INT x)
-{
- if (x == 0)
- return HOST_BITS_PER_WIDE_INT;
-# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
- return __builtin_ctzl (x);
-# elif HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONGLONG
- return __builtin_ctzll (x);
-# else
- return __builtin_ctz (x);
-# endif
-}
-
-static inline int
-ffs_hwi (unsigned HOST_WIDE_INT x)
-{
-# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
- return __builtin_ffsl (x);
-# elif HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONGLONG
- return __builtin_ffsll (x);
-# else
- return __builtin_ffs (x);
-# endif
-}
-
-static inline int
-floor_log2 (unsigned HOST_WIDE_INT x)
-{
- return HOST_BITS_PER_WIDE_INT - 1 - clz_hwi (x);
-}
-
-static inline int
-exact_log2 (unsigned HOST_WIDE_INT x)
-{
- return x == (x & -x) && x ? ctz_hwi (x) : -1;
-}
-
-#endif /* GCC_VERSION >= 3004 */
-
/* Functions used to get and set GCC's notion of in what directory
compilation was started. */