diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-30 16:36:19 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-30 16:36:19 +0000 |
commit | b96c136c396a3a8cf37758ecd2ba705005542044 (patch) | |
tree | c381c35f0952d6ecccac229a039bf3585647cf4c /gcc/toplev.h | |
parent | 050190438f97763fc6ab94dd4ffb0635002a8b4c (diff) | |
download | gcc-b96c136c396a3a8cf37758ecd2ba705005542044.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167301 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/toplev.h')
-rw-r--r-- | gcc/toplev.h | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/gcc/toplev.h b/gcc/toplev.h index 08cbbc104e7..925e35777e6 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. */ |