]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
rx.md (movmemsi): Do not use this pattern when volatile pointers are involved.
authorNick Clifton <nickc@redhat.com>
Wed, 13 Apr 2011 11:30:48 +0000 (11:30 +0000)
committerNick Clifton <nickc@gcc.gnu.org>
Wed, 13 Apr 2011 11:30:48 +0000 (11:30 +0000)
* config/rx/rx.md (movmemsi): Do not use this pattern when
volatile pointers are involved.

From-SVN: r172367

gcc/ChangeLog
gcc/config/rx/rx.md

index 94af0092fc1654d6357ba96d903756d360080960..9b7478eabc69e1a98b5c40b16ebe3ffbeb51173f 100644 (file)
@@ -1,3 +1,8 @@
+2011-04-13  Nick Clifton  <nickc@redhat.com>
+
+       * config/rx/rx.md (movmemsi): Do not use this pattern when
+       volatile pointers are involved.
+
 2011-04-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        Backport from mainline:
index d6720aa5e1d78348c4e432f7e4fa6d449fa9f218..77d69e742ec35b5810bc2a44608286afc1ddbff8 100644 (file)
     rtx addr2 = gen_rtx_REG (SImode, 2);
     rtx len   = gen_rtx_REG (SImode, 3);
 
+    /* Do not use when the source or destination are volatile - the SMOVF
+       instruction will read and write in word sized blocks, which may be
+       outside of the valid address range.  */
+    if (MEM_P (operands[0]) && MEM_VOLATILE_P (operands[0]))
+      FAIL;
+    if (MEM_P (operands[1]) && MEM_VOLATILE_P (operands[1]))
+      FAIL;
+
     if (REG_P (operands[0]) && (REGNO (operands[0]) == 2
                                      || REGNO (operands[0]) == 3))
       FAIL;
     if (REG_P (operands[2]) && (REGNO (operands[2]) == 1
                                      || REGNO (operands[2]) == 2))
       FAIL;
+
     emit_move_insn (addr1, force_operand (XEXP (operands[0], 0), NULL_RTX));
     emit_move_insn (addr2, force_operand (XEXP (operands[1], 0), NULL_RTX));
     emit_move_insn (len, force_operand (operands[2], NULL_RTX));