[llvm-commits] [llvm-gcc-4.0] r43134 - in /llvm-gcc-4.0/trunk/gcc/config/rs6000: darwin-ldouble.c darwin-libgcc.10.4.ver darwin-libgcc.10.5.ver darwin.h

Dale Johannesen dalej at apple.com
Thu Oct 18 16:00:13 PDT 2007


On Oct 18, 2007, at 3:51 PM, Chris Lattner wrote:

>
> On Oct 18, 2007, at 2:09 PM, Dale Johannesen wrote:
>
>>
>> On Oct 18, 2007, at 1:04 PM, Chris Lattner wrote:
>>>>    /* Use fused multiply-add to get low part of a * c.  */
>>>> -/* APPLE LOCAL begin LLVM */
>>>> -#ifndef __llvm__  /* FIXME: no long double support! */
>>>>    asm ("fmsub %0,%1,%2,%3" : "=f"(tau) : "f"(a), "f"(c), "f"(t));
>>>> -#endif
>>>
>>> Have you tested to see if long double works with inline asm?
>>
>> No; there are no long double instructions, so I'm not sure how you
>> would write such a thing in inline asm.
>> (The asm in the fix above breaks the long double into two doubles
>> explicitly, and I'd expect that to be the common practice).
>
> Yep, tha'ts what I mean: when the above gets broken into the two
> component registers, do they come through correctly in the .s file?

The above does not get broken into component registers by the compiler.
Those are double variables and double registers.   The function is  
declared
as taking 4 double arguments.  The excuse for this in the code is

/* All these routines actually take two long doubles as parameters,
    but GCC currently generates poor code when a union is used to turn
    a long double into a pair of doubles.  */

but the inability to reference long doubles in asm's may have had  
something
to do with it also.







More information about the llvm-commits mailing list