Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Unified Diff: src/arm/lithium-arm.cc

Issue 775613002: Fixed environment handling for LFlooringDivI on ARM. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Added test Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-437765.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/lithium-arm.cc
diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc
index 46897a3726c398786950fc78d20efe393ab1e30a..acb64f7c338dc536a0eddca0cccccf016f35fd4f 100644
--- a/src/arm/lithium-arm.cc
+++ b/src/arm/lithium-arm.cc
@@ -1397,8 +1397,16 @@ LInstruction* LChunkBuilder::DoFlooringDivI(HMathFloorOfDiv* instr) {
LOperand* divisor = UseRegister(instr->right());
LOperand* temp =
CpuFeatures::IsSupported(SUDIV) ? NULL : TempDoubleRegister();
- LFlooringDivI* div = new(zone()) LFlooringDivI(dividend, divisor, temp);
- return AssignEnvironment(DefineAsRegister(div));
+ LInstruction* result =
+ DefineAsRegister(new (zone()) LFlooringDivI(dividend, divisor, temp));
+ if (instr->CheckFlag(HValue::kCanBeDivByZero) ||
+ instr->CheckFlag(HValue::kBailoutOnMinusZero) ||
+ (instr->CheckFlag(HValue::kCanOverflow) &&
+ (!CpuFeatures::IsSupported(SUDIV) ||
+ !instr->CheckFlag(HValue::kAllUsesTruncatingToInt32)))) {
+ result = AssignEnvironment(result);
+ }
+ return result;
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-437765.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698