ART: Remove old code

Remove unused Quick compiler flag.

Remove support for arm32 soft-float code (which is no longer
supported by our compiler).

Test: m
Change-Id: I38b16291d90094dbf26776923a46afbf8de53f20
diff --git a/compiler/jni/quick/arm/calling_convention_arm.cc b/compiler/jni/quick/arm/calling_convention_arm.cc
index 7e1ad9f..3e637bc 100644
--- a/compiler/jni/quick/arm/calling_convention_arm.cc
+++ b/compiler/jni/quick/arm/calling_convention_arm.cc
@@ -125,18 +125,7 @@
 }
 
 ManagedRegister ArmManagedRuntimeCallingConvention::ReturnRegister() {
-  if (kArm32QuickCodeUseSoftFloat) {
-    switch (GetShorty()[0]) {
-    case 'V':
-      return ArmManagedRegister::NoRegister();
-    case 'D':
-    case 'J':
-      return ArmManagedRegister::FromRegisterPair(R0_R1);
-    default:
-      return ArmManagedRegister::FromCoreRegister(R0);
-    }
-  } else {
-    switch (GetShorty()[0]) {
+  switch (GetShorty()[0]) {
     case 'V':
       return ArmManagedRegister::NoRegister();
     case 'D':
@@ -147,7 +136,6 @@
       return ArmManagedRegister::FromRegisterPair(R0_R1);
     default:
       return ArmManagedRegister::FromCoreRegister(R0);
-    }
   }
 }
 
@@ -198,80 +186,65 @@
 const ManagedRegisterEntrySpills& ArmManagedRuntimeCallingConvention::EntrySpills() {
   // We spill the argument registers on ARM to free them up for scratch use, we then assume
   // all arguments are on the stack.
-  if (kArm32QuickCodeUseSoftFloat) {
-    if (entry_spills_.size() == 0) {
-      size_t num_spills = NumArgs() + NumLongOrDoubleArgs();
-      if (num_spills > 0) {
-        entry_spills_.push_back(ArmManagedRegister::FromCoreRegister(R1));
-        if (num_spills > 1) {
-          entry_spills_.push_back(ArmManagedRegister::FromCoreRegister(R2));
-          if (num_spills > 2) {
-            entry_spills_.push_back(ArmManagedRegister::FromCoreRegister(R3));
-          }
-        }
-      }
-    }
-  } else {
-    if ((entry_spills_.size() == 0) && (NumArgs() > 0)) {
-      uint32_t gpr_index = 1;  // R0 ~ R3. Reserve r0 for ArtMethod*.
-      uint32_t fpr_index = 0;  // S0 ~ S15.
-      uint32_t fpr_double_index = 0;  // D0 ~ D7.
+  if ((entry_spills_.size() == 0) && (NumArgs() > 0)) {
+    uint32_t gpr_index = 1;  // R0 ~ R3. Reserve r0 for ArtMethod*.
+    uint32_t fpr_index = 0;  // S0 ~ S15.
+    uint32_t fpr_double_index = 0;  // D0 ~ D7.
 
-      ResetIterator(FrameOffset(0));
-      while (HasNext()) {
-        if (IsCurrentParamAFloatOrDouble()) {
-          if (IsCurrentParamADouble()) {  // Double.
-            // Double should not overlap with float.
-            fpr_double_index = (std::max(fpr_double_index * 2, RoundUp(fpr_index, 2))) / 2;
-            if (fpr_double_index < arraysize(kHFDArgumentRegisters)) {
-              entry_spills_.push_back(
-                  ArmManagedRegister::FromDRegister(kHFDArgumentRegisters[fpr_double_index++]));
-            } else {
-              entry_spills_.push_back(ManagedRegister::NoRegister(), 8);
-            }
-          } else {  // Float.
-            // Float should not overlap with double.
-            if (fpr_index % 2 == 0) {
-              fpr_index = std::max(fpr_double_index * 2, fpr_index);
-            }
-            if (fpr_index < arraysize(kHFSArgumentRegisters)) {
-              entry_spills_.push_back(
-                  ArmManagedRegister::FromSRegister(kHFSArgumentRegisters[fpr_index++]));
-            } else {
-              entry_spills_.push_back(ManagedRegister::NoRegister(), 4);
-            }
-          }
-        } else {
-          // FIXME: Pointer this returns as both reference and long.
-          if (IsCurrentParamALong() && !IsCurrentParamAReference()) {  // Long.
-            if (gpr_index < arraysize(kHFCoreArgumentRegisters) - 1) {
-              // Skip R1, and use R2_R3 if the long is the first parameter.
-              if (gpr_index == 1) {
-                gpr_index++;
-              }
-            }
-
-            // If it spans register and memory, we must use the value in memory.
-            if (gpr_index < arraysize(kHFCoreArgumentRegisters) - 1) {
-              entry_spills_.push_back(
-                  ArmManagedRegister::FromCoreRegister(kHFCoreArgumentRegisters[gpr_index++]));
-            } else if (gpr_index == arraysize(kHFCoreArgumentRegisters) - 1) {
-              gpr_index++;
-              entry_spills_.push_back(ManagedRegister::NoRegister(), 4);
-            } else {
-              entry_spills_.push_back(ManagedRegister::NoRegister(), 4);
-            }
-          }
-          // High part of long or 32-bit argument.
-          if (gpr_index < arraysize(kHFCoreArgumentRegisters)) {
+    ResetIterator(FrameOffset(0));
+    while (HasNext()) {
+      if (IsCurrentParamAFloatOrDouble()) {
+        if (IsCurrentParamADouble()) {  // Double.
+          // Double should not overlap with float.
+          fpr_double_index = (std::max(fpr_double_index * 2, RoundUp(fpr_index, 2))) / 2;
+          if (fpr_double_index < arraysize(kHFDArgumentRegisters)) {
             entry_spills_.push_back(
-                ArmManagedRegister::FromCoreRegister(kHFCoreArgumentRegisters[gpr_index++]));
+                ArmManagedRegister::FromDRegister(kHFDArgumentRegisters[fpr_double_index++]));
+          } else {
+            entry_spills_.push_back(ManagedRegister::NoRegister(), 8);
+          }
+        } else {  // Float.
+          // Float should not overlap with double.
+          if (fpr_index % 2 == 0) {
+            fpr_index = std::max(fpr_double_index * 2, fpr_index);
+          }
+          if (fpr_index < arraysize(kHFSArgumentRegisters)) {
+            entry_spills_.push_back(
+                ArmManagedRegister::FromSRegister(kHFSArgumentRegisters[fpr_index++]));
           } else {
             entry_spills_.push_back(ManagedRegister::NoRegister(), 4);
           }
         }
-        Next();
+      } else {
+        // FIXME: Pointer this returns as both reference and long.
+        if (IsCurrentParamALong() && !IsCurrentParamAReference()) {  // Long.
+          if (gpr_index < arraysize(kHFCoreArgumentRegisters) - 1) {
+            // Skip R1, and use R2_R3 if the long is the first parameter.
+            if (gpr_index == 1) {
+              gpr_index++;
+            }
+          }
+
+          // If it spans register and memory, we must use the value in memory.
+          if (gpr_index < arraysize(kHFCoreArgumentRegisters) - 1) {
+            entry_spills_.push_back(
+                ArmManagedRegister::FromCoreRegister(kHFCoreArgumentRegisters[gpr_index++]));
+          } else if (gpr_index == arraysize(kHFCoreArgumentRegisters) - 1) {
+            gpr_index++;
+            entry_spills_.push_back(ManagedRegister::NoRegister(), 4);
+          } else {
+            entry_spills_.push_back(ManagedRegister::NoRegister(), 4);
+          }
+        }
+        // High part of long or 32-bit argument.
+        if (gpr_index < arraysize(kHFCoreArgumentRegisters)) {
+          entry_spills_.push_back(
+              ArmManagedRegister::FromCoreRegister(kHFCoreArgumentRegisters[gpr_index++]));
+        } else {
+          entry_spills_.push_back(ManagedRegister::NoRegister(), 4);
+        }
       }
+      Next();
     }
   }
   return entry_spills_;
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index 73b0fa2..e128a15 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -434,9 +434,9 @@
 }
 
 static bool IsInstructionSetSupported(InstructionSet instruction_set) {
-  return (instruction_set == kArm && !kArm32QuickCodeUseSoftFloat)
+  return instruction_set == kArm
       || instruction_set == kArm64
-      || (instruction_set == kThumb2 && !kArm32QuickCodeUseSoftFloat)
+      || instruction_set == kThumb2
       || instruction_set == kMips
       || instruction_set == kMips64
       || instruction_set == kX86
diff --git a/runtime/arch/arm/entrypoints_init_arm.cc b/runtime/arch/arm/entrypoints_init_arm.cc
index 090bab7..78b9e46 100644
--- a/runtime/arch/arm/entrypoints_init_arm.cc
+++ b/runtime/arch/arm/entrypoints_init_arm.cc
@@ -131,19 +131,11 @@
   qpoints->pShlLong = art_quick_shl_long;
   qpoints->pShrLong = art_quick_shr_long;
   qpoints->pUshrLong = art_quick_ushr_long;
-  if (kArm32QuickCodeUseSoftFloat) {
-    qpoints->pFmod = fmod;
-    qpoints->pFmodf = fmodf;
-    qpoints->pD2l = art_d2l;
-    qpoints->pF2l = art_f2l;
-    qpoints->pL2f = art_l2f;
-  } else {
-    qpoints->pFmod = art_quick_fmod;
-    qpoints->pFmodf = art_quick_fmodf;
-    qpoints->pD2l = art_quick_d2l;
-    qpoints->pF2l = art_quick_f2l;
-    qpoints->pL2f = art_quick_l2f;
-  }
+  qpoints->pFmod = art_quick_fmod;
+  qpoints->pFmodf = art_quick_fmodf;
+  qpoints->pD2l = art_quick_d2l;
+  qpoints->pF2l = art_quick_f2l;
+  qpoints->pL2f = art_quick_l2f;
 
   // More math.
   qpoints->pCos = cos;
diff --git a/runtime/arch/arm/quick_entrypoints_cc_arm.cc b/runtime/arch/arm/quick_entrypoints_cc_arm.cc
index ce531f0..232ec31 100644
--- a/runtime/arch/arm/quick_entrypoints_cc_arm.cc
+++ b/runtime/arch/arm/quick_entrypoints_cc_arm.cc
@@ -34,8 +34,7 @@
   uint32_t fpr_index = 0;  // Index into float registers.
   uint32_t fpr_double_index = 0;  // Index into float registers for doubles.
   uint32_t arg_index = 0;  // Index into argument array.
-  const uint32_t result_in_float = kArm32QuickCodeUseSoftFloat ? 0 :
-      (shorty[0] == 'F' || shorty[0] == 'D') ? 1 : 0;
+  const uint32_t result_in_float = (shorty[0] == 'F' || shorty[0] == 'D') ? 1 : 0;
 
   if (!kIsStatic) {
     // Copy receiver for non-static methods.
@@ -44,10 +43,6 @@
 
   for (uint32_t shorty_index = 1; shorty[shorty_index] != '\0'; ++shorty_index, ++arg_index) {
     char arg_type = shorty[shorty_index];
-    if (kArm32QuickCodeUseSoftFloat) {
-      arg_type = (arg_type == 'D') ? 'J' : arg_type;  // Regard double as long.
-      arg_type = (arg_type == 'F') ? 'I' : arg_type;  // Regard float as int.
-    }
     switch (arg_type) {
       case 'D': {
         // Copy double argument into fp_reg_args if there are still floating point reg arguments.
@@ -75,13 +70,13 @@
         }
         break;
       case 'J':
-        if (gpr_index == 1 && !kArm32QuickCodeUseSoftFloat) {
+        if (gpr_index == 1) {
           // Don't use r1-r2 as a register pair, move to r2-r3 instead.
           gpr_index++;
         }
         if (gpr_index < arraysize(core_reg_args)) {
           // Note that we don't need to do this if two registers are not available
-          // when !kArm32QuickCodeUseSoftFloat. We do it anyway to leave this
+          // when using hard-fp. We do it anyway to leave this
           // code simple.
           core_reg_args[gpr_index++] = args[arg_index];
         }
diff --git a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
index f4214ff..7481d92 100644
--- a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
@@ -77,13 +77,13 @@
   // | S0         |
   // |            |    4x2 bytes padding
   // | Method*    |  <- sp
-  static constexpr bool kSplitPairAcrossRegisterAndStack = kArm32QuickCodeUseSoftFloat;
-  static constexpr bool kAlignPairRegister = !kArm32QuickCodeUseSoftFloat;
-  static constexpr bool kQuickSoftFloatAbi = kArm32QuickCodeUseSoftFloat;
-  static constexpr bool kQuickDoubleRegAlignedFloatBackFilled = !kArm32QuickCodeUseSoftFloat;
+  static constexpr bool kSplitPairAcrossRegisterAndStack = false;
+  static constexpr bool kAlignPairRegister = true;
+  static constexpr bool kQuickSoftFloatAbi = false;
+  static constexpr bool kQuickDoubleRegAlignedFloatBackFilled = true;
   static constexpr bool kQuickSkipOddFpRegisters = false;
   static constexpr size_t kNumQuickGprArgs = 3;
-  static constexpr size_t kNumQuickFprArgs = kArm32QuickCodeUseSoftFloat ? 0 : 16;
+  static constexpr size_t kNumQuickFprArgs = 16;
   static constexpr bool kGprFprLockstep = false;
   static constexpr size_t kQuickCalleeSaveFrame_RefAndArgs_Fpr1Offset =
       arm::ArmCalleeSaveFpr1Offset(CalleeSaveType::kSaveRefsAndArgs);  // Offset of first FPR arg.
diff --git a/runtime/globals.h b/runtime/globals.h
index f0227f3..f10c780 100644
--- a/runtime/globals.h
+++ b/runtime/globals.h
@@ -105,10 +105,6 @@
 // True if we allow moving classes.
 static constexpr bool kMovingClasses = !kMarkCompactSupport;
 
-// If true, the quick compiler embeds class pointers in the compiled
-// code, if possible.
-static constexpr bool kEmbedClassInCode = true;
-
 // If true, enable the tlab allocator by default.
 #ifdef ART_USE_TLAB
 static constexpr bool kUseTlab = true;
@@ -131,8 +127,6 @@
 
 static constexpr bool kDefaultMustRelocate = true;
 
-static constexpr bool kArm32QuickCodeUseSoftFloat = false;
-
 #ifdef ART_ENABLE_VDEX
 static constexpr bool kIsVdexEnabled = true;
 #else