diff options
author | aesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-05-19 20:09:57 +0000 |
---|---|---|
committer | aesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-05-19 20:09:57 +0000 |
commit | c5083e8b59f188c155a36a3335d803220428f7a9 (patch) | |
tree | 89268be053049f4ffb484bf22fb0818f0c2db8b7 /gcc/fold-const.c | |
parent | 628de148ef004d49539b5d7d069af8c7438fcab6 (diff) | |
download | gcc-c5083e8b59f188c155a36a3335d803220428f7a9.tar.gz |
* double-int.h (double_int_ior): New function.
* tree.h (build_int_cst_wide_type): Remove.
* tree.c (build_int_cst_wide_type): Remove.
* fold-const.c (native_interpret_int): Use double_int_to_tree instead
of build_int_cst_wide_type.
* stor-layout.c (set_sizetype): (Ditto.).
* dojump.c (do_jump): Use build_int_cstu instead of
build_int_cst_wide_type.
/java
* jcf-parse.c (get_constant): Use double_int_to_tree instead of
build_int_cst_wide_type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159595 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 17a753692d5..e92a674277a 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -7408,13 +7408,14 @@ native_interpret_int (tree type, const unsigned char *ptr, int len) int total_bytes = GET_MODE_SIZE (TYPE_MODE (type)); int byte, offset, word, words; unsigned char value; - unsigned int HOST_WIDE_INT lo = 0; - HOST_WIDE_INT hi = 0; + double_int result; if (total_bytes > len) return NULL_TREE; if (total_bytes * BITS_PER_UNIT > 2 * HOST_BITS_PER_WIDE_INT) return NULL_TREE; + + result = double_int_zero; words = total_bytes / UNITS_PER_WORD; for (byte = 0; byte < total_bytes; byte++) @@ -7436,13 +7437,13 @@ native_interpret_int (tree type, const unsigned char *ptr, int len) value = ptr[offset]; if (bitpos < HOST_BITS_PER_WIDE_INT) - lo |= (unsigned HOST_WIDE_INT) value << bitpos; + result.low |= (unsigned HOST_WIDE_INT) value << bitpos; else - hi |= (unsigned HOST_WIDE_INT) value - << (bitpos - HOST_BITS_PER_WIDE_INT); + result.high |= (unsigned HOST_WIDE_INT) value + << (bitpos - HOST_BITS_PER_WIDE_INT); } - return build_int_cst_wide_type (type, lo, hi); + return double_int_to_tree (type, result); } |