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

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

Issue 197873029: Tweaked FlooringDiv back to TruncatingDiv again. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 6 years, 9 months 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 | « src/a64/macro-assembler-a64.cc ('k') | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/lithium-codegen-arm.cc
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
index 7b1c537a582d2ed03764cad86ceb857ef11147f8..0ff60dc5e6509140d9ca6776e4ace187eead97f6 100644
--- a/src/arm/lithium-codegen-arm.cc
+++ b/src/arm/lithium-codegen-arm.cc
@@ -1161,8 +1161,7 @@ void LCodeGen::DoModByConstI(LModByConstI* instr) {
return;
}
- __ FlooringDiv(result, dividend, Abs(divisor));
- __ add(result, result, Operand(dividend, LSR, 31));
+ __ TruncatingDiv(result, dividend, Abs(divisor));
__ mov(ip, Operand(Abs(divisor)));
__ smull(result, ip, result, ip);
__ sub(result, dividend, result, SetCC);
@@ -1349,8 +1348,7 @@ void LCodeGen::DoDivByConstI(LDivByConstI* instr) {
DeoptimizeIf(eq, instr->environment());
}
- __ FlooringDiv(result, dividend, Abs(divisor));
- __ add(result, result, Operand(dividend, LSR, 31));
+ __ TruncatingDiv(result, dividend, Abs(divisor));
if (divisor < 0) __ rsb(result, result, Operand::Zero());
if (!hdiv->CheckFlag(HInstruction::kAllUsesTruncatingToInt32)) {
@@ -1509,7 +1507,8 @@ void LCodeGen::DoFlooringDivByConstI(LFlooringDivByConstI* instr) {
DeoptimizeIf(eq, instr->environment());
}
- __ FlooringDiv(result, dividend, divisor);
+ // TODO(svenpanne) Add correction terms.
+ __ TruncatingDiv(result, dividend, divisor);
}
« no previous file with comments | « src/a64/macro-assembler-a64.cc ('k') | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698