[PATCH] D80374: [Clang] Enable KF and KC mode for [_Complex] __float128
Nemanja Ivanovic via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 21 04:50:18 PDT 2020
nemanjai created this revision.
nemanjai added reviewers: rjmccall, rsmith, PowerPC, hfinkel.
Herald added subscribers: dexonsmith, kbarton.
Herald added a reviewer: aaron.ballman.
Herald added a project: clang.
The headers provided with recent GNU toolchains for PPC have code that includes typedefs such as:
`typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__KC__)))`
Also, when I added `__float128`, I neglected to add support for `_Complex __float128` altogether. This patch fixes those oversights and allows clang to compile something like:
#include <math.h>
_Complex __float128 testkf(_Complex __float128 a, _Complex __float128 b) {
return a + b;
}
with `-mfloat128` which it currently fails to compile due to the two reasons listed above.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D80374
Files:
clang/include/clang/AST/ASTContext.h
clang/include/clang/Basic/TargetInfo.h
clang/lib/AST/ASTContext.cpp
clang/lib/Basic/TargetInfo.cpp
clang/lib/Sema/DeclSpec.cpp
clang/lib/Sema/SemaDeclAttr.cpp
clang/test/CodeGen/ppc64-complex-parms.c
clang/test/CodeGen/ppc64-complex-return.c
clang/test/Sema/attr-mode.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80374.265473.patch
Type: text/x-patch
Size: 10324 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200521/06489feb/attachment-0001.bin>
More information about the cfe-commits
mailing list