regrename.c (regrename_optimize): frame pointer register can use a few hardregs.
authorDenis Chertykov <denisc@overta.ru>
Sat, 19 May 2001 05:59:52 +0000 (05:59 +0000)
committerDenis Chertykov <denisc@gcc.gnu.org>
Sat, 19 May 2001 05:59:52 +0000 (09:59 +0400)
* regrename.c (regrename_optimize): frame pointer register can
use a few hardregs.

From-SVN: r42305

gcc/ChangeLog
gcc/regrename.c

index cc19c90c9baf27ab09b685f178aed56ed0c0624c..4595878f93060eb5b8f260c3b6d90d0b195d4ad7 100644 (file)
@@ -1,3 +1,8 @@
+Sat May 19 09:40:45 2001  Denis Chertykov  <denisc@overta.ru>
+
+       * regrename.c (regrename_optimize): frame pointer register can
+       use a few hardregs.
+
 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
 
        * README.DWARF: Move into dwarfout.c.
index bad6624f59d07ab2e74142880b77e44dbbee87dd..b34e7c56b5196dac82352fc489b1132ec9e7964f 100644 (file)
@@ -1,5 +1,5 @@
 /* Register renaming for the GNU compiler.
-   Copyright (C) 2000 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
 
    This file is part of GNU CC.
 
@@ -219,9 +219,14 @@ regrename_optimize ()
       /* Don't clobber traceback for noreturn functions.  */
       if (frame_pointer_needed)
        {
-         SET_HARD_REG_BIT (unavailable, FRAME_POINTER_REGNUM);
+         int i;
+         
+         for (i = HARD_REGNO_NREGS (FRAME_POINTER_REGNUM, Pmode); i--;)
+           SET_HARD_REG_BIT (unavailable, FRAME_POINTER_REGNUM + i);
+         
 #if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
-         SET_HARD_REG_BIT (unavailable, HARD_FRAME_POINTER_REGNUM);
+         for (i = HARD_REGNO_NREGS (HARD_FRAME_POINTER_REGNUM, Pmode); i--;)
+           SET_HARD_REG_BIT (unavailable, HARD_FRAME_POINTER_REGNUM + i);
 #endif
        }