public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Horst von Brand <vonbrand@inf.utfsm.cl>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: "Martin.Dalecki" <dalecki@u23.num.math.uni-goettingen.de>,
	egcs@cygnus.com, linux kernel <linux-kernel@vger.rutgers.edu>
Subject: Re: linux and EGCS PATCH
Date: Wed, 10 Dec 1997 08:57:00 -0000	[thread overview]
Message-ID: <199712101655.NAA04438@pincoya.inf.utfsm.cl> (raw)
In-Reply-To: <Pine.LNX.3.95.971205094911.18973C-100000@penguin.transmeta.com>

Linus Torvalds <torvalds@transmeta.com> said:
> On Fri, 5 Dec 1997, Martin.Dalecki wrote:
> > The following little patch resolvs the compilation problems for the linux
> > kernel with the just releases egcs-1.0 compiler. It seems to be correct
> > anyway. 

> I much prefer to just mark the "load_ldt()" asm as volatile, or as
> changing memory. Both of those should correctly tell egcs that it
> shouldn't move the ldt loading to before the ldt is set up completely. 

> Good to see that egcs seems to be much more aggressive at these things, as
> far as I can tell egcs did the right thing given the constraints it had.

But without Martin's patch linux-2.1.72 won't compile with egcs-971207.

Anyway, there seem to be lots of gray areas here, and stuff you can get
away with, but shouldn't.  The core problem is that the offending asm() has
too much arguments, egcs tries to put each into different registers and
goes down cause it can't.  Inhibiting certain optimizations make it realize
that they can all be represented as varying bases for the same offset, and
everything is peachy. But (if I understand the documentation on asm() for
gcc correctly) this is definitely _not_ guarranteed in any way... you can
get away with it because gcc synthetizes the different arguments using the
same registers.

Perhaps (if doing stuff like this is at all common) a way to say that some
place is a base and others offset from it?
-- 
Dr. Horst H. von Brand                       mailto:vonbrand@inf.utfsm.cl
Departamento de Informatica                     Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria              +56 32 654239
Casilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513

  parent reply	other threads:[~1997-12-10  8:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-12-05  1:17 Martin.Dalecki
1997-12-05 10:44 ` Linus Torvalds
1997-12-06  8:41   ` Jeffrey A Law
1997-12-10  8:57   ` Horst von Brand [this message]
1997-12-10 10:58     ` Paul Koning
1997-12-10 10:58     ` Linus Torvalds
1997-12-11 16:33 Daniel Egger
1997-12-12 10:18 ` linux kernel account

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=199712101655.NAA04438@pincoya.inf.utfsm.cl \
    --to=vonbrand@inf.utfsm.cl \
    --cc=dalecki@u23.num.math.uni-goettingen.de \
    --cc=egcs@cygnus.com \
    --cc=linux-kernel@vger.rutgers.edu \
    --cc=torvalds@transmeta.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).