Re: [PATCH] x86: make asm/asm.h work for asm code.

From: H. Peter Anvin
Date: Mon Jun 16 2008 - 18:52:20 EST


Jeremy Fitzhardinge wrote:
This is useful for unifying some pieces of asm code.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>

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 ... */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/