[cfe-dev] C runtimes with PowerPC support for IBM long double?

Nemanja Ivanovic via cfe-dev cfe-dev at lists.llvm.org
Tue Dec 5 13:36:11 PST 2017

Although I work on the PPC back end, I can't say I'm overly familiar with
long double support. But here's what I know...
On Linux, both gcc and glibc fully support IBM double+double format. Clang
supports it as well of course. It'll emit the necessary calls and I think
it does the right thing for compile-time calculations using APFloat.

So you should be able to use clang on Linux without any issues.
Furthermore, I believe compiler-rt should have the necessary support as
well so you should be able to use it on any OS that clang works on.

On Tue, Dec 5, 2017 at 10:02 PM, ardi via cfe-dev <cfe-dev at lists.llvm.org>

> Hi,
> I have some old C code written for PowerPC long double (IBM
> double+double). I believe that clang supports generating IBM long
> double code for ppc targets (correct me if I'm wrong), but I'd like to
> know what C runtimes I could use together with clang in order to get
> this floating point format working.
> What I know for the moment:
> - The Apple libc of course supports the IBM long double (at least in
> versions older than when they removed ppc support).
> - Linux seems to support it too in glibc (didn't test it myself,
> though, so not 100% sure).
> - The musl library won't support that format, by design decision (they
> will only support standard formats).
> - The support for long double in NetBSD seems quite recent (added in
> 7.0 in preliminary status, if I'm reading the relnotes correctly, so I
> don't think IBM long double is supported at this point).
> - No idea about OpenBSD nor FreeBSD (couldn't find any docs referring
> to this, only the gcc manpage, but it's a manpage written by the gcc
> authors, so it doesn't cover the support in the C runtime of the OS).
> So, the only one that I know for sure supports this format is the
> Apple libc. If you know of more alternatives, please tell, as I'd like
> to continue working with this code.
> Thanks!
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20171205/86810a44/attachment.html>

More information about the cfe-dev mailing list