From: Andi Kleen <ak@suse.de>
To: Arjan van de Ven <arjan@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: Re: patch to use more symbolic constants in asm
Date: Wed, 21 Feb 2007 12:56:43 +0100 [thread overview]
Message-ID: <200702211256.43565.ak@suse.de> (raw)
In-Reply-To: <1172056242.3531.181.camel@laptopd505.fenrus.org>
On Wednesday 21 February 2007 12:10, Arjan van de Ven wrote:
> From: Arjan van de Ven <arjan@linux.intel.com>
> Subject: Use symbolic constants in inline assembly
>
> This patch replaces several of the %0/%1 uses in x86-64 inline assembly
> with symbolic names (this is a new gcc 3.x feature, but that's ok now).
> This tends to, imo, make the inline assembly a lot more readable, and
> for sure it's less error prone in terms of finding which %<number>
> corresponds with which variable.
At least for two arguments i don't really see the value, but ok.
> objdump -d of the vmlinux before and after the patch is the same; also
> boot tested.
You should do i386 too then; one reason I didn't touch bitops
for example was to keep the code more similar.
> static inline void set_cr4(unsigned long cr4)
> {
> - asm volatile("mov %0,%%cr4" :: "r" (cr4) : "memory");
> + asm volatile("mov %[cr4],%%cr4" :: [cr4] "r" (cr4) : "memory");
I'm not sure that's really an improvement for example.
-Andi
prev parent reply other threads:[~2007-02-21 11:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-21 11:10 patch to use more symbolic constants in asm Arjan van de Ven
2007-02-21 11:56 ` Andi Kleen [this message]
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=200702211256.43565.ak@suse.de \
--to=ak@suse.de \
--cc=akpm@osdl.org \
--cc=arjan@linux.intel.com \
--cc=linux-kernel@vger.kernel.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.