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

Unified Diff: src/a64/lithium-codegen-a64.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 | « no previous file | src/a64/macro-assembler-a64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/a64/lithium-codegen-a64.cc
diff --git a/src/a64/lithium-codegen-a64.cc b/src/a64/lithium-codegen-a64.cc
index 18e353b2c8078d8b28aee77d4c0a429119d89ca0..eabd0e22a0b541f11517f8c1906d1735601fb929 100644
--- a/src/a64/lithium-codegen-a64.cc
+++ b/src/a64/lithium-codegen-a64.cc
@@ -2679,8 +2679,7 @@ void LCodeGen::DoDivByConstI(LDivByConstI* instr) {
DeoptimizeIfZero(dividend, instr->environment());
}
- __ FlooringDiv(result, dividend, Abs(divisor));
- __ Add(result, result, Operand(dividend, LSR, 31));
+ __ TruncatingDiv(result, dividend, Abs(divisor));
if (divisor < 0) __ Neg(result, result);
if (!hdiv->CheckFlag(HInstruction::kAllUsesTruncatingToInt32)) {
@@ -3895,7 +3894,8 @@ void LCodeGen::DoFlooringDivByConstI(LFlooringDivByConstI* instr) {
DeoptimizeIf(eq, instr->environment());
}
- __ FlooringDiv(result, dividend, divisor);
+ // TODO(svenpanne) Add correction terms.
+ __ TruncatingDiv(result, dividend, divisor);
}
@@ -4168,8 +4168,7 @@ void LCodeGen::DoModByConstI(LModByConstI* instr) {
return;
}
- __ FlooringDiv(result, dividend, Abs(divisor));
- __ Add(result, result, Operand(dividend, LSR, 31));
+ __ TruncatingDiv(result, dividend, Abs(divisor));
__ Sxtw(dividend.X(), dividend);
__ Mov(temp, Abs(divisor));
__ Smsubl(result.X(), result, temp, dividend.X());
« no previous file with comments | « no previous file | src/a64/macro-assembler-a64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698