[PATCH] D105477: [AIX] Define __LONGDOUBLE64 macro
Jake Egan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 8 18:12:46 PDT 2021
Jake-Egan updated this revision to Diff 357399.
Jake-Egan added a comment.
Add control by -mlong-double-64 option.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105477/new/
https://reviews.llvm.org/D105477
Files:
clang/lib/Basic/Targets/PPC.cpp
clang/test/Preprocessor/init-ppc.c
Index: clang/test/Preprocessor/init-ppc.c
===================================================================
--- clang/test/Preprocessor/init-ppc.c
+++ clang/test/Preprocessor/init-ppc.c
@@ -757,6 +757,9 @@
// PPC-AIX-STDC-N-NOT:#define __STDC_NO_ATOMICS__ 1
// PPC-AIX-STDC-N-NOT:#define __STDC_NO_THREADS__ 1
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc-ibm-aix7.1.0.0 -mlong-double-64 < /dev/null | FileCheck -match-full-lines -check-prefix PPC-AIX-LD64 %s
+// PPC-AIX-LD64:#define __LONGDOUBLE64 1
+
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc-unknown-linux-gnu -fno-signed-char < /dev/null | FileCheck -match-full-lines -check-prefix PPC-LINUX %s
//
// PPC-LINUX:#define _ARCH_PPC 1
Index: clang/lib/Basic/Targets/PPC.cpp
===================================================================
--- clang/lib/Basic/Targets/PPC.cpp
+++ clang/lib/Basic/Targets/PPC.cpp
@@ -172,6 +172,11 @@
Builder.defineMacro("__LONG_DOUBLE_IBM128__");
}
+ if (getTriple().isOSAIX() && Opts.LongDoubleSize == 64) {
+ assert(LongDoubleWidth == 64);
+ Builder.defineMacro("__LONGDOUBLE64");
+ }
+
// Define this for elfv2 (64-bit only) or 64-bit darwin.
if (ABI == "elfv2" ||
(getTriple().getOS() == llvm::Triple::Darwin && PointerWidth == 64))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105477.357399.patch
Type: text/x-patch
Size: 1292 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210709/e2fc07dd/attachment.bin>
More information about the cfe-commits
mailing list