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

Unified Diff: src/x64/macro-assembler-x64.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/x64/macro-assembler-x64.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/macro-assembler-x64.cc
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
index 6b84b0bc1aad2a8377890cc09140d7e0eec7fca9..fe65f9454232aa4c17ab9f936206a454d4b68d8f 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -4992,7 +4992,7 @@ void MacroAssembler::JumpIfDictionaryInPrototypeChain(
}
-void MacroAssembler::FlooringDiv(Register dividend, int32_t divisor) {
+void MacroAssembler::TruncatingDiv(Register dividend, int32_t divisor) {
ASSERT(!dividend.is(rax));
ASSERT(!dividend.is(rdx));
MultiplierAndShift ms(divisor);
@@ -5001,6 +5001,9 @@ void MacroAssembler::FlooringDiv(Register dividend, int32_t divisor) {
if (divisor > 0 && ms.multiplier() < 0) addl(rdx, dividend);
if (divisor < 0 && ms.multiplier() > 0) subl(rdx, dividend);
if (ms.shift() > 0) sarl(rdx, Immediate(ms.shift()));
+ movl(rax, dividend);
+ shrl(rax, Immediate(31));
+ addl(rdx, rax);
}
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698