qiucf added inline comments.

================
Comment at: clang/lib/Basic/Targets/PPC.cpp:122
   if (LongDoubleWidth == 128) {
     Builder.defineMacro("__LONG_DOUBLE_128__");
     Builder.defineMacro("__LONGDOUBLE128");
----------------
steven.zhang wrote:
> 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.
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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90208/new/

https://reviews.llvm.org/D90208

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to