]> granicus.if.org Git - clang/commit
[PowerPC] Support -mabi=ieeelongdouble and -mabi=ibmlongdouble
authorFangrui Song <maskray@google.com>
Mon, 15 Jul 2019 07:25:11 +0000 (07:25 +0000)
committerFangrui Song <maskray@google.com>
Mon, 15 Jul 2019 07:25:11 +0000 (07:25 +0000)
commita9bc6dd02c0309a30caf6d8c0ab4565e072d688a
tree5874cfe446f5313bcf3f053061630f5fae9c116b
parent5d6543acf18dbc4e9595c191caa9c0de36505adc
[PowerPC] Support -mabi=ieeelongdouble and -mabi=ibmlongdouble

gcc PowerPC supports 3 representations of long double:

* -mlong-double-64

  long double has the same representation of double but is mangled as `e`.
  In clang, this is the default on AIX, FreeBSD and Linux musl.

* -mlong-double-128

  2 possible 128-bit floating point representations:

  + -mabi=ibmlongdouble
    IBM extended double format. Mangled as `g`
    In clang, this is the default on Linux glibc.
  + -mabi=ieeelongdouble
    IEEE 754 quadruple-precision format. Mangled as `u9__ieee128` (`U10__float128` before gcc 8.2)
    This is currently unavailable.

This patch adds -mabi=ibmlongdouble and -mabi=ieeelongdouble, and thus
makes the IEEE 754 quadruple-precision long double available for
languages supported by clang.

Reviewed By: hfinkel

Differential Revision: https://reviews.llvm.org/D64283

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@366044 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/LangOptions.def
include/clang/Driver/CC1Options.td
lib/Basic/Targets/PPC.cpp
lib/Driver/ToolChains/Clang.cpp
lib/Frontend/CompilerInvocation.cpp
test/CodeGen/ppc64-long-double.cpp
test/Driver/ppc-abi.c