*** empty log message ***
authorRichard Stallman <rms@gnu.org>
Mon, 14 Sep 1992 14:33:07 +0000 (14:33 +0000)
committerRichard Stallman <rms@gnu.org>
Mon, 14 Sep 1992 14:33:07 +0000 (14:33 +0000)
From-SVN: r2119

gcc/reload1.c

index 8eee024c7f02508ebb478c72f4d1bcfd2e62a78a..6f972f43b37d773640aabe3549b7bb9424a5e21a 100644 (file)
@@ -364,13 +364,20 @@ init_reload ()
 
   /* See if reg+reg is a valid (and offsettable) address.  */
 
-  tem = gen_rtx (PLUS, Pmode,
-                gen_rtx (REG, Pmode, FRAME_POINTER_REGNUM),
-                gen_rtx (REG, Pmode, FRAME_POINTER_REGNUM));
-  /* This way, we make sure that reg+reg is an offsettable address.  */
-  tem = plus_constant (tem, 4);
+  for (i = 0; i < FIRST_PSEUDO_REGSTER; i++)
+    {
+      tem = gen_rtx (PLUS, Pmode,
+                    gen_rtx (REG, Pmode, FRAME_POINTER_REGNUM),
+                    gen_rtx (REG, Pmode, i));
+      /* This way, we make sure that reg+reg is an offsettable address.  */
+      tem = plus_constant (tem, 4);
 
-  double_reg_address_ok = memory_address_p (QImode, tem);
+      if (memory_address_p (QImode, tem))
+       {
+         double_reg_address_ok = 1;
+         break;
+       }
+    }
 
   /* Initialize obstack for our rtl allocation. */
   gcc_obstack_init (&reload_obstack);