tree-ssa-loop-ivopts.c (computation_cost): Start register numbering at LAST_VIRTUAL_R...
authorDJ Delorie <dj@redhat.com>
Tue, 22 Feb 2005 02:00:56 +0000 (21:00 -0500)
committerDJ Delorie <dj@gcc.gnu.org>
Tue, 22 Feb 2005 02:00:56 +0000 (21:00 -0500)
* tree-ssa-loop-ivopts.c (computation_cost): Start register
numbering at LAST_VIRTUAL_REGISTER+1 to avoid possibly using hard
registers in unsupported ways.
* expmed.c (init_expmed): Likewise.

From-SVN: r95373

gcc/ChangeLog
gcc/expmed.c
gcc/tree-ssa-loop-ivopts.c

index 69ef6a8841e782f8166fa50e8bcc43677a767213..16cb58b19e54ed2dd46f827aef99f72c35ba4d3c 100644 (file)
@@ -1,3 +1,10 @@
+2005-02-21  DJ Delorie  <dj@redhat.com>
+
+       * tree-ssa-loop-ivopts.c (computation_cost): Start register
+       numbering at LAST_VIRTUAL_REGISTER+1 to avoid possibly using hard
+       registers in unsupported ways.
+       * expmed.c (init_expmed): Likewise.
+       
 2005-02-21  Stan Cox  <scox@redhat.com>
 
        * config/iq2000/iq2000.h (DWARF_FRAME_RETURN_COLUMN): Change to 31.
index 55eb7d113d59a5732f2480de83a34ae775401469..afbbaf53869b38d42618e673fe1cb6064c0bd21e 100644 (file)
@@ -145,7 +145,8 @@ init_expmed (void)
   memset (&all, 0, sizeof all);
 
   PUT_CODE (&all.reg, REG);
-  REGNO (&all.reg) = 10000;
+  /* Avoid using hard regs in ways which may be unsupported.  */
+  REGNO (&all.reg) = LAST_VIRTUAL_REGISTER + 1;
 
   PUT_CODE (&all.plus, PLUS);
   XEXP (&all.plus, 0) = &all.reg;
index d1adbabc07b7be0e1c3e2e749a5cc77c0ed0ffa8..8b069d058d7a4fe61b93451f1b278a1bf56b4dd9 100644 (file)
@@ -2427,7 +2427,8 @@ computation_cost (tree expr)
   rtx seq, rslt;
   tree type = TREE_TYPE (expr);
   unsigned cost;
-  int regno = 0;
+  /* Avoid using hard regs in ways which may be unsupported.  */
+  int regno = LAST_VIRTUAL_REGISTER + 1;
 
   walk_tree (&expr, prepare_decl_rtl, &regno, NULL);
   start_sequence ();