diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2013-10-21 18:32:23 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2013-10-21 18:32:23 +0000 |
commit | 67b5215c7642f7436210b4501c445a42f5846fdd (patch) | |
tree | c428c7e73d5606ac395dd73b9723b83e18d58202 /gcc/hwint.c | |
parent | 0a873daac0eb17d86b867a1e7e679bd5385b7bc9 (diff) | |
download | gcc-67b5215c7642f7436210b4501c445a42f5846fdd.tar.gz |
system.h: Move hwint.h include further down.
gcc/
* system.h: Move hwint.h include further down.
* hwint.h (sext_hwi, zext_hwi): Define unconditionally. Add
gcc_checking_asserts.
* hwint.c (sext_hwi, zext_hwi): Delete ENABLE_CHECKING versions.
From-SVN: r203906
Diffstat (limited to 'gcc/hwint.c')
-rw-r--r-- | gcc/hwint.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/gcc/hwint.c b/gcc/hwint.c index 9e99dd99e0b..f47be4ac5f5 100644 --- a/gcc/hwint.c +++ b/gcc/hwint.c @@ -204,35 +204,3 @@ least_common_multiple (HOST_WIDE_INT a, HOST_WIDE_INT b) { return mul_hwi (abs_hwi (a) / gcd (a, b), abs_hwi (b)); } - -#ifdef ENABLE_CHECKING -/* Sign extend SRC starting from PREC. */ - -HOST_WIDE_INT -sext_hwi (HOST_WIDE_INT src, unsigned int prec) -{ - gcc_checking_assert (prec <= HOST_BITS_PER_WIDE_INT); - - if (prec == HOST_BITS_PER_WIDE_INT) - return src; - else - { - int shift = HOST_BITS_PER_WIDE_INT - prec; - return (src << shift) >> shift; - } -} - -/* Zero extend SRC starting from PREC. */ - -unsigned HOST_WIDE_INT -zext_hwi (unsigned HOST_WIDE_INT src, unsigned int prec) -{ - gcc_checking_assert (prec <= HOST_BITS_PER_WIDE_INT); - - if (prec == HOST_BITS_PER_WIDE_INT) - return src; - else - return src & (((HOST_WIDE_INT)1 << prec) - 1); -} - -#endif |