provide an equivalent alignment for __float128 for clang and i386 that

does not have it. Idea from mrg@
This commit is contained in:
christos 2021-07-17 16:31:51 +00:00
parent e28106a5fc
commit 528f04f801
1 changed files with 6 additions and 1 deletions

View File

@ -420,9 +420,14 @@ typedef struct {
use __float128 here; that is only available on some use __float128 here; that is only available on some
architectures, but only on i386 is extra alignment needed for architectures, but only on i386 is extra alignment needed for
__float128. */ __float128. */
#if defined(__i386__) && !defined(__clang__) #if defined(__i386__)
#ifdef __clang__
// 16 is the gcc alignment for __float128
long long __max_align_128 __attribute__((__aligned__(16)));
#else
__float128 __max_align_f128 __attribute__((__aligned__(__alignof(__float128)))); __float128 __max_align_f128 __attribute__((__aligned__(__alignof(__float128))));
#endif #endif
#endif
} max_align_t; } max_align_t;
#endif #endif
#endif /* C11 or C++11. */ #endif /* C11 or C++11. */