libsupc++: Fix handling of m68k extended real in <compare>
PR libstdc++/116513 * libsupc++/compare (_S_fp_bits) [__fmt == _M68k_80bit]: Shift padding out of exponent word.
This commit is contained in:
parent
e4d3e7f9ad
commit
4bf758b212
1 changed files with 6 additions and 1 deletions
|
@ -838,7 +838,7 @@ namespace std _GLIBCXX_VISIBILITY(default)
|
|||
using enum _Fp_fmt;
|
||||
#endif
|
||||
constexpr auto __fmt = _S_fp_fmt<_Tp>();
|
||||
if constexpr (__fmt == _X86_80bit || __fmt == _M68k_80bit)
|
||||
if constexpr (__fmt == _X86_80bit)
|
||||
{
|
||||
if constexpr (sizeof(_Tp) == 3 * sizeof(int32_t))
|
||||
{
|
||||
|
@ -851,6 +851,11 @@ namespace std _GLIBCXX_VISIBILITY(default)
|
|||
return _Int<int16_t>(__ival._M_hi, __ival._M_lo);
|
||||
}
|
||||
}
|
||||
else if constexpr (__fmt == _M68k_80bit)
|
||||
{
|
||||
auto __ival = __builtin_bit_cast(_Int<int32_t>, __val);
|
||||
return _Int<int16_t>(__ival._M_hi >> 16, __ival._M_lo);
|
||||
}
|
||||
else if constexpr (sizeof(_Tp) == 2 * sizeof(int64_t))
|
||||
{
|
||||
#if __SIZEOF_INT128__
|
||||
|
|
Loading…
Add table
Reference in a new issue