Hi Rafael, The Apple gcc compilers produce natural alignment (at both m32 and m64) for long doubles:
For the attached code with: gcc version 4.0.1 (Apple Inc. build 5493) we get: align f = 8 t = 16 ls1 align 16, size 32 offset x 0 ls2 align 16, size 32 offset x 16 ls3 align 16, size 32 offset x 16 align a = 16 b = 16 bar = 16 So, it appears that there is no need to make an exception for long double on darwin. (and the ABI document is possibly somewhat easy to misinterpret about embedded structure alignment for long doubles). It seems that long doubles are, effectively, being treated the same as vectors. So, actually, clang was correct; and the llvm string was under-aligning. === (on the stack, in the case of variadic functions, things might well be different - I need to dig out the code that checks that stuff). Iain
long-double-2.c
Description: Binary data
On 18 Dec 2013, at 01:21, Rafael EspĂndola wrote: > This patch changes two things on the clang DataLayout strings for ppc darwin: > > * The addition of f128:64:128, which was added on r40792 to the llvm > side for ppc-darwin and ppc64-darwin and is still there. > * The addition of f64:32:64 to ppc32-darwin. LLVM used to do this > before r134367, and it looks like that change was unintentional for > darwin. I was using that since at least r28414, which created the > DataLayout string :-)
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
