diff options
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/expmed.c | 11 |
2 files changed, 12 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dc7f1af..0eb112f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2013-09-09 Richard Sandiford <rdsandiford@googlemail.com> + * expmed.c (lshift_value): Take an unsigned HOST_WIDE_INT instead + of an rtx/bitpos pair. + (store_fixed_bit_field): Update accordingly. + +2013-09-09 Richard Sandiford <rdsandiford@googlemail.com> + * asan.c (asan_emit_stack_protection): Use gen_int_mode instead of GEN_INT. * builtins.c (expand_errno_check): Likewise. diff --git a/gcc/expmed.c b/gcc/expmed.c index 747231f..ba9a7b6 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -56,7 +56,7 @@ static rtx extract_fixed_bit_field (enum machine_mode, rtx, unsigned HOST_WIDE_INT, unsigned HOST_WIDE_INT, rtx, int, bool); static rtx mask_rtx (enum machine_mode, int, int, int); -static rtx lshift_value (enum machine_mode, rtx, int, int); +static rtx lshift_value (enum machine_mode, unsigned HOST_WIDE_INT, int); static rtx extract_split_bit_field (rtx, unsigned HOST_WIDE_INT, unsigned HOST_WIDE_INT, int); static void do_cmp_and_jump (rtx, rtx, enum rtx_code, enum machine_mode, rtx); @@ -991,7 +991,7 @@ store_fixed_bit_field (rtx op0, unsigned HOST_WIDE_INT bitsize, || (bitsize == HOST_BITS_PER_WIDE_INT && v == -1)) all_one = 1; - value = lshift_value (mode, value, bitnum, bitsize); + value = lshift_value (mode, v, bitnum); } else { @@ -1862,14 +1862,15 @@ mask_rtx (enum machine_mode mode, int bitpos, int bitsize, int complement) } /* Return a constant integer (CONST_INT or CONST_DOUBLE) rtx with the value - VALUE truncated to BITSIZE bits and then shifted left BITPOS bits. */ + VALUE << BITPOS. */ static rtx -lshift_value (enum machine_mode mode, rtx value, int bitpos, int bitsize) +lshift_value (enum machine_mode mode, unsigned HOST_WIDE_INT value, + int bitpos) { double_int val; - val = double_int::from_uhwi (INTVAL (value)).zext (bitsize); + val = double_int::from_uhwi (value); val = val.llshift (bitpos, HOST_BITS_PER_DOUBLE_INT); return immed_double_int_const (val, mode); |