public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <dan@debian.org>
To: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Cc: Arjan van de Ven <arjanv@redhat.com>,
	Linus Torvalds <torvalds@osdl.org>,
	Brian Gerst <bgerst@didntduck.org>,
	Linux-Kernel <linux-kernel@vger.kernel.org>
Subject: Re: -mregparm=3 (was  Re: [PATCH] i386 do_machine_check() is redundant.
Date: Mon, 29 Sep 2003 17:40:12 -0400	[thread overview]
Message-ID: <20030929214012.GA12688@nevyn.them.org> (raw)
In-Reply-To: <Pine.LNX.4.58.0309292309050.7824@artax.karlin.mff.cuni.cz>

On Mon, Sep 29, 2003 at 11:36:06PM +0200, Mikulas Patocka wrote:
> 
> 
> On Mon, 29 Sep 2003, Daniel Jacobowitz wrote:
> 
> > On Mon, Sep 29, 2003 at 10:20:45PM +0200, Mikulas Patocka wrote:
> > > > > > Use machine_check_vector in the entry code instead.
> > > > >
> > > > > This is wrong. You just lost the "asmlinkage" thing, which means that it
> > > > > breaks when asmlinkage matters.
> > > > >
> > > > > And yes, asmlinkage _can_ matter, even on x86. It disasbles regparm, for
> > > > > one thing, so it makes a huge difference if the kernel is compiled with
> > > > > -mregparm=3 (which used to work, and which I'd love to do, but gcc has
> > > > > often been a tad fragile).
> > > >
> > > > gcc 3.2 and later are supposed to be ok (eg during 3.2 development a
> > > > long standing bug with regparm was fixed and now is believed to work)...
> > > > since our makefiles check gcc version already... this can be made gcc
> > > > version dependent as well for sure..
> > >
> > > They are still buggy. gcc 3.3.1 miscompiles itself with -mregparm=3
> > > (without -O or -O2 it works). (I am too lazy to spend several days trying
> > > to find exactly which function in gcc was miscompiled, maybe I do it one
> > > day). gcc 2.95.3 compiles gcc 3.3.1 with -mregparm=3 -O2 correctly.
> > > gcc 3.4 doesn't seem to be better.
> > >
> > > gcc 2.7.2.3 has totally broken -mregparm=3, even quite simple programs
> > > fail.
> >
> > You can't build GCC with -mregparm=3.  It changes the interface to
> > system functions.  So unless your libc happened to be built with
> > -mregparm=3, and extensively hacked to expect arguments in registers to
> > the assembly stubs, it can't work.
> 
> Of course I linked it with libc compiled with regparm=3.

Did you also hack all the syscall wrappers and hand-coded assembly
routines?  For instance, mmap won't work.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

  reply	other threads:[~2003-09-29 21:40 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-28 16:29 [PATCH] i386 do_machine_check() is redundant Brian Gerst
2003-09-28 18:24 ` Linus Torvalds
2003-09-28 18:30   ` Brian Gerst
2003-09-28 18:34     ` Linus Torvalds
2003-09-28 18:44       ` Brian Gerst
2003-09-28 19:04   ` Arjan van de Ven
2003-09-29 18:46     ` Linus Torvalds
2003-09-29 19:23       ` Jeff Garzik
2003-09-29 19:54       ` -mregparm=3 (was " Valdis.Kletnieks
2003-09-30  8:28         ` Helge Hafting
2003-09-30 15:29           ` Valdis.Kletnieks
2003-09-30 15:48             ` Linus Torvalds
2003-09-29 20:20     ` Mikulas Patocka
2003-09-29 20:26       ` Daniel Jacobowitz
2003-09-29 21:36         ` Mikulas Patocka
2003-09-29 21:40           ` Daniel Jacobowitz [this message]
2003-09-29 21:43             ` Mikulas Patocka
2003-09-29 21:48           ` Jakub Jelinek
2003-09-30  0:24           ` Jamie Lokier
2003-09-30  4:49           ` Valdis.Kletnieks
2003-09-30  4:55             ` Robert Love
2003-09-30 14:37               ` Valdis.Kletnieks
2003-09-30 15:48                 ` Robert Love

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=20030929214012.GA12688@nevyn.them.org \
    --to=dan@debian.org \
    --cc=arjanv@redhat.com \
    --cc=bgerst@didntduck.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikulas@artax.karlin.mff.cuni.cz \
    --cc=torvalds@osdl.org \
    /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