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
This commit is contained in:
parent
b71352b0a0
commit
3d2dc89796
@ -1268,12 +1268,12 @@ void LCodeGen::DoMulI(LMulI* instr) {
|
|||||||
__ sll(result, left, shift);
|
__ sll(result, left, shift);
|
||||||
} else if (IsPowerOf2(constant_abs - 1)) {
|
} else if (IsPowerOf2(constant_abs - 1)) {
|
||||||
int32_t shift = WhichPowerOf2(constant_abs - 1);
|
int32_t shift = WhichPowerOf2(constant_abs - 1);
|
||||||
__ sll(result, left, shift);
|
__ sll(scratch, left, shift);
|
||||||
__ Addu(result, result, left);
|
__ Addu(result, scratch, left);
|
||||||
} else if (IsPowerOf2(constant_abs + 1)) {
|
} else if (IsPowerOf2(constant_abs + 1)) {
|
||||||
int32_t shift = WhichPowerOf2(constant_abs + 1);
|
int32_t shift = WhichPowerOf2(constant_abs + 1);
|
||||||
__ sll(result, left, shift);
|
__ sll(scratch, left, shift);
|
||||||
__ Subu(result, result, left);
|
__ Subu(result, scratch, left);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Correct the sign of the result is the constant is negative.
|
// Correct the sign of the result is the constant is negative.
|
||||||
|
Loading…
Reference in New Issue
Block a user