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

Unified Diff: src/ia32/macro-assembler-ia32.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/ia32/macro-assembler-ia32.h ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/macro-assembler-ia32.cc
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc
index ae6b50c92fdde011c547a5c37e0ad15dc6723dc1..4682b37b16e409c23b9e962f326198fd66d183a8 100644
--- a/src/ia32/macro-assembler-ia32.cc
+++ b/src/ia32/macro-assembler-ia32.cc
@@ -3627,7 +3627,7 @@ void MacroAssembler::JumpIfDictionaryInPrototypeChain(
}
-void MacroAssembler::FlooringDiv(Register dividend, int32_t divisor) {
+void MacroAssembler::TruncatingDiv(Register dividend, int32_t divisor) {
ASSERT(!dividend.is(eax));
ASSERT(!dividend.is(edx));
MultiplierAndShift ms(divisor);
@@ -3636,6 +3636,9 @@ void MacroAssembler::FlooringDiv(Register dividend, int32_t divisor) {
if (divisor > 0 && ms.multiplier() < 0) add(edx, dividend);
if (divisor < 0 && ms.multiplier() > 0) sub(edx, dividend);
if (ms.shift() > 0) sar(edx, ms.shift());
+ mov(eax, dividend);
+ shr(eax, 31);
+ add(edx, eax);
}
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698