From: DJ Delorie Date: Tue, 22 Feb 2005 02:00:56 +0000 (-0500) Subject: tree-ssa-loop-ivopts.c (computation_cost): Start register numbering at LAST_VIRTUAL_R... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1d27fed446abb6a831261c004803cf23d994b296;p=gcc.git tree-ssa-loop-ivopts.c (computation_cost): Start register numbering at LAST_VIRTUAL_REGISTER+1 to avoid possibly using... * 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 69ef6a8841e..16cb58b19e5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2005-02-21 DJ Delorie + + * 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 * config/iq2000/iq2000.h (DWARF_FRAME_RETURN_COLUMN): Change to 31. diff --git a/gcc/expmed.c b/gcc/expmed.c index 55eb7d113d5..afbbaf53869 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -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; diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index d1adbabc07b..8b069d058d7 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -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, ®no, NULL); start_sequence ();