[29/77] Make some *_loc_descriptor helpers take scalar_int_mode
commite474368542cd83d32ba7ce4ce5b327443d9ebb8a
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 30 Aug 2017 11:12:28 +0000 (30 11:12 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 30 Aug 2017 11:12:28 +0000 (30 11:12 +0000)
treeaf997f78100816cb663c1ab347f80ef1edf80c3c
parent58a70f63f359717969a741927ec30ec7b41e348f
[29/77] Make some *_loc_descriptor helpers take scalar_int_mode

The *_loc_descriptor routines for clz, popcount, bswap and rotate
all required SCALAR_INT_MODE_P.  This patch moves the checks into
the caller (mem_loc_descriptor) so that the types of the mode
parameters can be scalar_int_mode instead of machine_mode.

The MOD handling in mem_loc_descriptor is also specific to
scalar integer modes.  Adding an explicit check allows
typed_binop to take a scalar_int_mode too.

2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

gcc/
* dwarf2out.c (typed_binop): Change mode parameter to scalar_int_mode.
(clz_loc_descriptor): Likewise.  Remove SCALAR_INT_MODE_P check.
(popcount_loc_descriptor): Likewise.
(bswap_loc_descriptor): Likewise.
(rotate_loc_descriptor): Likewise.
(mem_loc_descriptor): Add is_a <scalar_int_mode> checks before
calling the functions above.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@251481 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/dwarf2out.c