set const arch64 to fix compiling with vcc/icc (#17539)

This commit is contained in:
rockcavera 2021-03-28 02:11:51 -03:00 • committed by GitHub
commit b77a420d3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,6 +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
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