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

Unified Diff: src/mips64/macro-assembler-mips64.cc

Issue 637273002: MIPS64: Fix TruncatingDiv. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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/mips64/simulator-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/macro-assembler-mips64.cc
diff --git a/src/mips64/macro-assembler-mips64.cc b/src/mips64/macro-assembler-mips64.cc
index 9aa75700cbfe10f934ac3cf2a398bd6a6650b67d..2d3241fb9eaee70a2c95b3faca6a75c50f77a0b6 100644
--- a/src/mips64/macro-assembler-mips64.cc
+++ b/src/mips64/macro-assembler-mips64.cc
@@ -6069,7 +6069,7 @@ void MacroAssembler::TruncatingDiv(Register result,
DCHECK(!result.is(at));
base::MagicNumbersForDivision<uint32_t> mag =
dusmil.imgtec 2014/10/08 09:56:40 Can we instantiate template class with int32_t par
Sven Panne 2014/10/08 10:44:13 Nope, the template parameter *must* be unsigned, o
base::SignedDivisionByConstant(static_cast<uint32_t>(divisor));
- li(at, Operand(mag.multiplier));
+ li(at, Operand(static_cast<int32_t>(mag.multiplier)));
Mulh(result, dividend, Operand(at));
bool neg = (mag.multiplier & (static_cast<uint32_t>(1) << 31)) != 0;
if (divisor > 0 && neg) {
« no previous file with comments | « no previous file | src/mips64/simulator-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698