diff options
| author | 2016-10-17 14:57:13 +0100 | |
|---|---|---|
| committer | 2016-10-25 12:19:04 +0000 | |
| commit | b45fbaa527d702be3a9b1d44dc42aafaf50fb44f (patch) | |
| tree | 17cfe4de9dfd607a23f787cd7e3c1a395ee4b413 /compiler | |
| parent | 9c19bd66fdb9b22045aeb91c053c4fc16af402ec (diff) | |
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
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/optimizing/code_generator_arm_vixl.cc | 42 | ||||
| -rw-r--r-- | compiler/optimizing/code_generator_arm_vixl.h | 4 |
2 files changed, 41 insertions, 5 deletions
diff --git a/compiler/optimizing/code_generator_arm_vixl.cc b/compiler/optimizing/code_generator_arm_vixl.cc index bfade3ccbe..cac0543da3 100644 --- a/compiler/optimizing/code_generator_arm_vixl.cc +++ b/compiler/optimizing/code_generator_arm_vixl.cc @@ -37,6 +37,7 @@ namespace arm { 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 @@ void InstructionCodeGeneratorARMVIXL::VisitLongConstant(HLongConstant* constant // 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 @@ void ParallelMoveResolverARMVIXL::EmitMove(size_t index) { 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 @@ void ParallelMoveResolverARMVIXL::EmitMove(size_t index) { 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 @@ void ParallelMoveResolverARMVIXL::EmitMove(size_t index) { 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(); diff --git a/compiler/optimizing/code_generator_arm_vixl.h b/compiler/optimizing/code_generator_arm_vixl.h index 7815db2960..1cd6184dd4 100644 --- a/compiler/optimizing/code_generator_arm_vixl.h +++ b/compiler/optimizing/code_generator_arm_vixl.h @@ -114,8 +114,10 @@ class LoadClassSlowPathARMVIXL; M(CurrentMethod) \ M(Div) \ M(DivZeroCheck) \ + M(DoubleConstant) \ M(Equal) \ M(Exit) \ + M(FloatConstant) \ M(Goto) \ M(GreaterThan) \ M(GreaterThanOrEqual) \ @@ -163,8 +165,6 @@ class LoadClassSlowPathARMVIXL; M(CheckCast) \ M(ClassTableGet) \ M(Deoptimize) \ - M(DoubleConstant) \ - M(FloatConstant) \ M(InstanceOf) \ M(InvokeInterface) \ M(InvokeUnresolved) \ |