Arm64Emitter: Remove duplicate IsPowerOf2 function
We can just use the generified version in MathUtil.
This commit is contained in:
parent
79f40fb8d7
commit
03671a5534
|
@ -12,6 +12,7 @@
|
|||
#include "Common/Arm64Emitter.h"
|
||||
#include "Common/Assert.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/MathUtil.h"
|
||||
|
||||
namespace Arm64Gen
|
||||
{
|
||||
|
@ -37,11 +38,6 @@ static uint64_t LargestPowerOf2Divisor(uint64_t value)
|
|||
return value & -(int64_t)value;
|
||||
}
|
||||
|
||||
static bool IsPowerOfTwo(uint64_t x)
|
||||
{
|
||||
return (x != 0) && ((x & (x - 1)) == 0);
|
||||
}
|
||||
|
||||
#define V8_UINT64_C(x) ((uint64_t)(x))
|
||||
|
||||
bool IsImmArithmetic(uint64_t input, u32* val, bool* shift)
|
||||
|
@ -187,7 +183,7 @@ bool IsImmLogical(uint64_t value, unsigned int width, unsigned int* n, unsigned
|
|||
}
|
||||
|
||||
// If the repeat period d is not a power of two, it can't be encoded.
|
||||
if (!IsPowerOfTwo(d))
|
||||
if (!MathUtil::IsPow2<u64>(d))
|
||||
return false;
|
||||
|
||||
// If the bit stretch (b - a) does not fit within the mask derived from the
|
||||
|
|
Loading…
Reference in New Issue