Index: src/x87/lithium-codegen-x87.cc |
diff --git a/src/x87/lithium-codegen-x87.cc b/src/x87/lithium-codegen-x87.cc |
index 111a281278e7cb0670ac02c3d002530044095ce9..24f62fb14ae8a17f8b9ffd70e025ac4b69d761de 100644 |
--- a/src/x87/lithium-codegen-x87.cc |
+++ b/src/x87/lithium-codegen-x87.cc |
@@ -1372,11 +1372,6 @@ void LCodeGen::DoCallStub(LCallStub* instr) { |
CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
break; |
} |
- case CodeStub::StringCompare: { |
- StringCompareStub stub(isolate()); |
- CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
- break; |
- } |
default: |
UNREACHABLE(); |
} |
@@ -2724,16 +2719,15 @@ static Condition ComputeCompareCondition(Token::Value op) { |
void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { |
- Token::Value op = instr->op(); |
- |
- Handle<Code> ic = |
- CodeFactory::CompareIC(isolate(), op, Strength::WEAK).code(); |
- CallCode(ic, RelocInfo::CODE_TARGET, instr); |
+ DCHECK(ToRegister(instr->context()).is(esi)); |
+ DCHECK(ToRegister(instr->left()).is(edx)); |
+ DCHECK(ToRegister(instr->right()).is(eax)); |
- Condition condition = ComputeCompareCondition(op); |
- __ test(eax, Operand(eax)); |
+ Handle<Code> code = CodeFactory::StringCompare(isolate()).code(); |
+ CallCode(code, RelocInfo::CODE_TARGET, instr); |
+ __ test(eax, eax); |
- EmitBranch(instr, condition); |
+ EmitBranch(instr, ComputeCompareCondition(instr->op())); |
} |