[LLVMdev] x86_fp80, f80, and -m96bit-long-double

Chris Lattner clattner at apple.com
Mon Nov 1 13:49:20 PDT 2010


On Nov 1, 2010, at 12:03 PM, Jonas Maebe wrote:

> 
> On 01 Nov 2010, at 18:37, Duncan Sands wrote:
> 
>> I think the "fact" that x86 long double is 16 byte aligned on x86-64 is
>> hard-wired in.
> 
> Note that it's not just about alignment, but mainly about the reserved storage size.
> 
>> I'm not sure how hard this would be to control via a
>> command line option (i.e. -m96bit-long-double).
> 
> Is there no different way to go about this? Our compiler currently supports the x87 long double type as
> a) 10 bytes, for Turbo Pascal and Delphi-compatibility
> b) 12 bytes, for non-Darwin ABI/C x86 compatibility
> c) 16 bytes, for Darwin x86 ABI/C and x86_64 ABI/C compatibility
> 
> long doubles of type a) and c), or of type b) and c), can occur in the same compilation unit. A command line switch does not offer sufficient flexibility in this case.

The right fix for this is to find the assumptions in the code generator and fix them.

-Chris



More information about the llvm-dev mailing list