login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
October
»
31
Re: [PATCH] Add asm-compat.h to x86
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Jeremy Fitzhardinge <jeremy@...>
To: Mathieu Desnoyers <mathieu.desnoyers@...>
Cc: Thomas Gleixner <tglx@...>, Ingo Molnar <mingo@...>, H. Peter Anvin <hpa@...>, <linux-kernel@...>, Glauber de Oliveira Costa <glommer@...>
Subject:
Re: [PATCH] Add asm-compat.h to x86
Date: Tuesday, October 30, 2007 - 9:27 pm
Mathieu Desnoyers wrote:
quoted text
> Add asm-compat.h to x86 > > In assembly code and in gcc inline assembly, we need .long to express a "c long" > type on i386 and a .quad to express the same on x86_64. Use macros similar to > powerpc "PPC_LONG" to express those. Name chosen: ASM_LONG. (didn't feel like > X86_LONG was required). > > This is useful in inline assembly within code shared between 32 and 64 > bits architectures in x86. > > More compatible assembly macros could be added in this header later when > needed. > > I had to create this to implement a merged optimized immediate values > header for x86. >
Seems sound to me, and this header might be a useful place to put other things, like macros to emit exceptions, etc... J
quoted text
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> > CC: Thomas Gleixner <tglx@linutronix.de> > CC: Ingo Molnar <mingo@elte.hu> > CC: "H. Peter Anvin" <hpa@zytor.com> > --- > include/asm-x86/asm-compat.h | 29 +++++++++++++++++++++++++++++ > 1 file changed, 29 insertions(+) > > Index: linux-2.6-lttng/include/asm-x86/asm-compat.h > =================================================================== > --- /dev/null 1970-01-01 00:00:00.000000000 +0000 > +++ linux-2.6-lttng/include/asm-x86/asm-compat.h 2007-10-24 09:41:09.000000000 -0400 > @@ -0,0 +1,29 @@ > +#ifndef _ASM_X86_ASM_COMPAT_H > +#define _ASM_X86_ASM_COMPAT_H > + > +#include <asm/types.h> > + > +#ifdef __ASSEMBLY__ > +# define stringify_in_c(...) __VA_ARGS__ > +# define ASM_CONST(x) x > +#else > +/* This version of stringify will deal with commas... */ > +# define __stringify_in_c(...) #__VA_ARGS__ > +# define stringify_in_c(...) __stringify_in_c(__VA_ARGS__) " " > +# define __ASM_CONST(x) x##UL > +# define ASM_CONST(x) __ASM_CONST(x) > +#endif > + > +#ifdef CONFIG_X86_64 > + > +/* operations for longs and pointers */ > +#define ASM_LONG stringify_in_c(.quad) > + > +#else /* 32-bit */ > + > +/* operations for longs and pointers */ > +#define ASM_LONG stringify_in_c(.long) > + > +#endif > + > +#endif /* _ASM_X86_ASM_COMPAT_H */ > >
-
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] Add asm-compat.h to x86
, Mathieu Desnoyers
, (Tue Oct 30, 10:55 am)
Re: [PATCH] Add asm-compat.h to x86
, Jeremy Fitzhardinge
, (Tue Oct 30, 9:27 pm)
Re: [PATCH] Add asm-compat.h to x86
, Glauber de Oliveira Costa...
, (Tue Oct 30, 9:30 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
david
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Greg KH
[2.6.22.2 review 05/84] Fix deadlocks in sparc serial console.
Greg KH
[GIT PATCH] driver core patches against 2.6.24
Andrew Morton
-mm merge plans for 2.6.23
git
:
linux-netdev
:
Jeff Kirsher
[RESEND][NET-NEXT PATCH 01/29] ixgbe: fix bug where using wake queue instead of st...
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
Jarek Poplawski
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Patrick McHardy
Re: [GIT]: Networking
netbsd-tech-kern
:
Manuel Bouyer
Re: Interactive performance in -current
Christian Limpach
Re: newfs: determining file system parameters
YAMAMOTO Takashi
Re: statvfs(2) replacement for statfs(2) patch
Charles M. Hannum
Re: kern/22869: Slave IDE drive not detected
Colocation donated by:
Who's online
There are currently
2 users
and
1067 guests
online.
Online users
bestelectrictoo
ernestot1
Syndicate