summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-08-05 02:11:01 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-08-05 02:11:01 +0000
commit1056919800f5db8d7a9607835fa34254eae51ec3 (patch)
treee14e783094d45cb64705f3c5d83cee7eb0eb1551 /compiler
parent1cf85515600d298a2c9e4de137c0926949205097 (diff)
parent9ca257196b46fd7629bce0b338580e571e4113a8 (diff)
Merge "ART: x86_64 RoundDouble/Float intrinsics should initialize out value."
Diffstat (limited to 'compiler')
-rw-r--r--compiler/optimizing/intrinsics_x86_64.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/optimizing/intrinsics_x86_64.cc b/compiler/optimizing/intrinsics_x86_64.cc
index 8ab0b771fc..62cdb4c34a 100644
--- a/compiler/optimizing/intrinsics_x86_64.cc
+++ b/compiler/optimizing/intrinsics_x86_64.cc
@@ -690,7 +690,7 @@ static void CreateSSE41FPToIntLocations(ArenaAllocator* arena,
LocationSummary::kNoCall,
kIntrinsified);
locations->SetInAt(0, Location::RequiresFpuRegister());
- locations->SetOut(Location::RequiresFpuRegister());
+ locations->SetOut(Location::RequiresRegister());
locations->AddTemp(Location::RequiresFpuRegister());
return;
}
@@ -732,6 +732,9 @@ void IntrinsicCodeGeneratorX86_64::VisitMathRoundFloat(HInvoke* invoke) {
// And truncate to an integer.
__ roundss(inPlusPointFive, inPlusPointFive, Immediate(1));
+ // Load maxInt into out.
+ codegen_->Load64BitValue(out, kPrimIntMax);
+
// if inPlusPointFive >= maxInt goto done
__ comiss(inPlusPointFive, codegen_->LiteralFloatAddress(static_cast<float>(kPrimIntMax)));
__ j(kAboveEqual, &done);
@@ -776,6 +779,9 @@ void IntrinsicCodeGeneratorX86_64::VisitMathRoundDouble(HInvoke* invoke) {
// And truncate to an integer.
__ roundsd(inPlusPointFive, inPlusPointFive, Immediate(1));
+ // Load maxLong into out.
+ codegen_->Load64BitValue(out, kPrimLongMax);
+
// if inPlusPointFive >= maxLong goto done
__ comisd(inPlusPointFive, codegen_->LiteralDoubleAddress(static_cast<double>(kPrimLongMax)));
__ j(kAboveEqual, &done);