This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: The current egcs is broken on x86
- To: hjl at lucon dot org, wilson at cygnus dot com
- Subject: Re: The current egcs is broken on x86
- From: Michael Meissner <meissner at cygnus dot com>
- Date: Mon, 15 Jun 1998 17:28:52 -0400
- Cc: egcs at cygnus dot com, john at feith dot com, meissner at cygnus dot com, schwab at issan dot informatik dot uni-dortmund dot de
| This is a bug in Meissner's regmove.c change. Here is a workaround patch.
|
| Mike, can you please look at this and work up a better patch?
The problem with the patch was the tests against REG_LIVE_LENGTH were done
after the validate_replace_rtx call, which updates the insn in place. This
patch (which I'm about to comit) should fix the problem (it does allow the
compiler to bootstrap on the x86):
Mon Jun 15 17:06:43 1998 Michael Meissner <meissner@cygnus.com>
Jim Wilson <wilson@cygnus.com>
* regmove.c (copy_src_to_dest): Do not copy src to dest if either
the source or destination is special.
*** regmove.c.save Mon Jun 15 15:11:01 1998
--- regmove.c Mon Jun 15 17:12:23 1998
***************
*** 555,563 ****
--- 555,570 ----
int insn_uid;
int move_uid;
+ /* A REG_LIVE_LENGTH of -1 indicates the register is equivalent to a constant
+ or memory location and is used infrequently; a REG_LIVE_LENGTH of -2 is
+ parameter when there is no frame pointer that is not allocated a register.
+ For now, we just reject them, rather than incrementing the live length. */
+
if (GET_CODE (src) == REG && GET_CODE (dest) == REG
&& (set = single_set (insn)) != NULL_RTX
&& !reg_mentioned_p (dest, SET_SRC (set))
+ && REG_LIVE_LENGTH (REGNO (dest)) > 0
+ && REG_LIVE_LENGTH (REGNO (src)) > 0
&& validate_replace_rtx (src, dest, insn))
{
/* Generate the src->dest move. */
--
Michael Meissner, Cygnus Solutions (Massachusetts office)
4th floor, 955 Massachusetts Avenue, Cambridge, MA 02139, USA
meissner@cygnus.com, 617-354-5416 (office), 617-354-7161 (fax)