Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(261)

Unified Diff: src/crankshaft/x87/lithium-codegen-x87.cc

Issue 1768013002: X87: [compiler] Introduce code stubs for string relational comparisons. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/x87/lithium-codegen-x87.cc
diff --git a/src/crankshaft/x87/lithium-codegen-x87.cc b/src/crankshaft/x87/lithium-codegen-x87.cc
index bf39b7f84eda6d5fab54dc72754c0df99a493bdc..a7eaae10359a74ecffaaa6add53b9176db3789f0 100644
--- a/src/crankshaft/x87/lithium-codegen-x87.cc
+++ b/src/crankshaft/x87/lithium-codegen-x87.cc
@@ -2452,17 +2452,10 @@ void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) {
DCHECK(ToRegister(instr->left()).is(edx));
DCHECK(ToRegister(instr->right()).is(eax));
- if (Token::IsOrderedRelationalCompareOp(instr->op())) {
- Handle<Code> code = CodeFactory::StringCompare(isolate()).code();
- CallCode(code, RelocInfo::CODE_TARGET, instr);
- __ test(eax, eax);
- } else {
- Handle<Code> code = CodeFactory::StringEqual(isolate()).code();
- CallCode(code, RelocInfo::CODE_TARGET, instr);
- __ CompareRoot(eax, Heap::kTrueValueRootIndex);
- }
-
- EmitBranch(instr, ComputeCompareCondition(instr->op()));
+ Handle<Code> code = CodeFactory::StringCompare(isolate(), instr->op()).code();
+ CallCode(code, RelocInfo::CODE_TARGET, instr);
+ __ CompareRoot(eax, Heap::kTrueValueRootIndex);
+ EmitBranch(instr, equal);
}
« no previous file with comments | « no previous file | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698