MIPS: Tidy up Throw and Mod
authorpalfia@homejinni.com <palfia@homejinni.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 2 Dec 2013 21:18:22 +0000 (21:18 +0000)
committerpalfia@homejinni.com <palfia@homejinni.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 2 Dec 2013 21:18:22 +0000 (21:18 +0000)
Port r18200 (4110d9df)

Original commit message:
Small fixes to Throw and Mod Lithium instructions.

BUG=
R=plind44@gmail.com

Review URL: https://codereview.chromium.org/100003003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18214 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/mips/lithium-codegen-mips.cc
src/mips/lithium-mips.cc

index 566d0bc..9f3c088 100644 (file)
@@ -1841,8 +1841,7 @@ void LCodeGen::DoSeqStringSetChar(LSeqStringSetChar* instr) {
 
 
 void LCodeGen::DoThrow(LThrow* instr) {
-  Register input_reg = EmitLoadRegister(instr->value(), at);
-  __ push(input_reg);
+  __ push(ToRegister(instr->value()));
   ASSERT(ToRegister(instr->context()).is(cp));
   CallRuntime(Runtime::kThrow, 1, instr);
 
index 4f0f23f..a441ba5 100644 (file)
@@ -1455,7 +1455,7 @@ LInstruction* LChunkBuilder::DoMod(HMod* instr) {
     if (instr->HasPowerOf2Divisor()) {
       ASSERT(!right->CanBeZero());
       LModI* mod = new(zone()) LModI(UseRegisterAtStart(left),
-                                     UseOrConstant(right));
+                                     UseConstant(right));
       LInstruction* result = DefineAsRegister(mod);
       return (left->CanBeNegative() &&
               instr->CheckFlag(HValue::kBailoutOnMinusZero))