diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2017-08-30 11:19:47 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2017-08-30 11:19:47 +0000 |
commit | 79052416a684cde121a3f70619c2eb12371be67a (patch) | |
tree | a08db0758c2391ecccdffb242e712fba7c8e4d8e /gcc/config/avr | |
parent | db61b7f923b769142156eab047c94b04bb7adaae (diff) | |
download | gcc-79052416a684cde121a3f70619c2eb12371be67a.zip gcc-79052416a684cde121a3f70619c2eb12371be67a.tar.gz gcc-79052416a684cde121a3f70619c2eb12371be67a.tar.bz2 |
[67/77] Use scalar_mode in fixed-value.*
This patch makes the fixed-value.* routines use scalar_mode.
It would be possible to define special classes for these modes, as for
scalar_int_mode and scalar_float_mode, but at the moment nothing would
benefit from them. In particular, there's no use case that would help
select between one class for all fixed-point modes versus one class for
fractional modes and one class for accumulator modes.
2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
gcc/
* fixed-value.h (fixed_from_double_int): Take a scalar_mode
rather than a machine_mode.
(fixed_from_string): Likewise.
(fixed_convert): Likewise.
(fixed_convert_from_int): Likewise.
(fixed_convert_from_real): Likewise.
(real_convert_from_fixed): Likewise.
* fixed-value.c (fixed_from_double_int): Likewise.
(fixed_from_string): Likewise.
(fixed_convert): Likewise.
(fixed_convert_from_int): Likewise.
(fixed_convert_from_real): Likewise.
(real_convert_from_fixed): Likewise.
* config/avr/avr.c (avr_out_round): Use as_a <scalar_mode>.
Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r251518
Diffstat (limited to 'gcc/config/avr')
-rw-r--r-- | gcc/config/avr/avr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index ad777e0..c1d2749 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -9176,7 +9176,7 @@ avr_out_fract (rtx_insn *insn, rtx operands[], bool intsigned, int *plen) const char* avr_out_round (rtx_insn *insn ATTRIBUTE_UNUSED, rtx *xop, int *plen) { - machine_mode mode = GET_MODE (xop[0]); + scalar_mode mode = as_a <scalar_mode> (GET_MODE (xop[0])); scalar_int_mode imode = int_mode_for_mode (mode).require (); // The smallest fractional bit not cleared by the rounding is 2^(-RP). int fbit = (int) GET_MODE_FBIT (mode); |