[cfe-dev] Target support for __float128 in the front end

Richard Osborne via cfe-dev cfe-dev at lists.llvm.org
Tue Mar 29 08:20:58 PDT 2016


XCore does not expose a 128-bit floating point type, so this patch is fine for the XCore target.

Cheers,

Richard

On 29 Mar 2016, at 14:40, Jacques Pienaar <jpienaar at google.com<mailto:jpienaar at google.com>> wrote:

Lanai also does not expose a float128 type, so no changes needed for Lanai target.

Thanks,

Jacques

On Tue, Mar 29, 2016 at 5:44 AM, Daniel Sanders <Daniel.Sanders at imgtec.com<mailto:Daniel.Sanders at imgtec.com>> wrote:
Hi,

'long double' is 128-bit on some MIPS ABI's but we don't have a __float128 type.

From: Nemanja Ivanovic [mailto:nemanja.i.ibm at gmail.com<mailto:nemanja.i.ibm at gmail.com>]
Sent: 29 March 2016 11:07
To: renato.golin at linaro.org<mailto:renato.golin at linaro.org>; venkatra at cs.wisc.edu<mailto:venkatra at cs.wisc.edu>; jholewinski at nvidia.com<mailto:jholewinski at nvidia.com>; richard at xmos.com<mailto:richard at xmos.com>; kparzysz at codeaurora.org<mailto:kparzysz at codeaurora.org>; jpienaar at google.com<mailto:jpienaar at google.com>; nrotem at apple.com<mailto:nrotem at apple.com>; Daniel Sanders; cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>
Subject: Fwd: Target support for __float128 in the front end

To date, I have not received any responses on this. I'm forwarding this message again to see if I can get some responses regarding this __float128 patch. I don't want to break anyone with this commit so I hope to discuss this with target maintainers before I commit.
I am sending the message to the target maintainers listed in CODE_OWNERS.TXT, so if I've sent it to you erroneously, I apologize.
Sincerely,
Nemanja Ivanovic

---------- Forwarded message ----------
From: Nemanja Ivanovic <nemanja.i.ibm at gmail.com<mailto:nemanja.i.ibm at gmail.com>>
Date: Fri, Mar 25, 2016 at 5:09 PM
Subject: Target support for __float128 in the front end
To: cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>

Hi everyone,
I plan to commit the changeset listed in the Phabricator review 15120 (http://reviews.llvm.org/D15120) which will impact the way Clang treats the __float128 type, keyword, etc.
Namely, we currently have a workaround that allows Clang to parse some C++ headers (such as type_traits) since they contain template specializations for __float128. However, this patch establishes that type as a builtin type, enables the keyword and allows for literals of the type. Since not all targets have support for what that type is supposed to represent (i.e. a 128-bit floating point type with IEEE quad-precision semantics), the default behaviour for all targets is to not enable the type.
The problem:
This puts targets on which gcc has __float128 support in a situation where they may not be able to compile programs that include the aforementioned headers. Namely, if the configuration defines _GLIBCXX_USE_FLOAT128 and the __float128 type is not enabled in Clang, anything that includes the header will not compile.
The solution:
Any target that needs to enable support for this type can do so by overriding TargetInfo::hasFloat128Type(). When doing so, there may be a small number of test cases that needs to change if they rely on this support not being enabled.
I would appreciate it if you would let me know if your target needs to have this support enabled and if you would be OK with me committing this patch. As much as I would like to take on as much of this work as possible, please understand that I do not have access to hardware to allow me to test any impact to your target if I were to make the change myself (of course, I'm referring to things that can't be caught by the Clang test cases).
Thank you,
Nemanja



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160329/ec85467f/attachment.html>


More information about the cfe-dev mailing list