mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
JitArm64: Turn IsImmLogical into a constexpr constructor
This commit is contained in:
@ -413,4 +413,13 @@ constexpr int CountLeadingZeros(uint32_t value)
|
||||
|
||||
#undef CONSTEXPR_FROM_INTRINSIC
|
||||
|
||||
template <typename T>
|
||||
constexpr T LargestPowerOf2Divisor(T value)
|
||||
{
|
||||
static_assert(std::is_unsigned<T>(),
|
||||
"LargestPowerOf2Divisor only makes sense for unsigned types.");
|
||||
|
||||
return value & -static_cast<std::make_signed_t<T>>(value);
|
||||
}
|
||||
|
||||
} // namespace Common
|
||||
|
Reference in New Issue
Block a user