Commit 3d2dc897 authored by palfia@homejinni.com's avatar palfia@homejinni.com

MIPS: Fix test262 regression.

This regression was introduced by r13705 (fd03c7d6)

BUG=test262/data/test/suite/ch11/11.13/11.13.2

Review URL: https://codereview.chromium.org/12844005
Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13944 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent b71352b0
......@@ -1268,12 +1268,12 @@ void LCodeGen::DoMulI(LMulI* instr) {
__ sll(result, left, shift);
} else if (IsPowerOf2(constant_abs - 1)) {
int32_t shift = WhichPowerOf2(constant_abs - 1);
__ sll(result, left, shift);
__ Addu(result, result, left);
__ sll(scratch, left, shift);
__ Addu(result, scratch, left);
} else if (IsPowerOf2(constant_abs + 1)) {
int32_t shift = WhichPowerOf2(constant_abs + 1);
__ sll(result, left, shift);
__ Subu(result, result, left);
__ sll(scratch, left, shift);
__ Subu(result, scratch, left);
}
// Correct the sign of the result is the constant is negative.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment