Common/MathUtil: Move IntLog2 into MathUtil namespace

Gets this out of the global namespace.
This commit is contained in:
Lioncash
2023-04-15 03:27:35 -04:00
parent 5e0c20f8a5
commit 784a216927
14 changed files with 36 additions and 36 deletions

View File

@ -3092,7 +3092,7 @@ void ARM64FloatEmitter::FMOV(ARM64Reg Rd, uint8_t imm8)
// Vector
void ARM64FloatEmitter::ADD(u8 size, ARM64Reg Rd, ARM64Reg Rn, ARM64Reg Rm)
{
EmitThreeSame(0, IntLog2(size) - 3, 0b10000, Rd, Rn, Rm);
EmitThreeSame(0, MathUtil::IntLog2(size) - 3, 0b10000, Rd, Rn, Rm);
}
void ARM64FloatEmitter::AND(ARM64Reg Rd, ARM64Reg Rn, ARM64Reg Rm)
{

View File

@ -185,10 +185,9 @@ private:
T m_variance{};
};
} // namespace MathUtil
// Rounds down. 0 -> undefined
constexpr int IntLog2(u64 val)
{
return 63 - std::countl_zero(val);
}
} // namespace MathUtil