[patch] Fix long double alignment on 32 bit SVR4 ppc.

Hal Finkel hfinkel at anl.gov
Thu Dec 19 08:16:13 PST 2013


Rafael,

I'm not sure about this:

$ cat /tmp/a.c
#include <stdio.h>

int main() {
	long double x;
	printf("%d\n", __alignof__(x));
}


$ gcc -o /tmp/a /tmp/a.c
$ /tmp/a
16

$ gcc -m32 -o /tmp/a /tmp/a.c
$ /tmp/a
16

 -Hal

----- Original Message -----
> From: "Rafael EspĂ­ndola" <rafael.espindola at gmail.com>
> To: "llvm-commits" <llvm-commits at cs.uiuc.edu>
> Cc: "Hal Finkel" <hfinkel at anl.gov>, "William J. Schmidt" <wschmidt at linux.vnet.ibm.com>
> Sent: Wednesday, December 18, 2013 9:32:49 AM
> Subject: Re: [patch] Fix long double alignment on 32 bit SVR4 ppc.
> 
> A patch rebased to current trunk is attached.
> 
> 
> On 17 December 2013 19:45, Rafael EspĂ­ndola
> <rafael.espindola at gmail.com> wrote:
> > I am pretty sure that in non darwin systems a long double has
> > natural
> > alignment. The attached patch fixes the DataLayout string llvm
> > computes for such system. The clang produced one is already
> > correct.
> >
> > Cheers,
> > Rafael
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory




More information about the llvm-commits mailing list