public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: hjl@lucon.org (H.J. Lu)
To: law@cygnus.com
Cc: gafton@redhat.com, rth@cygnus.com, egcs@cygnus.com,
	crux@pool.informatik.rwth-aachen.de, scox@cygnus.com
Subject: Re: egcs 1.0.2 is broken on x86 and a patch for it.
Date: Mon, 20 Apr 1998 13:06:00 -0000	[thread overview]
Message-ID: <m0yRI1z-00059IC@ocean.lucon.org> (raw)
In-Reply-To: <17624.893055503@hurl.cygnus.com>

>   > Basically convert_regs () calls change_stack () with INSN to emit
>   > some insn after INSN. But some insn has been added after INSN so
>   > that change_stack () will emit some insn at the wrong place. As the
>   > result, the floating point is broken on x86.
> This is an extremely confusing explanation, primarily because you
> use "insn"/INSN to refer to three different things.
> 
> Basically is sounds like you have
> 
> 	insn 1
>         insn 2
> 
> 
> It sounds like we thought we wanted to insert after insn 1, but
> because of other reg-stack actions we really wanted to insert
> after insn 2.
> 
>   > This patch seems to fix it. Could someone please take a look? Given
>   > the bugs we have seen in egcs 1.0.2, I suggest egcs 1.0.3 be made.
> I must confess I don't undersatnd reg-stack all that well.  Assuming
> your analysis and explanation are correct, then I think your change
> is OK, though possibly incomplete.
> 
> In particular I worry that we need to pass "new" instead of "insn"
> to the call to emit_pop_insn near the end of convert_regs.  I think
> the call to goto_block_pat in convert_regs is OK.

I don't think using "new" will be a problem. At least, it should
introduce a new bug. I don't think subst_stack_regs will add a JUMP
INSN. If it does, that may be a bug in reg-stack.c by itself. We can
add

	if (new != insn && GET_CODE (new) == JUMP_INSN)
	  abort ();

to catch that.

How about straighten_stack () just before convert_regs () returns?

> 
> I also worry that there may be cases were we need to insert after
> insn 1 instead of after insn 2.  But I don't know reg-stack well

That is possible, but not likely. As I said in my previous email.
insn 2 is really the part of insn 1 in this case. Put anything
in between will defeat the whole purpose of inserting insn 2 after
insn 1.


-- 
H.J. Lu (hjl@gnu.org)

  parent reply	other threads:[~1998-04-20 13:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.3.96.980414173903.3672J-100000@alien.redhat.com>
1998-04-15 19:57 ` H.J. Lu
1998-04-20  0:56   ` Jeffrey A Law
1998-04-20 13:06     ` reg-stack.c problem H.J. Lu
1998-04-20 13:06     ` egcs 1.0.2 is broken on x86 and a patch for it H.J. Lu
1998-04-20 13:06     ` H.J. Lu [this message]
1998-04-22  9:05     ` Bernd Schmidt
1998-04-22  8:38       ` H.J. Lu
1998-04-23 21:12       ` Jim Wilson
1998-04-24 16:23         ` Jeffrey A Law
1998-04-24 16:23           ` H.J. Lu
1998-04-27 19:48         ` Jim Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m0yRI1z-00059IC@ocean.lucon.org \
    --to=hjl@lucon.org \
    --cc=crux@pool.informatik.rwth-aachen.de \
    --cc=egcs@cygnus.com \
    --cc=gafton@redhat.com \
    --cc=law@cygnus.com \
    --cc=rth@cygnus.com \
    --cc=scox@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).