public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "H . J . Lu" <hjl@lucon.org>
To: Richard Henderson <rth@redhat.com>, gcc-patches@gcc.gnu.org
Subject: Re: gcc failed to bootstrap on Linux/mipsel
Date: Wed, 30 Jan 2002 09:29:00 -0000	[thread overview]
Message-ID: <20020130090555.A31122@lucon.org> (raw)
In-Reply-To: <20020130003622.A8747@redhat.com>; from rth@redhat.com on Wed, Jan 30, 2002 at 12:36:22AM -0800

On Wed, Jan 30, 2002 at 12:36:22AM -0800, Richard Henderson wrote:
> On Wed, Jan 30, 2002 at 12:23:23AM -0800, H . J . Lu wrote:
> > Richarrd, almost every single file in gcc is miscompiled by your change.
> 
> "Different" != "miscompiled".  There were zero functional changes

It is miscompiled.

> in the diff you posted.  The breakage is elsewhere.

Please read

http://gcc.gnu.org/ml/gcc-patches/2002-01/msg02117.html

one more time. The good init_standard_includes has

	.frame  $fp,72,$31 
	...
	move    $fp,$sp
	...
	la      $25,getenv
	jal     $31,$25

But with your change, it becomes

	.frame  $fp,72,$31 
	...
	la      $25,getenv
	jal     $31,$25
	...
	move    $fp,$sp

The o32 assmebler has to turn

	la      $25,getenv
	jal     $31,$25

into
	la      $25,getenv
	jal     $31,$25
	lw      gp,16(frame_register)

That is why it failed at

0x479f34 <init_standard_includes+108>:  lw      gp,16(s8)

since you moved the initialization of s8/fp after "jal". That is a very
bad idea. You have to set the frame register before making any external
calls so that the assembler can restore gp after the function return.
Could you please fix your change?

Thanks.


H.J.

  reply	other threads:[~2002-01-30 17:05 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-27 17:36 H . J . Lu
2002-01-28 12:47 ` H . J . Lu
2002-01-28 13:01   ` Richard Henderson
2002-01-29 23:37     ` H . J . Lu
2002-01-30  0:36       ` H . J . Lu
2002-01-30  0:40         ` Richard Henderson
2002-01-30  9:29           ` H . J . Lu [this message]
2002-01-30 10:09             ` Richard Henderson
2002-01-27 19:41 John David Anglin
2002-01-27 22:45 ` H . J . Lu
2002-01-28  7:27 ` Geoff Keating
2002-01-28  9:04   ` John David Anglin
     [not found] <no.id>
2002-01-28  9:28 ` John David Anglin
2002-01-28 11:10   ` Richard Henderson
2002-01-28 11:18     ` John David Anglin
2002-01-28 11:19       ` Richard Henderson
2002-01-28 11:39         ` John David Anglin
2002-01-28 12:07           ` Richard Henderson
2002-01-28 16:04             ` John David Anglin
2002-01-28 17:00               ` Richard Henderson

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=20020130090555.A31122@lucon.org \
    --to=hjl@lucon.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rth@redhat.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).