ARM: VIXL32: Pass test 406-fields and a few others.

This patch focuses on passing test `406-fields`. Other tests pass as well:
* 017-float
* 018-stack-overflow
* 041-narrowing
* 302-float-conversion
* 406-fields
* 414-optimizing-arith-sub
* 419-long-parameter
* 429-ssa-builder
* 439-swap-double
* 440-stmp
* 477-long-2-float-convers-precision
* 551-implicit-null-checks
* 565-checker-condition-liveness
* 583-checker-zero
* 703-floating-point-div
* 705-register-conflict

Test: export ART_USE_VIXL_ARM_BACKEND=true && \
      mma test-art-host dist && \
      mma test-art-target dist

Change-Id: Id203d45436c8fd869550e44e2591b4a2dff74795
diff --git a/compiler/optimizing/code_generator_arm_vixl.cc b/compiler/optimizing/code_generator_arm_vixl.cc
index bfade3c..cac0543 100644
--- a/compiler/optimizing/code_generator_arm_vixl.cc
+++ b/compiler/optimizing/code_generator_arm_vixl.cc
@@ -37,6 +37,7 @@
 namespace vixl32 = vixl::aarch32;
 using namespace vixl32;  // NOLINT(build/namespaces)
 
+using helpers::DRegisterFrom;
 using helpers::DWARFReg;
 using helpers::FromLowSToD;
 using helpers::HighDRegisterFrom;
@@ -1347,6 +1348,26 @@
   // Will be generated at use site.
 }
 
+void LocationsBuilderARMVIXL::VisitFloatConstant(HFloatConstant* constant) {
+  LocationSummary* locations =
+      new (GetGraph()->GetArena()) LocationSummary(constant, LocationSummary::kNoCall);
+  locations->SetOut(Location::ConstantLocation(constant));
+}
+
+void InstructionCodeGeneratorARMVIXL::VisitFloatConstant(HFloatConstant* constant ATTRIBUTE_UNUSED) {
+  // Will be generated at use site.
+}
+
+void LocationsBuilderARMVIXL::VisitDoubleConstant(HDoubleConstant* constant) {
+  LocationSummary* locations =
+      new (GetGraph()->GetArena()) LocationSummary(constant, LocationSummary::kNoCall);
+  locations->SetOut(Location::ConstantLocation(constant));
+}
+
+void InstructionCodeGeneratorARMVIXL::VisitDoubleConstant(HDoubleConstant* constant ATTRIBUTE_UNUSED) {
+  // Will be generated at use site.
+}
+
 void LocationsBuilderARMVIXL::VisitMemoryBarrier(HMemoryBarrier* memory_barrier) {
   memory_barrier->SetLocations(nullptr);
 }
@@ -3101,7 +3122,14 @@
       GetAssembler()->StoreToOffset(kStoreWord, temp, sp, destination.GetStackIndex());
     }
   } else if (source.IsFpuRegister()) {
-    TODO_VIXL32(FATAL);
+    if (destination.IsRegister()) {
+      TODO_VIXL32(FATAL);
+    } else if (destination.IsFpuRegister()) {
+      __ Vmov(SRegisterFrom(destination), SRegisterFrom(source));
+    } else {
+      DCHECK(destination.IsStackSlot());
+      GetAssembler()->StoreSToOffset(SRegisterFrom(source), sp, destination.GetStackIndex());
+    }
   } else if (source.IsDoubleStackSlot()) {
     if (destination.IsDoubleStackSlot()) {
       vixl32::DRegister temp = temps.AcquireD();
@@ -3112,7 +3140,8 @@
       GetAssembler()->LoadFromOffset(
           kLoadWordPair, LowRegisterFrom(destination), sp, source.GetStackIndex());
     } else {
-      TODO_VIXL32(FATAL);
+      DCHECK(destination.IsFpuRegisterPair()) << destination;
+      GetAssembler()->LoadDFromOffset(DRegisterFrom(destination), sp, source.GetStackIndex());
     }
   } else if (source.IsRegisterPair()) {
     if (destination.IsRegisterPair()) {
@@ -3131,7 +3160,14 @@
                                     destination.GetStackIndex());
     }
   } else if (source.IsFpuRegisterPair()) {
-    TODO_VIXL32(FATAL);
+    if (destination.IsRegisterPair()) {
+      TODO_VIXL32(FATAL);
+    } else if (destination.IsFpuRegisterPair()) {
+      __ Vmov(DRegisterFrom(destination), DRegisterFrom(source));
+    } else {
+      DCHECK(destination.IsDoubleStackSlot()) << destination;
+      GetAssembler()->StoreDToOffset(DRegisterFrom(source), sp, destination.GetStackIndex());
+    }
   } else {
     DCHECK(source.IsConstant()) << source;
     HConstant* constant = source.GetConstant();