[cfe-dev] Disabling emitting x86_fp80/ppc_fp128 IR

Friedman, Eli via cfe-dev cfe-dev at lists.llvm.org
Fri Aug 4 14:57:27 PDT 2017


On 8/3/2017 8:09 AM, Rob Lyerly via cfe-dev wrote:
> Hi all,
>
> I'm sure this has been answered somewhere but I can't seem to find 
> it.  I've got an application that uses the long double type in a 
> couple of places.  Is there a way to prevent clang from emitting 
> architecture-specific floating point types, i.e., "x86_fp80" & 
> "ppc_fp128", and instead force clang to only emit "fp128" types?  It 
> seems like LLVM's backends can easily handle this by emitting soft 
> floating point routines (defined in the "compiler-rt" project) for 
> dealing with these types. However, I don't want to force soft floating 
> point routines for other types, i.e., "half", "float" and "double".

You can write "__float128" to get an fp128 on any target which supports it.

There is no option to modify the type of "long double"; ABI-changing 
options are generally dangerous (code compiled with the flag is 
incompatible with code compiled without it).

-Eli

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project




More information about the cfe-dev mailing list