]> git.ipfire.org Git - thirdparty/gcc.git/commit
[52/77] Use scalar_int_mode in extract/store_bit_field
authorRichard Sandiford <richard.sandiford@linaro.org>
Wed, 30 Aug 2017 11:17:37 +0000 (11:17 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Wed, 30 Aug 2017 11:17:37 +0000 (11:17 +0000)
commit1a52709222c9c5fd3b9446d3ef1db6b87d020e13
tree1c64817b9f94aeeb80879dd906ac7785f018193b
parent59b5118623ad2e755fbb16b03f2ea122bceebdd2
[52/77] Use scalar_int_mode in extract/store_bit_field

After a certain point, extract_bit_field and store_bit_field
ensure that they're dealing with integer modes or BLKmode MEMs.
This patch uses scalar_int_mode and opt_scalar_int_mode for
those parts.

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

gcc/
* expmed.c (store_bit_field_using_insv): Add op0_mode and
value_mode arguments.  Use scalar_int_mode internally.
(store_bit_field_1): Rename the new integer mode from imode
to op0_mode and use it instead of GET_MODE (op0).  Update calls
to store_split_bit_field, store_bit_field_using_insv and
store_fixed_bit_field.
(store_fixed_bit_field): Add op0_mode and value_mode arguments.
Use scalar_int_mode internally.  Use a bit count rather than a mode
when calculating the largest bit size for get_best_mode.
Update calls to store_split_bit_field and store_fixed_bit_field_1.
(store_fixed_bit_field_1): Add mode and value_mode arguments.
Remove assertion that OP0 has a scalar integer mode.
(store_split_bit_field): Add op0_mode and value_mode arguments.
Update calls to extract_fixed_bit_field.
(extract_bit_field_using_extv): Add an op0_mode argument.
Use scalar_int_mode internally.
(extract_bit_field_1): Rename the new integer mode from imode to
op0_mode and use it instead of GET_MODE (op0).  Update calls to
extract_split_bit_field, extract_bit_field_using_extv and
extract_fixed_bit_field.
(extract_fixed_bit_field): Add an op0_mode argument.  Update calls
to extract_split_bit_field and extract_fixed_bit_field_1.
(extract_fixed_bit_field_1): Add a mode argument.  Remove assertion
that OP0 has a scalar integer mode.  Use as_a <scalar_int_mode>
on the target mode.
(extract_split_bit_field): Add an op0_mode argument.  Update call
to extract_fixed_bit_field.

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r251504
gcc/ChangeLog
gcc/expmed.c