Index: src/compiler/mips/code-generator-mips.cc |
diff --git a/src/compiler/mips/code-generator-mips.cc b/src/compiler/mips/code-generator-mips.cc |
index 45ab52c54a8616ded9d5a492d4fc87f8cc58785e..aa7897657b027245997f44c435d5a4d70db674e1 100644 |
--- a/src/compiler/mips/code-generator-mips.cc |
+++ b/src/compiler/mips/code-generator-mips.cc |
@@ -665,7 +665,12 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) { |
__ Or(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1)); |
break; |
case kMipsNor: |
- __ Nor(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1)); |
+ if (instr->InputAt(1)->IsRegister()) { |
+ __ Nor(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1)); |
+ } else { |
+ DCHECK(i.InputOperand(1).immediate() == 0); |
+ __ Nor(i.OutputRegister(), i.InputRegister(0), zero_reg); |
+ } |
break; |
case kMipsXor: |
__ Xor(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1)); |