Revert "X86: Use the constant area for more operations."

Hits a DCHECK:

dex2oatd F 19461 20411 art/compiler/optimizing/pc_relative_fixups_x86.cc:196] Check failed: !invoke_static_or_direct->HasCurrentMethodInput() 


This reverts commit dc00454f0b9a134f01f79b419200f4044c2af5c6.

Change-Id: Idfcacf12eb9e1dd7e68d95e880fda0f76f90e9ed
diff --git a/compiler/optimizing/pc_relative_fixups_x86.cc b/compiler/optimizing/pc_relative_fixups_x86.cc
index 15d2024..1394dfa 100644
--- a/compiler/optimizing/pc_relative_fixups_x86.cc
+++ b/compiler/optimizing/pc_relative_fixups_x86.cc
@@ -53,10 +53,6 @@
     BinaryFP(div);
   }
 
-  void VisitCompare(HCompare* compare) OVERRIDE {
-    BinaryFP(compare);
-  }
-
   void VisitReturn(HReturn* ret) OVERRIDE {
     HConstant* value = ret->InputAt(0)->AsConstant();
     if ((value != nullptr && Primitive::IsFloatingPointType(value->GetType()))) {
@@ -78,50 +74,11 @@
 
   void BinaryFP(HBinaryOperation* bin) {
     HConstant* rhs = bin->InputAt(1)->AsConstant();
-    if (rhs != nullptr && Primitive::IsFloatingPointType(rhs->GetType())) {
+    if (rhs != nullptr && Primitive::IsFloatingPointType(bin->GetResultType())) {
       ReplaceInput(bin, rhs, 1, false);
     }
   }
 
-  void VisitEqual(HEqual* cond) OVERRIDE {
-    BinaryFP(cond);
-  }
-
-  void VisitNotEqual(HNotEqual* cond) OVERRIDE {
-    BinaryFP(cond);
-  }
-
-  void VisitLessThan(HLessThan* cond) OVERRIDE {
-    BinaryFP(cond);
-  }
-
-  void VisitLessThanOrEqual(HLessThanOrEqual* cond) OVERRIDE {
-    BinaryFP(cond);
-  }
-
-  void VisitGreaterThan(HGreaterThan* cond) OVERRIDE {
-    BinaryFP(cond);
-  }
-
-  void VisitGreaterThanOrEqual(HGreaterThanOrEqual* cond) OVERRIDE {
-    BinaryFP(cond);
-  }
-
-  void VisitNeg(HNeg* neg) OVERRIDE {
-    if (Primitive::IsFloatingPointType(neg->GetType())) {
-      // We need to replace the HNeg with a HX86FPNeg in order to address the constant area.
-      InitializePCRelativeBasePointer();
-      HGraph* graph = GetGraph();
-      HBasicBlock* block = neg->GetBlock();
-      HX86FPNeg* x86_fp_neg = new (graph->GetArena()) HX86FPNeg(
-          neg->GetType(),
-          neg->InputAt(0),
-          base_,
-          neg->GetDexPc());
-      block->ReplaceAndRemoveInstructionWith(neg, x86_fp_neg);
-    }
-  }
-
   void VisitPackedSwitch(HPackedSwitch* switch_insn) OVERRIDE {
     if (switch_insn->GetNumEntries() <=
         InstructionCodeGeneratorX86::kPackedSwitchJumpTableThreshold) {
@@ -167,13 +124,11 @@
     // If this is an invoke-static/-direct with PC-relative dex cache array
     // addressing, we need the PC-relative address base.
     HInvokeStaticOrDirect* invoke_static_or_direct = invoke->AsInvokeStaticOrDirect();
-    bool base_added = false;
     if (invoke_static_or_direct != nullptr && invoke_static_or_direct->HasPcRelativeDexCache()) {
       InitializePCRelativeBasePointer();
       // Add the extra parameter base_.
       DCHECK(!invoke_static_or_direct->HasCurrentMethodInput());
       invoke_static_or_direct->AddSpecialInput(base_);
-      base_added = true;
     }
     // Ensure that we can load FP arguments from the constant area.
     for (size_t i = 0, e = invoke->InputCount(); i < e; i++) {
@@ -182,25 +137,6 @@
         ReplaceInput(invoke, input, i, true);
       }
     }
-
-    // These intrinsics need the constant area.
-    switch (invoke->GetIntrinsic()) {
-      case Intrinsics::kMathAbsDouble:
-      case Intrinsics::kMathAbsFloat:
-      case Intrinsics::kMathMaxDoubleDouble:
-      case Intrinsics::kMathMaxFloatFloat:
-      case Intrinsics::kMathMinDoubleDouble:
-      case Intrinsics::kMathMinFloatFloat:
-        if (!base_added) {
-          DCHECK(invoke_static_or_direct != nullptr);
-          DCHECK(!invoke_static_or_direct->HasCurrentMethodInput());
-          InitializePCRelativeBasePointer();
-          invoke_static_or_direct->AddSpecialInput(base_);
-        }
-        break;
-      default:
-        break;
-    }
   }
 
   // The generated HX86ComputeBaseMethodAddress in the entry block needed as an