|
1 | 1 | /* |
2 | | -r128.h: 128-bit (64.64) signed fixed-point arithmetic. Version 1.6.0 |
| 2 | +r128.h: 128-bit (64.64) signed fixed-point arithmetic. Version 1.6.1 |
3 | 3 |
|
4 | 4 | COMPILATION |
5 | 5 | ----------- |
@@ -302,8 +302,10 @@ struct numeric_limits<R128> |
302 | 302 | static const bool has_infinity = false; |
303 | 303 | static const bool has_quiet_NaN = false; |
304 | 304 | static const bool has_signaling_NaN = false; |
| 305 | +#if !(__cplusplus > 202002L || (defined(_MSVC_LANG) && _MSVC_LANG > 202002L)) |
305 | 306 | static const float_denorm_style has_denorm = denorm_absent; |
306 | 307 | static const bool has_denorm_loss = false; |
| 308 | +#endif |
307 | 309 |
|
308 | 310 | static R128 infinity() throw() { return R128_zero; } |
309 | 311 | static R128 quiet_NaN() throw() { return R128_zero; } |
@@ -670,7 +672,7 @@ static R128_U64 r128__umul64(R128_U32 a, R128_U32 b) |
670 | 672 | { |
671 | 673 | # if defined(_M_IX86) && !defined(R128_STDC_ONLY) && !defined(__MINGW32__) |
672 | 674 | return __emulu(a, b); |
673 | | -# elif defined(_M_ARM) && !defined(R128_STDC_ONLY) |
| 675 | +# elif defined(_M_ARM) && !defined(R128_STDC_ONLY) && !defined(__MINGW32__) |
674 | 676 | return _arm_umull(a, b); |
675 | 677 | # else |
676 | 678 | return a * (R128_U64)b; |
@@ -813,7 +815,7 @@ static const r128__udiv128Proc r128__udiv128 = (r128__udiv128Proc)(void*)r128__u |
813 | 815 | #else |
814 | 816 | static R128_U64 r128__udiv128(R128_U64 nlo, R128_U64 nhi, R128_U64 d, R128_U64 *rem) |
815 | 817 | { |
816 | | -#if defined(_M_X64) && !defined(R128_STDC_ONLY) && !defined(__MINGW32__) |
| 818 | +#if defined(_M_X64) && !defined(R128_STDC_ONLY) && !defined(__MINGW32__) && !defined(__clang__) |
817 | 819 | return _udiv128(nhi, nlo, d, rem); |
818 | 820 | #elif defined(__x86_64__) && !defined(R128_STDC_ONLY) |
819 | 821 | R128_U64 q, r; |
@@ -1678,7 +1680,7 @@ void r128Shl(R128 *dst, const R128 *src, int amount) |
1678 | 1680 | r[1] = r[0] << (amount - 64); |
1679 | 1681 | r[0] = 0; |
1680 | 1682 | } else if (amount) { |
1681 | | -# ifdef _M_X64 |
| 1683 | +# if defined(_M_X64) && !defined(R128_STDC_ONLY) |
1682 | 1684 | r[1] = __shiftleft128(r[0], r[1], (char) amount); |
1683 | 1685 | # else |
1684 | 1686 | r[1] = (r[1] << amount) | (r[0] >> (64 - amount)); |
@@ -1740,7 +1742,7 @@ void r128Shr(R128 *dst, const R128 *src, int amount) |
1740 | 1742 | r[2] = r[3] >> (amount - 64); |
1741 | 1743 | r[3] = 0; |
1742 | 1744 | } else if (amount) { |
1743 | | -#ifdef _M_X64 |
| 1745 | +#if defined(_M_X64) && !defined(R128_STDC_ONLY) |
1744 | 1746 | r[2] = __shiftright128(r[2], r[3], (char) amount); |
1745 | 1747 | #else |
1746 | 1748 | r[2] = (r[2] >> amount) | (r[3] << (64 - amount)); |
|
0 commit comments