lkml.org 
[lkml]   [2008]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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 ... */


\
 
 \ /
  Last update: 2008-06-17 00:55    [W:0.062 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site