+2010-09-28 DJ Delorie <dj@redhat.com>
+
+ PR target/45800
+ * config/m32c/m32c.c (m32c_subreg): Force adjustment of subregs of
+ volatile MEMs.
+
2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
* c-parser.c (c_parser_declaration_or_fndef): Diagnose incorrect prefix
return gen_rtx_MEM (outer, XEXP (XEXP (x, 0), 0));
if (GET_CODE (x) != REG)
- return simplify_gen_subreg (outer, x, inner, byte);
+ {
+ rtx r = simplify_gen_subreg (outer, x, inner, byte);
+ if (GET_CODE (r) == SUBREG
+ && GET_CODE (x) == MEM
+ && MEM_VOLATILE_P (x))
+ {
+ /* Volatile MEMs don't get simplified, but we need them to
+ be. We are little endian, so the subreg byte is the
+ offset. */
+ r = adjust_address (x, outer, byte);
+ }
+ return r;
+ }
r = REGNO (x);
if (r >= FIRST_PSEUDO_REGISTER || r == AP_REGNO)