Currently, we have no front-end type for ppc_fp128 type in IR. PowerPC target generates ppc_fp128 type from long double now, but there's option (-mabi=(ieee|ibm)longdouble) to control it and we're going to do transition from IBM extended double-double ppc_fp128 to IEEE fp128 in the future.
This patch adds type __ibm128 which always represents ppc_fp128 in IR, as what GCC did for that type. Without this type in Clang, compilation will fail if compiling against future version of libstdcxx (which uses __ibm128 in headers).
Although all operations in backend for __ibm128 is done by software, only PowerPC enables support for it.
There's something not implemented in this patch and can be done in future ones:
- Literal suffix for __ibm128 type. w/W is suitable as GCC documented (https://gcc.gnu.org/onlinedocs/gcc/Floating-Types.html) but I believe they haven't implemented it yet.
- __attribute__((mode(IF))) should be for __ibm128.
This looks suspiciously like the result of this file having not been maintained for the additions of:
What test coverage fails if the addition of TypeKind.IBM128 is omitted from this patch?