We have option -mabi=ieeelongdouble to set current long double to IEEEquad semantics. Like what GCC does, we need to define __LONG_DOUBLE_IEEE128__ macro in this case, and __LONG_DOUBLE_IBM128__ if using PPCDoubleDouble.
Details
- Reviewers
nemanjai jsji steven.zhang kbarton - Group Reviewers
Restricted Project - Commits
- rG2abc33683b2b: [PowerPC] [Clang] Define macros to identify quad-fp semantics
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/Basic/Targets/PPC.cpp | ||
---|---|---|
123 | Can you please double check if we need to define these two macros if PPC IEEE long double enabled ? And also double check if they can be controlled by options. |
clang/lib/Basic/Targets/PPC.cpp | ||
---|---|---|
123 | Yes. GCC shows expected behavior that __LONG_DOUBLE_IEEE128__ is defined under -mabi=ieeelongdouble while __LONG_DOUBLE_IBM128__ is defined when not. Some libraries may rely on this macro. (see https://www.openwall.com/lists/musl/2019/06/30/8) In clang, currently we can only use __LDBL_MANT_DIG__ to guess current 128-bit fp semantics. (106 for IBM-quad, 113 for IEEE-quad). We need to implement dedicated macros. And I'll keep the FIXME since it's not related to this revision. |
LGTM now and thank you for the double check. But please hold on for some days in case someone has concern on enabling the new macros(we are enabling the LONG_DOUBLE_IBM128 by default now).
Can you please double check if we need to define these two macros if PPC IEEE long double enabled ? And also double check if they can be controlled by options.