diff options
author | Pavel Vyssotski <pavel.n.vyssotski@intel.com> | 2015-08-06 16:58:35 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-08-06 16:58:35 +0000 |
commit | c01d9e9e9b9d5140b366943735fe1e0a18ab4416 (patch) | |
tree | 460b5aa557b9a7b5d01ec59e4ec9c4c4e51d8ca3 | |
parent | bb1f94f7553501882a4b8391fbf5cb75e2e416bd (diff) | |
parent | ce4b1329ca903d6b98734a27a46b54bb9cfd6d5b (diff) | |
download | art-c01d9e9e9b9d5140b366943735fe1e0a18ab4416.tar.gz art-c01d9e9e9b9d5140b366943735fe1e0a18ab4416.tar.bz2 art-c01d9e9e9b9d5140b366943735fe1e0a18ab4416.zip |
am ce4b1329: ART: x86_64 RoundDouble/Float intrinsics should initialize out value.
* commit 'ce4b1329ca903d6b98734a27a46b54bb9cfd6d5b':
ART: x86_64 RoundDouble/Float intrinsics should initialize out value.
-rw-r--r-- | compiler/optimizing/intrinsics_x86_64.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/optimizing/intrinsics_x86_64.cc b/compiler/optimizing/intrinsics_x86_64.cc index c245cb646f..450e550328 100644 --- a/compiler/optimizing/intrinsics_x86_64.cc +++ b/compiler/optimizing/intrinsics_x86_64.cc @@ -686,7 +686,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; } @@ -728,6 +728,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); @@ -772,6 +775,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); |