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

Unified Diff: src/a64/macro-assembler-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 | « src/a64/macro-assembler-a64.h ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/a64/macro-assembler-a64.cc
diff --git a/src/a64/macro-assembler-a64.cc b/src/a64/macro-assembler-a64.cc
index 8a9bd61fddae324a44cbeae64f25d105a5fc57da..1fad909fd9459ce138768835311601dca4effc1a 100644
--- a/src/a64/macro-assembler-a64.cc
+++ b/src/a64/macro-assembler-a64.cc
@@ -5072,9 +5072,9 @@ bool MacroAssembler::IsCodeAgeSequence(byte* sequence) {
#endif
-void MacroAssembler::FlooringDiv(Register result,
- Register dividend,
- int32_t divisor) {
+void MacroAssembler::TruncatingDiv(Register result,
+ Register dividend,
+ int32_t divisor) {
ASSERT(!AreAliased(result, dividend));
ASSERT(result.Is32Bits() && dividend.Is32Bits());
MultiplierAndShift ms(divisor);
@@ -5084,6 +5084,7 @@ void MacroAssembler::FlooringDiv(Register result,
if (divisor > 0 && ms.multiplier() < 0) Add(result, result, dividend);
if (divisor < 0 && ms.multiplier() > 0) Sub(result, result, dividend);
if (ms.shift() > 0) Asr(result, result, ms.shift());
+ Add(result, result, Operand(dividend, LSR, 31));
}
« no previous file with comments | « src/a64/macro-assembler-a64.h ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698