Index: src/crankshaft/mips64/lithium-codegen-mips64.cc |
diff --git a/src/crankshaft/mips64/lithium-codegen-mips64.cc b/src/crankshaft/mips64/lithium-codegen-mips64.cc |
index f8652ea84346abb3f87596723611a56f56583876..721605aca98fb88e763cf6a7e40b5d26bc808235 100644 |
--- a/src/crankshaft/mips64/lithium-codegen-mips64.cc |
+++ b/src/crankshaft/mips64/lithium-codegen-mips64.cc |
@@ -2392,11 +2392,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)); |
+ } |
} |