OSDN Git Service

2002-05-15 Aldy Hernandez <aldyh@redhat.com>
authoraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 May 2002 00:06:39 +0000 (00:06 +0000)
committeraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 May 2002 00:06:39 +0000 (00:06 +0000)
        * reload1.c (forget_old_reloads_1): Do not use subreg offset.

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

gcc/ChangeLog
gcc/reload1.c

index 0d3f409..0613e30 100644 (file)
@@ -1,5 +1,9 @@
 2002-05-15  Aldy Hernandez  <aldyh@redhat.com>
 
+        * reload1.c (forget_old_reloads_1): Do not use subreg offset.
+
+2002-05-15  Aldy Hernandez  <aldyh@redhat.com>
+
         * config/rs6000/rs6000.md ("altivec_mtvscr"): Set VSCR register.
         ("altivec_mfvscr"): Read from VSCR.
 
index 1bcd29b..1349c3c 100644 (file)
@@ -4098,23 +4098,21 @@ forget_old_reloads_1 (x, ignored, data)
 {
   unsigned int regno;
   unsigned int nr;
-  int offset = 0;
 
   /* note_stores does give us subregs of hard regs,
      subreg_regno_offset will abort if it is not a hard reg.  */
   while (GET_CODE (x) == SUBREG)
     {
-      offset += subreg_regno_offset (REGNO (SUBREG_REG (x)),
-                                    GET_MODE (SUBREG_REG (x)),
-                                    SUBREG_BYTE (x),
-                                    GET_MODE (x));
+      /* We ignore the subreg offset when calculating the regno,
+        because we are using the entire underlying hard register
+        below.  */
       x = SUBREG_REG (x);
     }
 
   if (GET_CODE (x) != REG)
     return;
 
-  regno = REGNO (x) + offset;
+  regno = REGNO (x);
 
   if (regno >= FIRST_PSEUDO_REGISTER)
     nr = 1;