diff options
Diffstat (limited to 'gcc/fixed-value.c')
-rw-r--r-- | gcc/fixed-value.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/gcc/fixed-value.c b/gcc/fixed-value.c index ad92c497d9..3cd44dd74f 100644 --- a/gcc/fixed-value.c +++ b/gcc/fixed-value.c @@ -1,5 +1,5 @@ /* Fixed-point arithmetic support. - Copyright (C) 2006-2016 Free Software Foundation, Inc. + Copyright (C) 2006-2017 Free Software Foundation, Inc. This file is part of GCC. @@ -130,7 +130,7 @@ fixed_from_string (FIXED_VALUE_TYPE *f, const char *str, machine_mode mode) real_arithmetic (&fixed_value, MULT_EXPR, &real_value, &base_value); wide_int w = real_to_integer (&fixed_value, &fail, GET_MODE_PRECISION (mode)); - f->data.low = w.elt (0); + f->data.low = w.ulow (); f->data.high = w.elt (1); if (temp == FIXED_MAX_EPS && ALL_FRACT_MODE_P (f->mode)) @@ -730,35 +730,28 @@ fixed_arithmetic (FIXED_VALUE_TYPE *f, int icode, const FIXED_VALUE_TYPE *op0, { case NEGATE_EXPR: return do_fixed_neg (f, op0, sat_p); - break; case PLUS_EXPR: gcc_assert (op0->mode == op1->mode); return do_fixed_add (f, op0, op1, false, sat_p); - break; case MINUS_EXPR: gcc_assert (op0->mode == op1->mode); return do_fixed_add (f, op0, op1, true, sat_p); - break; case MULT_EXPR: gcc_assert (op0->mode == op1->mode); return do_fixed_multiply (f, op0, op1, sat_p); - break; case TRUNC_DIV_EXPR: gcc_assert (op0->mode == op1->mode); return do_fixed_divide (f, op0, op1, sat_p); - break; case LSHIFT_EXPR: return do_fixed_shift (f, op0, op1, true, sat_p); - break; case RSHIFT_EXPR: return do_fixed_shift (f, op0, op1, false, sat_p); - break; default: gcc_unreachable (); @@ -1056,7 +1049,7 @@ fixed_convert_from_real (FIXED_VALUE_TYPE *f, machine_mode mode, wide_int w = real_to_integer (&fixed_value, &fail, GET_MODE_PRECISION (mode)); - f->data.low = w.elt (0); + f->data.low = w.ulow (); f->data.high = w.elt (1); temp = check_real_for_fixed_mode (&real_value, mode); if (temp == FIXED_UNDERFLOW) /* Minimum. */ |