mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-12-06 07:12:28 +01:00
popcount
This commit is contained in:
parent
ddf1a098c7
commit
79f0caf7de
|
|
@ -6,7 +6,7 @@ export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
|
|||
export HOMEBREW_NO_ENV_HINTS=1
|
||||
export HOMEBREW_NO_INSTALL_CLEANUP=1
|
||||
|
||||
brew install -f --overwrite --quiet pipenv googletest ffmpeg@5 "llvm@$LLVM_COMPILER_VER" glew sdl3 vulkan-headers
|
||||
brew install -f --overwrite --quiet pipenv ffmpeg@5 "llvm@$LLVM_COMPILER_VER" glew sdl3 vulkan-headers
|
||||
brew link -f --quiet "llvm@$LLVM_COMPILER_VER" ffmpeg@5
|
||||
|
||||
# moltenvk based on commit for 1.4.0 release
|
||||
|
|
@ -83,8 +83,8 @@ mkdir build && cd build || exit 1
|
|||
export MACOSX_DEPLOYMENT_TARGET=14.0
|
||||
|
||||
"$BREW_PATH/bin/cmake" .. \
|
||||
-DBUILD_RPCS3_TESTS="${RUN_UNIT_TESTS}" \
|
||||
-DRUN_RPCS3_TESTS="${RUN_UNIT_TESTS}" \
|
||||
-DBUILD_RPCS3_TESTS=OFF \
|
||||
-DRUN_RPCS3_TESTS=OFF \
|
||||
-DUSE_SDL=ON \
|
||||
-DUSE_DISCORD_RPC=ON \
|
||||
-DUSE_VULKAN=ON \
|
||||
|
|
|
|||
|
|
@ -393,8 +393,8 @@ namespace fmt
|
|||
raw_throw_exception(src_loc, reinterpret_cast<const char*>(fmt), type_info_v<Args...>, fmt_args_t<Args...>{fmt_unveil<Args>::get(args)...});
|
||||
}
|
||||
|
||||
#if !defined(_MSC_VER) || defined(__clang__)
|
||||
[[noreturn]] ~throw_exception() = default;
|
||||
#if defined(__FreeBSD__)
|
||||
[[noreturn]] ~throw_exception();
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,9 @@ namespace utils
|
|||
#if defined(_MSC_VER) && !defined(__clang__)
|
||||
return std::popcount(v.lo) + std::popcount(v.hi);
|
||||
#else
|
||||
return std::popcount(v);
|
||||
const u64 lo = static_cast<u64>(v);
|
||||
const u64 hi = static_cast<u64>(v >> 64);
|
||||
return static_cast<u32>(std::popcount(lo) + std::popcount(hi));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -156,7 +158,11 @@ namespace utils
|
|||
else
|
||||
return std::countr_zero(arg.lo);
|
||||
#else
|
||||
return std::countr_zero(arg);
|
||||
const u64 hi = static_cast<u64>(arg >> 64);
|
||||
if (hi != 0)
|
||||
return static_cast<u32>(std::countr_zero(hi));
|
||||
const u64 lo = static_cast<u64>(arg);
|
||||
return static_cast<u32>(std::countr_zero(lo) + 64u);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -168,7 +174,11 @@ namespace utils
|
|||
else
|
||||
return std::countl_zero(arg.lo) + 64;
|
||||
#else
|
||||
return std::countl_zero(arg);
|
||||
const u64 hi = static_cast<u64>(arg >> 64);
|
||||
if (hi != 0)
|
||||
return static_cast<u32>(std::countl_zero(hi));
|
||||
const u64 lo = static_cast<u64>(arg);
|
||||
return static_cast<u32>(std::countl_zero(lo) + 64u);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue