[libcxxabi] Fix the long double demangling for PowerPC#135332
[libcxxabi] Fix the long double demangling for PowerPC#135332
Conversation
PowerPC uses a slightly different type of floats for their 128 bit long doubles, as "double-double", with __LDBL_MANT_DIG__ == 106 rather than __LDBL_MANT_DIG__ == 113 for IEEE 128 bit floats. This fixes compiling libcxxabi for PowerPC after 3b70715.
|
@llvm/pr-subscribers-libcxxabi Author: Martin Storsjö (mstorsjo) ChangesPowerPC uses a slightly different type of floats for their 128 bit long doubles, as "double-double", with LDBL_MANT_DIG == 106 rather than LDBL_MANT_DIG == 113 for IEEE 128 bit floats. This fixes compiling libcxxabi for PowerPC after Full diff: https://github.com/llvm/llvm-project/pull/135332.diff 1 Files Affected:
diff --git a/libcxxabi/src/demangle/ItaniumDemangle.h b/libcxxabi/src/demangle/ItaniumDemangle.h
index b9d17060c04f9..eca9ddad66f92 100644
--- a/libcxxabi/src/demangle/ItaniumDemangle.h
+++ b/libcxxabi/src/demangle/ItaniumDemangle.h
@@ -5741,7 +5741,7 @@ struct FloatData<double>
template <>
struct FloatData<long double>
{
-#if __LDBL_MANT_DIG__ == 113
+#if __LDBL_MANT_DIG__ == 113 || __LDBL_MANT_DIG__ == 106
static const size_t mangled_size = 32;
#elif __LDBL_MANT_DIG__ == 53 || defined(_MSC_VER)
// MSVC doesn't define __LDBL_MANT_DIG__, but it has long double equal to
|
|
If ok, I would like to merge this one without waiting for the full CI pipeline, as this fixes a broken buildbot at https://lab.llvm.org/buildbot/#/builders/72/builds/10061. |
philnik777
left a comment
There was a problem hiding this comment.
I think this is fine to land without waiting for the CI. We don't have anything in the CI that would catch this anyways.
Thanks! And as long as at least some CI tasks have completed successfully, we can be kinda safe that the patch isn't entirely broken (causing compilation of libcxxabi to fail). Landing it now. |
PowerPC uses a slightly different type of floats for their 128 bit long doubles, as "double-double", with LDBL_MANT_DIG == 106 rather than LDBL_MANT_DIG == 113 for IEEE 128 bit floats.
This fixes compiling libcxxabi for PowerPC after
3b70715.