[libcxx-commits] [PATCH] D74163: [demangler] Fix the parsing of long double literals for PowerPC and S390
Xing Xue via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Feb 25 07:42:45 PST 2020
xingxue added a comment.
> I'm still wondering about Intel. Can there ever be a literal encoded using 'g' on Intel? If yes, then treating it as "long double" would still be wrong, because 'g' encodes IEEE128 (__float128), while "long double" is the Intel extended (80-bit) format, right?
>
> On the other hand, if 'g' encoded literals can never happen on Intel (or other platforms), maybe it would be better to have the code handling 'g' within a #ifdef section only active on powerpc and s390?
For X86, 'e' is used for 80-bit `long double` and 'g' is used for 128-bit `long double`. The following is the code in Clang.
clang/lib/Basic/Targets/X86.h
....
const char *getLongDoubleMangling() const override {
return LongDoubleFormat == &llvm::APFloat::IEEEquad() ? "g" : "e";
}
...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74163/new/
https://reviews.llvm.org/D74163
More information about the libcxx-commits
mailing list