aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1993-11-12 08:53:40 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1993-11-12 08:53:40 -0500
commit0e84b55633a9e926ca9d572057943cc9c3a70761 (patch)
tree9b8bc433e411ac3516269c5f92db3375c5b7b605 /gcc
parentb7d7295b1a15da3599100688c925bff755cea673 (diff)
downloadgcc-0e84b55633a9e926ca9d572057943cc9c3a70761.zip
gcc-0e84b55633a9e926ca9d572057943cc9c3a70761.tar.gz
gcc-0e84b55633a9e926ca9d572057943cc9c3a70761.tar.bz2
(pattern_really_clobbers_lr): Setting a subreg of a mem is valid and safe.
From-SVN: r6074
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/arm/arm.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index f8bc52b..b075207 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -1552,7 +1552,11 @@ output_ascii_pseudo_op (stream, p, len)
/* Try to determine whether a pattern really clobbers the link register.
This information is useful when peepholing, so that lr need not be pushed
- if we combine a call followed by a return */
+ if we combine a call followed by a return.
+ NOTE: This code does not check for side-effect expressions in a SET_SRC:
+ such a check should not be needed because these only update an existing
+ value within a register; the register must still be set elsewhere within
+ the function. */
static int
pattern_really_clobbers_lr (x)
@@ -1570,6 +1574,8 @@ rtx x;
case SUBREG:
if (GET_CODE (XEXP (SET_DEST (x), 0)) == REG)
return REGNO (XEXP (SET_DEST (x), 0)) == 14;
+ if (GET_CODE (XEXP (SET_DEST (x), 0)) == MEM)
+ return 0;
abort ();
default:
return 0;