From 673a5740323aa8a438767120e223d323c2fb6f71 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 13 Apr 2011 11:31:55 +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: r172368 --- gcc/ChangeLog | 5 +++++ gcc/config/rx/rx.md | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a37cd7105c9..2863b7b9ac7 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-13 Uros Bizjak * config/i386/sse.md (pinsrbits): Remove. diff --git a/gcc/config/rx/rx.md b/gcc/config/rx/rx.md index 6ff3a1e7e2a..42a64aa7e8e 100644 --- a/gcc/config/rx/rx.md +++ b/gcc/config/rx/rx.md @@ -2030,6 +2030,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; -- 2.30.2