Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index 7ef838ab10f5f127d63e8e310adf59be7a0bb9c8..81d275f7a9d60bb7dc6cc5ab3291c332cd3d33b4 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -999,11 +999,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(); |
} |
@@ -2491,16 +2486,14 @@ void LCodeGen::DoIsUndetectableAndBranch(LIsUndetectableAndBranch* instr) { |
void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { |
DCHECK(ToRegister(instr->context()).is(rsi)); |
- Token::Value op = instr->op(); |
- |
- Handle<Code> ic = |
- CodeFactory::CompareIC(isolate(), op, Strength::WEAK).code(); |
- CallCode(ic, RelocInfo::CODE_TARGET, instr); |
+ DCHECK(ToRegister(instr->left()).is(rdx)); |
+ DCHECK(ToRegister(instr->right()).is(rax)); |
- Condition condition = TokenToCondition(op, false); |
+ Handle<Code> code = CodeFactory::StringCompare(isolate()).code(); |
+ CallCode(code, RelocInfo::CODE_TARGET, instr); |
__ testp(rax, rax); |
- EmitBranch(instr, condition); |
+ EmitBranch(instr, TokenToCondition(instr->op(), false)); |
} |