Index: src/crankshaft/mips/lithium-codegen-mips.cc |
diff --git a/src/crankshaft/mips/lithium-codegen-mips.cc b/src/crankshaft/mips/lithium-codegen-mips.cc |
index 1073f86af0a28d9f7602cd1352962cbfee3d917e..dd908dea5ca3c9c15ee965c831148091bc1bfcfc 100644 |
--- a/src/crankshaft/mips/lithium-codegen-mips.cc |
+++ b/src/crankshaft/mips/lithium-codegen-mips.cc |
@@ -2275,11 +2275,19 @@ void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { |
DCHECK(ToRegister(instr->left()).is(a1)); |
DCHECK(ToRegister(instr->right()).is(a0)); |
- Handle<Code> code = CodeFactory::StringCompare(isolate()).code(); |
- CallCode(code, RelocInfo::CODE_TARGET, instr); |
+ if (Token::IsOrderedRelationalCompareOp(instr->op())) { |
+ Handle<Code> code = CodeFactory::StringCompare(isolate()).code(); |
+ CallCode(code, RelocInfo::CODE_TARGET, instr); |
+ |
+ EmitBranch(instr, ComputeCompareCondition(instr->op()), v0, |
+ Operand(zero_reg)); |
+ } else { |
+ Handle<Code> code = CodeFactory::StringEqual(isolate()).code(); |
+ CallCode(code, RelocInfo::CODE_TARGET, instr); |
+ __ LoadRoot(at, Heap::kTrueValueRootIndex); |
- EmitBranch(instr, ComputeCompareCondition(instr->op()), v0, |
- Operand(zero_reg)); |
+ EmitBranch(instr, ComputeCompareCondition(instr->op()), v0, Operand(at)); |
+ } |
} |