From 3173c8a11f7e23a89526e0ac3b21af5150966d74 Mon Sep 17 00:00:00 2001 From: Calin Juravle Date: Mon, 23 Feb 2015 15:53:39 +0000 Subject: [optimizing] Fix float addition on x86. Change-Id: Ic39aaae89b8e5184b98001ea67221a3564e9334a --- compiler/optimizing/code_generator_x86.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'compiler') diff --git a/compiler/optimizing/code_generator_x86.cc b/compiler/optimizing/code_generator_x86.cc index e151c6b683..1101569174 100644 --- a/compiler/optimizing/code_generator_x86.cc +++ b/compiler/optimizing/code_generator_x86.cc @@ -1809,7 +1809,7 @@ void LocationsBuilderX86::VisitAdd(HAdd* add) { case Primitive::kPrimFloat: case Primitive::kPrimDouble: { locations->SetInAt(0, Location::RequiresFpuRegister()); - locations->SetInAt(1, Location::Any()); + locations->SetInAt(1, Location::RequiresFpuRegister()); locations->SetOut(Location::SameAsFirstInput()); break; } @@ -1853,8 +1853,6 @@ void InstructionCodeGeneratorX86::VisitAdd(HAdd* add) { case Primitive::kPrimFloat: { if (second.IsFpuRegister()) { __ addss(first.AsFpuRegister(), second.AsFpuRegister()); - } else { - __ addss(first.AsFpuRegister(), Address(ESP, second.GetStackIndex())); } break; } @@ -1862,8 +1860,6 @@ void InstructionCodeGeneratorX86::VisitAdd(HAdd* add) { case Primitive::kPrimDouble: { if (second.IsFpuRegister()) { __ addsd(first.AsFpuRegister(), second.AsFpuRegister()); - } else { - __ addsd(first.AsFpuRegister(), Address(ESP, second.GetStackIndex())); } break; } -- cgit v1.2.3-59-g8ed1b