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: meissner at cygnus dot com (Michael Meissner)
- Subject: Re: The current egcs is broken on x86
- From: hjl at lucon dot org (H.J. Lu)
- Date: Mon, 15 Jun 1998 14:31:39 -0700 (PDT)
- Cc: hjl at lucon dot org, wilson at cygnus dot com, 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))
> {
Why this? Have you looked my version? It doesn't make any senses
to call single_set nor reg_mentioned_p if REG_LIVE_LENGTH is
negative.
H.J.