x86_64: TargetReg update for x86
Also includes changes in common code. Elimination of use of TargetReg
with one parameter and direct access to special target registers.
Change-Id: Ied2c1f87d4d1e4345248afe74bca40487a46a371
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
Signed-off-by: Chao-ying Fu <chao-ying.fu@intel.com>
diff --git a/compiler/dex/quick/mir_to_lir.h b/compiler/dex/quick/mir_to_lir.h
index 8ebd64a..47844cb 100644
--- a/compiler/dex/quick/mir_to_lir.h
+++ b/compiler/dex/quick/mir_to_lir.h
@@ -1202,6 +1202,16 @@
}
/**
+ * @brief Portable way of getting special register pair from the backend.
+ * @param reg Enumeration describing the purpose of the first register.
+ * @param reg Enumeration describing the purpose of the second register.
+ * @return Return the #RegStorage corresponding to the given purpose @p reg.
+ */
+ virtual RegStorage TargetReg(SpecialTargetRegister reg1, SpecialTargetRegister reg2) {
+ return RegStorage::MakeRegPair(TargetReg(reg1, false), TargetReg(reg2, false));
+ }
+
+ /**
* @brief Portable way of getting a special register for storing a reference.
* @see TargetReg()
*/
@@ -1209,6 +1219,14 @@
return TargetReg(reg);
}
+ /**
+ * @brief Portable way of getting a special register for storing a pointer.
+ * @see TargetReg()
+ */
+ virtual RegStorage TargetPtrReg(SpecialTargetRegister reg) {
+ return TargetReg(reg);
+ }
+
// Get a reg storage corresponding to the wide & ref flags of the reg location.
virtual RegStorage TargetReg(SpecialTargetRegister reg, RegLocation loc) {
if (loc.ref) {