mirror of
https://github.com/shadps4-emu/ext-fmt.git
synced 2024-12-04 00:01:06 +00:00
Fixes IBM XLC behavior with uint128 fallback (#2985)
* Fixes IBM XLC behavior with uint128 fallback * Replace legacy xlc with clang-based xlc * simplify xlc intrinsics handling Co-authored-by: Federico Busato <fbusato@nvidia.com>
This commit is contained in:
parent
00adc7120d
commit
bc5c7c50fd
@ -391,11 +391,11 @@ class uint128_fallback {
|
||||
hi_ += (lo_ < n ? 1 : 0);
|
||||
return *this;
|
||||
}
|
||||
#if FMT_HAS_BUILTIN(__builtin_addcll)
|
||||
#if FMT_HAS_BUILTIN(__builtin_addcll) && !defined(__ibmxl__)
|
||||
unsigned long long carry;
|
||||
lo_ = __builtin_addcll(lo_, n, 0, &carry);
|
||||
hi_ += carry;
|
||||
#elif FMT_HAS_BUILTIN(__builtin_ia32_addcarryx_u64)
|
||||
#elif FMT_HAS_BUILTIN(__builtin_ia32_addcarryx_u64) && !defined(__ibmxl__)
|
||||
unsigned long long result;
|
||||
auto carry = __builtin_ia32_addcarryx_u64(0, lo_, n, &result);
|
||||
lo_ = result;
|
||||
|
Loading…
Reference in New Issue
Block a user