diff --git a/qemu/fpu/softfloat.c b/qemu/fpu/softfloat.c index c9118d69..f303511e 100644 --- a/qemu/fpu/softfloat.c +++ b/qemu/fpu/softfloat.c @@ -4859,7 +4859,7 @@ int64_t floatx80_to_int64(floatx80 a, float_status *status) if (floatx80_invalid_encoding(a)) { float_raise(float_flag_invalid, status); - return (uint64_t)1 << 63; + return 1ULL << 63; } aSig = extractFloatx80Frac( a ); aExp = extractFloatx80Exp( a ); @@ -4904,7 +4904,7 @@ int64_t floatx80_to_int64_round_to_zero(floatx80 a, float_status *status) if (floatx80_invalid_encoding(a)) { float_raise(float_flag_invalid, status); - return (uint64_t)1 << 63; + return 1ULL << 63; } aSig = extractFloatx80Frac( a ); aExp = extractFloatx80Exp( a ); diff --git a/qemu/include/fpu/softfloat.h b/qemu/include/fpu/softfloat.h index f17fd0e6..f17daaa8 100644 --- a/qemu/include/fpu/softfloat.h +++ b/qemu/include/fpu/softfloat.h @@ -677,7 +677,7 @@ static inline int floatx80_is_any_nan(floatx80 a) *----------------------------------------------------------------------------*/ static inline bool floatx80_invalid_encoding(floatx80 a) { - return (a.low & ((uint64_t)1 << 63)) == 0 && (a.high & 0x7FFF) != 0; + return (a.low & (1ULL << 63)) == 0 && (a.high & 0x7FFF) != 0; } #define floatx80_zero make_floatx80(0x0000, 0x0000000000000000LL)