[67/77] Use scalar_mode in fixed-value.*
commit69095bb2cde82ebaf27b4945faec5adbbb03b49e
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 30 Aug 2017 11:19:47 +0000 (30 11:19 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 30 Aug 2017 11:19:47 +0000 (30 11:19 +0000)
treea08db0758c2391ecccdffb242e712fba7c8e4d8e
parent074473dd6e4b5f8789fe224d54014ba3d31c4983
[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>.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@251518 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/avr/avr.c
gcc/fixed-value.c
gcc/fixed-value.h