This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: regmove bug
- To: Joern Rennecke <amylaar at cygnus dot co dot uk>, law at cygnus dot com
- Subject: Re: regmove bug
- From: Richard Henderson <rth at cygnus dot com>
- Date: Sun, 21 Feb 1999 13:12:57 -0800
- Cc: egcs at egcs dot cygnus dot com, egcs-patches at egcs dot cygnus dot com
- References: <865.919595527@upchuck> <199902211200.MAA12903@phal.cygnus.co.uk>
On Sun, Feb 21, 1999 at 12:00:07PM +0000, Joern Rennecke wrote:
> Considering this, I think it's best to remove all cc0 code from
> discover_flags_reg, and in mark_flags_life_zones, add at the start...
Agreed. I've checked in this patch to correct the situation.
My apologies for not testing a cc0 system before checking the
first patch in.
r~
* regmove.c (discover_flags_reg): Remove cc0 code.
(mark_flags_life_zones) [HAVE_cc0]: Force use of cc0; bail if
a potential flags register was identified.
Index: regmove.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/regmove.c,v
retrieving revision 1.53
diff -c -p -d -r1.53 regmove.c
*** regmove.c 1999/02/19 23:02:58 1.53
--- regmove.c 1999/02/21 21:08:14
*************** discover_flags_reg ()
*** 193,204 ****
return pc_rtx;
found = (GET_CODE (tmp) == REG && REGNO (tmp) < FIRST_PSEUDO_REGISTER);
- #ifdef HAVE_cc0
- /* If we're cc0, and we found a potential flags reg, bail. */
- return (found ? pc_rtx : cc0_rtx);
- #else
return (found ? tmp : NULL_RTX);
- #endif
}
return pc_rtx;
--- 193,199 ----
*************** mark_flags_life_zones (flags)
*** 228,233 ****
--- 223,236 ----
int flags_nregs;
int block;
+ #ifdef HAVE_cc0
+ /* If we found a flags register on a cc0 host, bail. */
+ if (flags == NULL_RTX)
+ flags = cc0_rtx;
+ else if (flags != cc0_rtx)
+ flags = pc_rtx;
+ #endif
+
/* Simple cases first: if no flags, clear all modes. If confusing,
mark the entire function as being in a flags shadow. */
if (flags == NULL_RTX || flags == pc_rtx)