From: Andrea Arcangeli <andrea@novell.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: RFC: avoid asmlinkage on x86 traps/interrupts
Date: Thu, 4 Nov 2004 03:08:35 +0100 [thread overview]
Message-ID: <20041104020835.GL3571@dualathlon.random> (raw)
In-Reply-To: <Pine.LNX.4.58.0411030719061.2187@ppc970.osdl.org>
On Wed, Nov 03, 2004 at 07:19:59AM -0800, Linus Torvalds wrote:
>
>
> On Wed, 3 Nov 2004, Andrea Arcangeli wrote:
> >
> > I guess it'd be nicer to simply move the output into the input with "a",
> > "d", "b", and the not add any output at all, and put "eax/edx" back into
> > the clobbers.
>
> Ehh.. You aren't allowed to clobber inputs. Try it with any modern version
> of gcc.
Didn't know about that, thanks.
I wonder why they don't forbid it completely then. I mean, what's magic
about an input parmeter here? Clobbers are about the internals of
the asm (they've nothing to do about the setup before the asm runs, and
the input only has to do with the prepartion, so clobbers and input
seems fully orthogonal concepts to me). The only reason clobber exists
is to avoid you to declare a worthless local variable, clobbers are
strictly needed only for "cc" and "memory" (or any other piece of cpu not
reachable via the output operands). So I believe they should allow
general purpose register clobbers always or never, I don't see why
there's this special case. Maybe for robustness to force people to
write a more verbose version like you had to do for this reason? No idea.
next prev parent reply other threads:[~2004-11-04 2:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-02 20:56 RFC: avoid asmlinkage on x86 traps/interrupts Linus Torvalds
2004-11-03 9:07 ` Andrea Arcangeli
2004-11-03 15:19 ` Linus Torvalds
2004-11-04 2:08 ` Andrea Arcangeli [this message]
2004-11-04 3:40 ` Linus Torvalds
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=20041104020835.GL3571@dualathlon.random \
--to=andrea@novell.com \
--cc=linux-kernel@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.