reload1.c (spill_hard_reg): Check mode of register when spilling from scratch_list.
authorCatherine Moore <clm@cygnus.com>
Wed, 17 Jun 1998 15:46:25 +0000 (15:46 +0000)
committerCatherine Moore <clm@gcc.gnu.org>
Wed, 17 Jun 1998 15:46:25 +0000 (11:46 -0400)
Wed Jun 17 15:20:00 PDT 1998  Catherine Moore  <clm@cygnus.com>
         * reload1.c (spill_hard_reg):  Check mode of register when
         spilling from scratch_list.

From-SVN: r20542

gcc/ChangeLog
gcc/reload1.c

index b6f2d3d3dc5175d546053f4d6bcf88eba9e926e5..7bd21357269fa259cc744be92d30b44ebb06ae73 100644 (file)
@@ -1,3 +1,8 @@
+Wed Jun 17 15:20:00 PDT 1998  Catherine Moore  <clm@cygnus.com>
+
+         * reload1.c (spill_hard_reg):  Check mode of register when
+         spilling from scratch_list.
 Wed Jun 17 16:25:38 EDT 1998  Andrew MacLeod  (amacleod@cygnus.com)
 
        * except.c (add_new_handler): fix bug in finding last region handler.
index b69ee760e5c843914dc31d3ecaa923398735bba5..0e22651124d8ad7012bf21260fbb870d24888780 100644 (file)
@@ -3717,7 +3717,11 @@ spill_hard_reg (regno, global, dumpfile, cant_eliminate)
       }
   for (i = 0; i < scratch_list_length; i++)
     {
-      if (scratch_list[i] && REGNO (scratch_list[i]) == regno)
+     if (scratch_list[i] 
+          && regno >= REGNO (scratch_list[i]) 
+          && regno <  REGNO (scratch_list[i]) 
+                      + HARD_REGNO_NREGS (REGNO (scratch_list[i]),
+                                          GET_MODE (scratch_list[i])))
        {
          if (! cant_eliminate && basic_block_needs[0]
              && ! basic_block_needs[(int) class][scratch_block[i]])