From 7fb49da8ec62e8a10ed9419ade9f32c6b1174687 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Mon, 6 Oct 2014 09:12:41 +0100 Subject: Add support for floats and doubles. - Follows Quick conventions. - Currently only works with baseline register allocator. Change-Id: Ie4b8e298f4f5e1cd82364da83e4344d4fc3621a3 --- compiler/optimizing/code_generator.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'compiler/optimizing/code_generator.cc') diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index 2a9a7b37ab..e6fe0679f6 100644 --- a/compiler/optimizing/code_generator.cc +++ b/compiler/optimizing/code_generator.cc @@ -189,6 +189,9 @@ void CodeGenerator::AllocateRegistersLocally(HInstruction* instruction) const { if (loc.GetPolicy() == Location::kRequiresRegister) { loc = Location::RegisterLocation( AllocateFreeRegister(input->GetType(), blocked_registers_)); + } else if (loc.GetPolicy() == Location::kRequiresFpuRegister) { + loc = Location::FpuRegisterLocation( + AllocateFreeRegister(input->GetType(), blocked_registers_)); } else { DCHECK_EQ(loc.GetPolicy(), Location::kAny); HLoadLocal* load = input->AsLoadLocal(); @@ -223,6 +226,10 @@ void CodeGenerator::AllocateRegistersLocally(HInstruction* instruction) const { result_location = Location::RegisterLocation( AllocateFreeRegister(instruction->GetType(), blocked_registers_)); break; + case Location::kRequiresFpuRegister: + result_location = Location::FpuRegisterLocation( + AllocateFreeRegister(instruction->GetType(), blocked_registers_)); + break; case Location::kSameAsFirstInput: result_location = locations->InAt(0); break; -- cgit v1.2.3-59-g8ed1b