Arm64Gen: Move constant and make constexpr

Namespace-scope variable was only used in one function so move it there
This commit is contained in:
Dentomologist 2021-02-12 17:04:08 -08:00
parent dffcbcc6c4
commit 686314b548
1 changed files with 2 additions and 2 deletions

View File

@ -26,8 +26,6 @@ namespace Arm64Gen
{
namespace
{
const int kWRegSizeInBits = 32;
uint64_t LargestPowerOf2Divisor(uint64_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;
}
constexpr int kWRegSizeInBits = 32;
if (width == kWRegSizeInBits)
{
// To handle 32-bit logical immediates, the very easiest thing is to repeat