Revert "Rework Quick compiler's register handling"

This reverts commit 2c1ed456dcdb027d097825dd98dbe48c71599b6c.

Change-Id: If88d69ba88e0af0b407ff2240566d7e4545d8a99
diff --git a/compiler/dex/quick/arm/target_arm.cc b/compiler/dex/quick/arm/target_arm.cc
index ab1a053..83431ad 100644
--- a/compiler/dex/quick/arm/target_arm.cc
+++ b/compiler/dex/quick/arm/target_arm.cc
@@ -37,19 +37,23 @@
                         fr8, fr9, fr10, fr11, fr12, fr13, fr14, fr15};
 
 RegLocation ArmMir2Lir::LocCReturn() {
-  return arm_loc_c_return;
+  RegLocation res = ARM_LOC_C_RETURN;
+  return res;
 }
 
 RegLocation ArmMir2Lir::LocCReturnWide() {
-  return arm_loc_c_return_wide;
+  RegLocation res = ARM_LOC_C_RETURN_WIDE;
+  return res;
 }
 
 RegLocation ArmMir2Lir::LocCReturnFloat() {
-  return arm_loc_c_return_float;
+  RegLocation res = ARM_LOC_C_RETURN_FLOAT;
+  return res;
 }
 
 RegLocation ArmMir2Lir::LocCReturnDouble() {
-  return arm_loc_c_return_double;
+  RegLocation res = ARM_LOC_C_RETURN_DOUBLE;
+  return res;
 }
 
 // Return a target-dependent special register.
@@ -526,10 +530,14 @@
   return new ArmMir2Lir(cu, mir_graph, arena);
 }
 
-// Alloc a pair of core registers, or a double.
-RegStorage ArmMir2Lir::AllocTypedTempWide(bool fp_hint, int reg_class) {
+/*
+ * Alloc a pair of core registers, or a double.  Low reg in low byte,
+ * high reg in next byte.
+ */
+int ArmMir2Lir::AllocTypedTempPair(bool fp_hint, int reg_class) {
   int high_reg;
   int low_reg;
+  int res = 0;
 
   if (((reg_class == kAnyReg) && fp_hint) || (reg_class == kFPReg)) {
     low_reg = AllocTempDouble();
@@ -538,7 +546,8 @@
     low_reg = AllocTemp();
     high_reg = AllocTemp();
   }
-  return RegStorage(RegStorage::k64BitPair, low_reg, high_reg);
+  res = (low_reg & 0xff) | ((high_reg & 0xff) << 8);
+  return res;
 }
 
 int ArmMir2Lir::AllocTypedTemp(bool fp_hint, int reg_class) {
@@ -585,11 +594,11 @@
 
 void ArmMir2Lir::FreeRegLocTemps(RegLocation rl_keep,
                      RegLocation rl_free) {
-  if ((rl_free.reg.GetReg() != rl_keep.reg.GetReg()) && (rl_free.reg.GetReg() != rl_keep.reg.GetHighReg()) &&
-    (rl_free.reg.GetHighReg() != rl_keep.reg.GetReg()) && (rl_free.reg.GetHighReg() != rl_keep.reg.GetHighReg())) {
+  if ((rl_free.low_reg != rl_keep.low_reg) && (rl_free.low_reg != rl_keep.high_reg) &&
+    (rl_free.high_reg != rl_keep.low_reg) && (rl_free.high_reg != rl_keep.high_reg)) {
     // No overlap, free both
-    FreeTemp(rl_free.reg.GetReg());
-    FreeTemp(rl_free.reg.GetHighReg());
+    FreeTemp(rl_free.low_reg);
+    FreeTemp(rl_free.high_reg);
   }
 }
 /*
@@ -688,19 +697,19 @@
 
 RegLocation ArmMir2Lir::GetReturnWideAlt() {
   RegLocation res = LocCReturnWide();
-  res.reg.SetReg(r2);
-  res.reg.SetHighReg(r3);
+  res.low_reg = r2;
+  res.high_reg = r3;
   Clobber(r2);
   Clobber(r3);
   MarkInUse(r2);
   MarkInUse(r3);
-  MarkPair(res.reg.GetReg(), res.reg.GetHighReg());
+  MarkPair(res.low_reg, res.high_reg);
   return res;
 }
 
 RegLocation ArmMir2Lir::GetReturnAlt() {
   RegLocation res = LocCReturn();
-  res.reg.SetReg(r1);
+  res.low_reg = r1;
   Clobber(r1);
   MarkInUse(r1);
   return res;