Arm64Gen: Move constant and make constexpr
Namespace-scope variable was only used in one function so move it there
This commit is contained in:
parent
dffcbcc6c4
commit
686314b548
|
@ -26,8 +26,6 @@ namespace Arm64Gen
|
||||||
{
|
{
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
const int kWRegSizeInBits = 32;
|
|
||||||
|
|
||||||
uint64_t LargestPowerOf2Divisor(uint64_t value)
|
uint64_t LargestPowerOf2Divisor(uint64_t value)
|
||||||
{
|
{
|
||||||
return value & -(int64_t)value;
|
return value & -(int64_t)value;
|
||||||
|
@ -88,6 +86,8 @@ std::optional<std::tuple<u32, u32, u32>> IsImmLogical(u64 value, u32 width)
|
||||||
value = ~value;
|
value = ~value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
constexpr int kWRegSizeInBits = 32;
|
||||||
|
|
||||||
if (width == kWRegSizeInBits)
|
if (width == kWRegSizeInBits)
|
||||||
{
|
{
|
||||||
// To handle 32-bit logical immediates, the very easiest thing is to repeat
|
// To handle 32-bit logical immediates, the very easiest thing is to repeat
|
||||||
|
|
Loading…
Reference in New Issue