diff options
author | Richard Stallman <rms@gnu.org> | 1992-04-19 01:16:25 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1992-04-19 01:16:25 +0000 |
commit | 56a2f049100e12cc7a96480a6879c229778515ef (patch) | |
tree | 1bb95648826abaef616f3ae6138f97440dac9e9c /gcc | |
parent | 0dcd8ceed30eb9f1009fc5846df8cb70d03bd974 (diff) | |
download | gcc-56a2f049100e12cc7a96480a6879c229778515ef.zip gcc-56a2f049100e12cc7a96480a6879c229778515ef.tar.gz gcc-56a2f049100e12cc7a96480a6879c229778515ef.tar.bz2 |
*** empty log message ***
From-SVN: r787
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/expmed.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index 4b0f77d..44dc7ec 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -200,13 +200,18 @@ store_bit_field (str_rtx, bitsize, bitnum, fieldmode, value, align, total_size) /* Note that the adjustment of BITPOS above has no effect on whether BITPOS is 0 in a REG bigger than a word. */ - if (GET_MODE_SIZE (fieldmode) >= UNITS_PER_WORD && GET_CODE (op0) != MEM + if (GET_MODE_SIZE (fieldmode) >= UNITS_PER_WORD + && (! STRICT_ALIGNMENT || GET_CODE (op0) != MEM) && bitpos == 0 && bitsize == GET_MODE_BITSIZE (fieldmode)) { /* Storing in a full-word or multi-word field in a register can be done with just SUBREG. */ if (GET_MODE (op0) != fieldmode) - op0 = gen_rtx (SUBREG, fieldmode, op0, offset); + if (GET_CODE (op0) == REG) + op0 = gen_rtx (SUBREG, fieldmode, op0, offset); + else + op0 = change_address (op0, fieldmode, + plus_constant (XEXP (op0, 0), offset)); emit_move_insn (op0, value); return value; } |