Messages in this thread |  | | Date | Mon, 16 Jun 2008 15:48:51 -0700 | From | "H. Peter Anvin" <> | Subject | Re: [PATCH] x86: make asm/asm.h work for asm code. |
| |
Jeremy Fitzhardinge wrote: > This is useful for unifying some pieces of asm code. > > Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Thinking about it some more, this should be possible to do cleaner like this:
#ifdef CONFIG_X86_32 # ifdef __ASSEMBLY__ # define __ASM_SEL(a,b) a # else # define __ASM_SEL(a,b) " " #a " " # endif #else # ifdef __ASSEMBLY__ # define __ASM_SEL(a,b) b # else # define __ASM_SEL(a,b) " " #b " " # endif #endif
#define _ASM_INC _ASM_SEL(incl,incq) #define _ASM_DEC _ASM_SEL(decl,decq)
/* ... etc ... */
|  |