summaryrefslogtreecommitdiff
path: root/gcc/expmed.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-01-13 06:54:54 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-01-13 06:54:54 +0000
commit4289fc47ac0887f6585ffb4e20358057b5728b0c (patch)
tree6cbad2a7fea3f837e9b192843516e7ffceaa5290 /gcc/expmed.c
parent02b8280916dd8a31edfe281dfffe42d183c776bc (diff)
downloadgcc-4289fc47ac0887f6585ffb4e20358057b5728b0c.tar.gz
2009-01-13 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r143328 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@143329 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r--gcc/expmed.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c
index 50eb45fa651..9ee5f29883d 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -749,6 +749,16 @@ store_bit_field_1 (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
if (pat)
{
emit_insn (pat);
+
+ /* If the mode of the insertion is wider than the mode of the
+ target register we created a paradoxical subreg for the
+ target. Truncate the paradoxical subreg of the target to
+ itself properly. */
+ if (!TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (GET_MODE (op0)),
+ GET_MODE_BITSIZE (op_mode))
+ && (REG_P (xop0)
+ || GET_CODE (xop0) == SUBREG))
+ convert_move (op0, xop0, true);
return true;
}
delete_insns_since (last);