aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorAnatoly Sokolov <aesok@post.ru>2010-05-20 00:09:57 +0400
committerAnatoly Sokolov <aesok@gcc.gnu.org>2010-05-20 00:09:57 +0400
commit1961ffb8cd83ccb0f91ce9b3015bb3290f48b04b (patch)
tree89268be053049f4ffb484bf22fb0818f0c2db8b7 /gcc/fold-const.c
parent9908949ca643e02d6a07fef3742d50f389a80def (diff)
downloadgcc-1961ffb8cd83ccb0f91ce9b3015bb3290f48b04b.zip
gcc-1961ffb8cd83ccb0f91ce9b3015bb3290f48b04b.tar.gz
gcc-1961ffb8cd83ccb0f91ce9b3015bb3290f48b04b.tar.bz2
double-int.h (double_int_ior): New function.
* 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. From-SVN: r159595
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 17a7536..e92a674 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);
}