Skip to content

Commit e981ecd

Browse files
ev3nvy375gnu
authored andcommitted
chore: update r128 from 1.6.0 to 1.6.1
1 parent 365fcd0 commit e981ecd

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/celutil/r128.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
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
33
44
COMPILATION
55
-----------
@@ -302,8 +302,10 @@ struct numeric_limits<R128>
302302
static const bool has_infinity = false;
303303
static const bool has_quiet_NaN = false;
304304
static const bool has_signaling_NaN = false;
305+
#if !(__cplusplus > 202002L || (defined(_MSVC_LANG) && _MSVC_LANG > 202002L))
305306
static const float_denorm_style has_denorm = denorm_absent;
306307
static const bool has_denorm_loss = false;
308+
#endif
307309

308310
static R128 infinity() throw() { return R128_zero; }
309311
static R128 quiet_NaN() throw() { return R128_zero; }
@@ -670,7 +672,7 @@ static R128_U64 r128__umul64(R128_U32 a, R128_U32 b)
670672
{
671673
# if defined(_M_IX86) && !defined(R128_STDC_ONLY) && !defined(__MINGW32__)
672674
return __emulu(a, b);
673-
# elif defined(_M_ARM) && !defined(R128_STDC_ONLY)
675+
# elif defined(_M_ARM) && !defined(R128_STDC_ONLY) && !defined(__MINGW32__)
674676
return _arm_umull(a, b);
675677
# else
676678
return a * (R128_U64)b;
@@ -813,7 +815,7 @@ static const r128__udiv128Proc r128__udiv128 = (r128__udiv128Proc)(void*)r128__u
813815
#else
814816
static R128_U64 r128__udiv128(R128_U64 nlo, R128_U64 nhi, R128_U64 d, R128_U64 *rem)
815817
{
816-
#if defined(_M_X64) && !defined(R128_STDC_ONLY) && !defined(__MINGW32__)
818+
#if defined(_M_X64) && !defined(R128_STDC_ONLY) && !defined(__MINGW32__) && !defined(__clang__)
817819
return _udiv128(nhi, nlo, d, rem);
818820
#elif defined(__x86_64__) && !defined(R128_STDC_ONLY)
819821
R128_U64 q, r;
@@ -1678,7 +1680,7 @@ void r128Shl(R128 *dst, const R128 *src, int amount)
16781680
r[1] = r[0] << (amount - 64);
16791681
r[0] = 0;
16801682
} else if (amount) {
1681-
# ifdef _M_X64
1683+
# if defined(_M_X64) && !defined(R128_STDC_ONLY)
16821684
r[1] = __shiftleft128(r[0], r[1], (char) amount);
16831685
# else
16841686
r[1] = (r[1] << amount) | (r[0] >> (64 - amount));
@@ -1740,7 +1742,7 @@ void r128Shr(R128 *dst, const R128 *src, int amount)
17401742
r[2] = r[3] >> (amount - 64);
17411743
r[3] = 0;
17421744
} else if (amount) {
1743-
#ifdef _M_X64
1745+
#if defined(_M_X64) && !defined(R128_STDC_ONLY)
17441746
r[2] = __shiftright128(r[2], r[3], (char) amount);
17451747
#else
17461748
r[2] = (r[2] >> amount) | (r[3] << (64 - amount));

0 commit comments

Comments
 (0)