diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/expmed.c | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e50e373..3ddc4a9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-10-13 Alexandre Oliva <aoliva@redhat.com> + + PR middle-end/67912 + * expmed.c (store_bit_field_1): Adjust mode of BLKmode inputs. + 2015-10-12 Uros Bizjak <ubizjak@gmail.com> * config/sparc/sparc.h (SPARC_STACK_ALIGN): Implement using 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. */ |