* fix nim js cmp fails at CT * follow up #17539
This commit is contained in:
parent
a5600e49df
commit
a36816fc04
2 changed files with 1 additions and 2 deletions
|
|
@ -413,7 +413,6 @@ func fastlog2Nim(x: uint64): int {.inline.} =
|
||||||
|
|
||||||
import system/countbits_impl
|
import system/countbits_impl
|
||||||
|
|
||||||
const arch64 = sizeof(int) == 8
|
|
||||||
const useBuiltinsRotate = (defined(amd64) or defined(i386)) and
|
const useBuiltinsRotate = (defined(amd64) or defined(i386)) and
|
||||||
(defined(gcc) or defined(clang) or defined(vcc) or
|
(defined(gcc) or defined(clang) or defined(vcc) or
|
||||||
(defined(icl) and not defined(cpp))) and useBuiltins
|
(defined(icl) and not defined(cpp))) and useBuiltins
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ const useGCC_builtins* = (defined(gcc) or defined(llvm_gcc) or
|
||||||
defined(clang)) and useBuiltins
|
defined(clang)) and useBuiltins
|
||||||
const useICC_builtins* = defined(icc) and useBuiltins
|
const useICC_builtins* = defined(icc) and useBuiltins
|
||||||
const useVCC_builtins* = defined(vcc) and useBuiltins
|
const useVCC_builtins* = defined(vcc) and useBuiltins
|
||||||
const arch64 = sizeof(int) == 8
|
const arch64* = sizeof(int) == 8
|
||||||
|
|
||||||
template countBitsImpl(n: uint32): int =
|
template countBitsImpl(n: uint32): int =
|
||||||
# generic formula is from: https://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel
|
# generic formula is from: https://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue