[xproto: PATCH] Xmd.h: amd64-x32 ABI defines sizeof(long) == sizeof (void*) == 4
slyich at gmail.com
Wed Dec 21 09:24:10 PST 2011
[ CCing H.J.
the thread start: http://firstname.lastname@example.org/msg27303.html
reply to: http://email@example.com/msg27338.html
> >>> What would you prefer?
> >> Is there any real benefit to "AMD64-x32" over simply x86-32
> > Whole AMD64 ISA is accessible: twice as much registers (including xmm/ymm),
> > instruction extensions available only in "long mode".
> > It helps help codecs embedded into browsers and players.
> > C calling convention uses registers (first six integer parameters go to registers)
> > which reduces stack memory traffic.
> > Quite nice comparing to what we have in ia32.
> So use AMD64 then.
> >> or AMD64 for X applications?
> > Pointer memory footprint is on ia32 level. Saves Dcache and RAM for huge programs
> > with large amount of references (like firefox and KDE).
> Few of the X.Org applications will fall into that set.
> In any case, if it's so useful, why not make a real ABI out of it, instead of
> breaking the existing AMD64 ABI defines? Just define __amd64_x32__ or
> whatever instead, don't break existing code that knows what __amd64__ means.
What do you think of changing predefined __amd64__ define in gcc to something
If it's not an option, how about adding one more define for those who like to check
for this exact feature on all compilers (and not only gcc)?
So thread start's use case would look like
-# define LONG64
+#if defined(__amd64__) && !defined(__amd64_x32__)
+# define LONG64
which would be less fragile for existing compilers.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 198 bytes
Desc: not available
More information about the xorg-devel