diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2015-10-13 16:34:29 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2015-10-13 16:34:29 +0000 |
commit | e5c2c8d7af79312d4df6dacbc8d58d027fd43ab2 (patch) | |
tree | f853d62279e152b4c19850cc09ad88d3ff0816e8 /gcc/expmed.c | |
parent | 7802cb1eef7723398e88c20732eb140bdae4b434 (diff) | |
download | gcc-e5c2c8d7af79312d4df6dacbc8d58d027fd43ab2.zip gcc-e5c2c8d7af79312d4df6dacbc8d58d027fd43ab2.tar.gz gcc-e5c2c8d7af79312d4df6dacbc8d58d027fd43ab2.tar.bz2 |
support BLKmode inputs for store_bit_field
Revision 228586 changed useless_type_conversion_p and added mode
changes for MEM:BLKmode inputs in store_expr_with_bounds, but it
missed store_bit_field. This caused ada/rts/s-regpat.ads to fail
compilation on x86_64-linux-gnu.
for gcc/ChangeLog
PR middle-end/67912
* expmed.c (store_bit_field_1): Adjust mode of BLKmode inputs.
From-SVN: r228774
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r-- | gcc/expmed.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index 93cf508..69ea511 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -757,6 +757,14 @@ store_bit_field_1 (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, } } + /* We allow move between structures of same size but different mode. + If source is in memory and the mode differs, simply change the memory. */ + if (GET_MODE (value) == BLKmode && GET_MODE (op0) != BLKmode) + { + gcc_assert (MEM_P (value)); + value = adjust_address_nv (value, GET_MODE (op0), 0); + } + /* Storing an lsb-aligned field in a register can be done with a movstrict instruction. */ |