From: "Jan Beulich" Subject: Re: uint64_aligned_t not compatible across gcc versions Date: Tue, 29 Aug 2006 13:46:41 +0100 Message-ID: <44F45351.76E4.0078.0@novell.com> References: <44F328A7.76E4.0078.0@novell.com> <44F42F59.76E4.0078.0@novell.com> <20060829123809.GA15327@totally.trollied.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20060829123809.GA15327@totally.trollied.org> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: John Levon Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >>> John Levon 29.08.06 14:38 >>> >On Tue, Aug 29, 2006 at 12:13:13PM +0200, Jan Beulich wrote: > >> Here my take at it. This actually also replaces the patch sent under >> the same subject yesterday, as I meanwhile realized there's a simpler >> way to achieve the desired effect. It also converts the 64-bit store >> to a 32-bit one, as only the upper 32 bits need clearing. >> >> Signed-off-by: Jan Beulich >> >> Index: 2006-08-28/xen/include/public/arch-x86_32.h >> =================================================================== >> --- 2006-08-28.orig/xen/include/public/arch-x86_32.h 2006-08-28 08:32:38.000000000 +0200 >> +++ 2006-08-28/xen/include/public/arch-x86_32.h 2006-08-29 11:15:44.000000000 +0200 >> @@ -29,11 +29,11 @@ >> >> /* Structural guest handles introduced in 0x00030201. */ >> #if (defined(__XEN__) || defined(__XEN_TOOLS__)) && !defined(__ASSEMBLY__) >> -typedef uint64_t __attribute__((aligned(8))) uint64_aligned_t; >> +#define uint64_aligned_t uint64_t __attribute__((__aligned__(8))) > >This is GCC-specific, in a public header. At the very least it needs to >be conditional on gcc being used (#define __xen_aligned or whatever)... That is a comment regarding the original change, then. I still agree this should be abstracted out in some way - the question is how, since I guess users of other compilers would need to provide input. Jan