[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <200702211256.43565.ak@suse.de>
Date: Wed, 21 Feb 2007 12:56:43 +0100
From: Andi Kleen <ak@...e.de>
To: Arjan van de Ven <arjan@...ux.intel.com>
Cc: linux-kernel@...r.kernel.org, akpm@...l.org
Subject: Re: patch to use more symbolic constants in asm
On Wednesday 21 February 2007 12:10, Arjan van de Ven wrote:
> From: Arjan van de Ven <arjan@...ux.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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists