From f8413b4be1a4b0d5023ba73c2db5a07f17a39ec4 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 13 Apr 2011 11:30:48 +0000 Subject: [PATCH] rx.md (movmemsi): Do not use this pattern when volatile pointers are involved. * config/rx/rx.md (movmemsi): Do not use this pattern when volatile pointers are involved. From-SVN: r172367 --- gcc/ChangeLog | 5 +++++ gcc/config/rx/rx.md | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 94af0092fc16..9b7478eabc69 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-04-13 Nick Clifton + + * config/rx/rx.md (movmemsi): Do not use this pattern when + volatile pointers are involved. + 2011-04-12 Rainer Orth Backport from mainline: diff --git a/gcc/config/rx/rx.md b/gcc/config/rx/rx.md index d6720aa5e1d7..77d69e742ec3 100644 --- a/gcc/config/rx/rx.md +++ b/gcc/config/rx/rx.md @@ -2031,6 +2031,14 @@ 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; @@ -2040,6 +2048,7 @@ 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)); -- 2.47.2