From 3d2dc8979643b0bb98cbdb45d8a13fbd16f62242 Mon Sep 17 00:00:00 2001 From: "palfia@homejinni.com" Date: Thu, 14 Mar 2013 11:08:05 +0000 Subject: [PATCH] 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 . git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13944 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/mips/lithium-codegen-mips.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc index 3cd89b8..400f26d 100644 --- a/src/mips/lithium-codegen-mips.cc +++ b/src/mips/lithium-codegen-mips.cc @@ -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. -- 2.7.4