diff options
author | flywind <xzsflywind@gmail.com> | 2021-03-29 09:11:07 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-29 09:11:07 +0800 |
commit | a36816fc047d4ab2c4f80056c207f117a635a5d4 (patch) | |
tree | e43d75d1ede7c9277b7088cf61de672d010f469f /lib | |
parent | a5600e49df71463cda6bd0a062e02c8bdd48da0c (diff) | |
download | Nim-a36816fc047d4ab2c4f80056c207f117a635a5d4.tar.gz |
follow up #17539 (#17548)
* fix nim js cmp fails at CT * follow up #17539
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/bitops.nim | 1 | ||||
-rw-r--r-- | lib/system/countbits_impl.nim | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/lib/pure/bitops.nim b/lib/pure/bitops.nim index 377602e75..4ef190c1b 100644 --- a/lib/pure/bitops.nim +++ b/lib/pure/bitops.nim @@ -413,7 +413,6 @@ func fastlog2Nim(x: uint64): int {.inline.} = import system/countbits_impl -const arch64 = sizeof(int) == 8 const useBuiltinsRotate = (defined(amd64) or defined(i386)) and (defined(gcc) or defined(clang) or defined(vcc) or (defined(icl) and not defined(cpp))) and useBuiltins diff --git a/lib/system/countbits_impl.nim b/lib/system/countbits_impl.nim index e0338f8f9..184f97bd4 100644 --- a/lib/system/countbits_impl.nim +++ b/lib/system/countbits_impl.nim @@ -18,7 +18,7 @@ const useGCC_builtins* = (defined(gcc) or defined(llvm_gcc) or defined(clang)) and useBuiltins const useICC_builtins* = defined(icc) and useBuiltins const useVCC_builtins* = defined(vcc) and useBuiltins -const arch64 = sizeof(int) == 8 +const arch64* = sizeof(int) == 8 template countBitsImpl(n: uint32): int = # generic formula is from: https://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel |