File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -44,15 +44,15 @@ unsigned num_sign_bits(uint64_t n) {
4444}
4545
4646uint64_t add_saturate (uint64_t a, uint64_t b) {
47- unsigned long res;
47+ unsigned long long res;
4848 static_assert (sizeof (res) == sizeof (uint64_t ));
49- return __builtin_uaddl_overflow (a, b, &res) ? UINT64_MAX : res;
49+ return __builtin_uaddll_overflow (a, b, &res) ? UINT64_MAX : res;
5050}
5151
5252uint64_t mul_saturate (uint64_t a, uint64_t b) {
53- unsigned long res;
53+ unsigned long long res;
5454 static_assert (sizeof (res) == sizeof (uint64_t ));
55- return __builtin_umull_overflow (a, b, &res) ? UINT64_MAX : res;
55+ return __builtin_umulll_overflow (a, b, &res) ? UINT64_MAX : res;
5656}
5757
5858uint64_t divide_up (uint64_t n, uint64_t amount) {
You can’t perform that action at this time.
0 commit comments