summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/code_generator.cc
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2014-10-06 09:12:41 +0100
committerNicolas Geoffray <ngeoffray@google.com>2014-10-07 20:19:47 +0100
commit7fb49da8ec62e8a10ed9419ade9f32c6b1174687 (patch)
tree8b1bec67452b84809cecd5645543e1f885ccbd44 /compiler/optimizing/code_generator.cc
parent4a1b4679cda2f0d2893b8e3f910c21231849291c (diff)
downloadandroid_art-7fb49da8ec62e8a10ed9419ade9f32c6b1174687.tar.gz
android_art-7fb49da8ec62e8a10ed9419ade9f32c6b1174687.tar.bz2
android_art-7fb49da8ec62e8a10ed9419ade9f32c6b1174687.zip
Add support for floats and doubles.
- Follows Quick conventions. - Currently only works with baseline register allocator. Change-Id: Ie4b8e298f4f5e1cd82364da83e4344d4fc3621a3
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
-rw-r--r--compiler/optimizing/code_generator.cc7
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;