diff options
| author | 2014-10-07 19:33:07 +0000 | |
|---|---|---|
| committer | 2014-10-07 19:33:07 +0000 | |
| commit | a9f2904263581f606a5704f2bb74efcecf7e9f97 (patch) | |
| tree | 8b1bec67452b84809cecd5645543e1f885ccbd44 /compiler/optimizing/code_generator.cc | |
| parent | 4a1b4679cda2f0d2893b8e3f910c21231849291c (diff) | |
| parent | 7fb49da8ec62e8a10ed9419ade9f32c6b1174687 (diff) | |
Merge "Add support for floats and doubles."
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
| -rw-r--r-- | compiler/optimizing/code_generator.cc | 7 |
1 files changed, 7 insertions, 0 deletions
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; |