From 686314b5486653d257a782b9afe4479c27863f0c Mon Sep 17 00:00:00 2001 From: Dentomologist Date: Fri, 12 Feb 2021 17:04:08 -0800 Subject: [PATCH] Arm64Gen: Move constant and make constexpr Namespace-scope variable was only used in one function so move it there --- Source/Core/Common/Arm64Emitter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/Common/Arm64Emitter.cpp b/Source/Core/Common/Arm64Emitter.cpp index 42cb60ed83..8b39dbc7c4 100644 --- a/Source/Core/Common/Arm64Emitter.cpp +++ b/Source/Core/Common/Arm64Emitter.cpp @@ -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> 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