guard the tests that assume 80-bit floating point type representation with macro,
so targets that assumes __fp128 (IEEE quad-precision floating type) will be skipped.
This patch address PR 32260 (https://bugs.llvm.org//show_bug.cgi?id=32260)
I guess HAS_80_BIT_LONG_DOUBLE is passed as some build-time flags. I can't find it anywhere in the compiler-rt source tree that defines it.
I think we should guard it by checking "LDBL_MANT_DIG".
Change to HAS_80_BIT_LONG_DOUBLE just like other tests.
Also, if HAS_80_BIT_LONG_DOUBLE is not defined, we can set it if CRT_HAS_128BIT && LDBL_MANT_DIG == 64. So even if the build doesn't specify it, the test won't be skipped by mistake.
There are two kinds of systems with 80-bit long double: 64-bit x86, and 32-bit x86. On 32-bit x86 with 80-bit long double, CRT_HAS_128BIT is false, and __LDBL_MANT_DIG__ is 64. On 64-bit x86 with 80-bit long double, CRT_HAS_128BIT is true, and __LDBL_MANT_DIG__ is 64.
For the 80-bit long double tests which don't use 128-bit integers, you want to run them for all systems where LDBL_MANT_DIG is 64. For the 80-bit long double tests which do use 128-bit integers, you want to run them only on systems where CRT_HAS_128BIT is set and __LDBL_MANT_DIG__ is 64.
Actually, there are three platforms that use: i386, amd64 and m68k. The latter might not currently be supported by LLVM, but it still exists.
__int64_t and therefore CRT_HAS_128BIT are supported by all 64bit platforms and only those. The two features are orthogonal.
In short, the combination of "TI mode" and "XF mode" is only amd64, "XF mode" applies to i386, amd64 and m68k.