OSDN Git Service

PR optimization/10592
authorrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 17 Dec 2003 18:20:44 +0000 (18:20 +0000)
committerrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 17 Dec 2003 18:20:44 +0000 (18:20 +0000)
* caller-save.c (mark_referenced_regs): Don't short-circuit a reg
or subreg in SET_DEST if it isn't a hard register.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74747 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/caller-save.c

index f95cb94..dfd9226 100644 (file)
@@ -1,3 +1,9 @@
+2003-12-17  Richard Earnshaw  <rearnsha@arm.com>
+
+       PR optimization/10592
+       * caller-save.c (mark_referenced_regs): Don't short-circuit a reg
+       or subreg in SET_DEST if it isn't a hard register.
+
 2003-12-17  David Edelsohn  <edelsohn@gnu.org>
 
        * collect2.c (main): Add -fno-profile-arcs -fno-test-coverage
 2003-12-17  David Edelsohn  <edelsohn@gnu.org>
 
        * collect2.c (main): Add -fno-profile-arcs -fno-test-coverage
index 9a0a4e3..6eaa533 100644 (file)
@@ -568,8 +568,10 @@ mark_referenced_regs (rtx x)
     {
       x = SET_DEST (x);
       code = GET_CODE (x);
     {
       x = SET_DEST (x);
       code = GET_CODE (x);
-      if (code == REG || code == PC || code == CC0
+      if ((code == REG && REGNO (x) < FIRST_PSEUDO_REGISTER)
+         || code == PC || code == CC0
          || (code == SUBREG && GET_CODE (SUBREG_REG (x)) == REG
          || (code == SUBREG && GET_CODE (SUBREG_REG (x)) == REG
+             && REGNO (SUBREG_REG (x)) < FIRST_PSEUDO_REGISTER
              /* If we're setting only part of a multi-word register,
                 we shall mark it as referenced, because the words
                 that are not being set should be restored.  */
              /* If we're setting only part of a multi-word register,
                 we shall mark it as referenced, because the words
                 that are not being set should be restored.  */