diff options
Diffstat (limited to 'src/util/fast_idiv_by_const.c')
-rw-r--r-- | src/util/fast_idiv_by_const.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/fast_idiv_by_const.c b/src/util/fast_idiv_by_const.c index 7b93316268c..4f0f6b769b8 100644 --- a/src/util/fast_idiv_by_const.c +++ b/src/util/fast_idiv_by_const.c @@ -172,7 +172,7 @@ util_compute_fast_udiv_info(uint64_t D, unsigned num_bits, unsigned UINT_BITS) static inline int64_t sign_extend(int64_t x, unsigned SINT_BITS) { - return (x << (64 - SINT_BITS)) >> (64 - SINT_BITS); + return (int64_t)((uint64_t)x << (64 - SINT_BITS)) >> (64 - SINT_BITS); } struct util_fast_sdiv_info |