Commit 2cb65b13 authored by yangguo@chromium.org's avatar yangguo@chromium.org

MIPS: Fixed illegal instruction use on Loongson in code for Math.random().

BUG=v8:2115
TEST=mjsunit/string-case,mjsunit/regress/regress-110509,mjsunit/math-floor

Review URL: https://chromiumcodereview.appspot.com/10383044
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11523 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 80256c74
......@@ -3225,7 +3225,7 @@ void LCodeGen::DoRandom(LRandom* instr) {
// state[0] = 18273 * (state[0] & 0xFFFF) + (state[0] >> 16)
__ And(a3, a1, Operand(0xFFFF));
__ li(t0, Operand(18273));
__ mul(a3, a3, t0);
__ Mul(a3, a3, t0);
__ srl(a1, a1, 16);
__ Addu(a1, a3, a1);
// Save state[0].
......@@ -3234,7 +3234,7 @@ void LCodeGen::DoRandom(LRandom* instr) {
// state[1] = 36969 * (state[1] & 0xFFFF) + (state[1] >> 16)
__ And(a3, a0, Operand(0xFFFF));
__ li(t0, Operand(36969));
__ mul(a3, a3, t0);
__ Mul(a3, a3, t0);
__ srl(a0, a0, 16),
__ Addu(a0, a3, a0);
// Save state[1].
......
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