ART: Rework TargetReg(symbolic_reg, wide)
Make the standard implementation in Mir2Lir and the specialized one
in the x86 backend return a pair when wide = "true". Introduce
WideKind enumeration to improve code readability. Simplify generic
code based on this implementation.
Change-Id: I670d45aa2572eedfdc77ac763e6486c83f8e26b4
diff --git a/compiler/dex/reg_storage.h b/compiler/dex/reg_storage.h
index 8ed3adc..addd628 100644
--- a/compiler/dex/reg_storage.h
+++ b/compiler/dex/reg_storage.h
@@ -18,6 +18,7 @@
#define ART_COMPILER_DEX_REG_STORAGE_H_
#include "base/logging.h"
+#include "compiler_enums.h" // For WideKind
namespace art {
@@ -149,6 +150,10 @@
return ((reg_ & k64BitMask) == k64Bits);
}
+ constexpr WideKind GetWideKind() const {
+ return Is64Bit() ? kWide : kNotWide;
+ }
+
constexpr bool Is64BitSolo() const {
return ((reg_ & kShapeMask) == k64BitSolo);
}