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

Side by Side Diff: src/crankshaft/x64/lithium-codegen-x64.cc

Issue 1761823002: [compiler] Introduce StringEqualStub and StringNotEqualStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address feedback. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/crankshaft/x64/lithium-codegen-x64.h" 7 #include "src/crankshaft/x64/lithium-codegen-x64.h"
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 2300 matching lines...) Expand 10 before | Expand all | Expand 10 after
2311 Immediate(1 << Map::kIsUndetectable)); 2311 Immediate(1 << Map::kIsUndetectable));
2312 EmitBranch(instr, not_zero); 2312 EmitBranch(instr, not_zero);
2313 } 2313 }
2314 2314
2315 2315
2316 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { 2316 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) {
2317 DCHECK(ToRegister(instr->context()).is(rsi)); 2317 DCHECK(ToRegister(instr->context()).is(rsi));
2318 DCHECK(ToRegister(instr->left()).is(rdx)); 2318 DCHECK(ToRegister(instr->left()).is(rdx));
2319 DCHECK(ToRegister(instr->right()).is(rax)); 2319 DCHECK(ToRegister(instr->right()).is(rax));
2320 2320
2321 Handle<Code> code = CodeFactory::StringCompare(isolate()).code(); 2321 if (Token::IsOrderedRelationalCompareOp(instr->op())) {
2322 CallCode(code, RelocInfo::CODE_TARGET, instr); 2322 Handle<Code> code = CodeFactory::StringCompare(isolate()).code();
2323 __ testp(rax, rax); 2323 CallCode(code, RelocInfo::CODE_TARGET, instr);
2324 __ testp(rax, rax);
2325 } else {
2326 Handle<Code> code = CodeFactory::StringEqual(isolate()).code();
2327 CallCode(code, RelocInfo::CODE_TARGET, instr);
2328 __ CompareRoot(rax, Heap::kTrueValueRootIndex);
2329 }
2324 2330
2325 EmitBranch(instr, TokenToCondition(instr->op(), false)); 2331 EmitBranch(instr, TokenToCondition(instr->op(), false));
2326 } 2332 }
2327 2333
2328 2334
2329 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { 2335 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) {
2330 InstanceType from = instr->from(); 2336 InstanceType from = instr->from();
2331 InstanceType to = instr->to(); 2337 InstanceType to = instr->to();
2332 if (from == FIRST_TYPE) return to; 2338 if (from == FIRST_TYPE) return to;
2333 DCHECK(from == to || to == LAST_TYPE); 2339 DCHECK(from == to || to == LAST_TYPE);
(...skipping 3181 matching lines...) Expand 10 before | Expand all | Expand 10 after
5515 __ movp(Operand(rbp, StandardFrameConstants::kContextOffset), context); 5521 __ movp(Operand(rbp, StandardFrameConstants::kContextOffset), context);
5516 } 5522 }
5517 5523
5518 5524
5519 #undef __ 5525 #undef __
5520 5526
5521 } // namespace internal 5527 } // namespace internal
5522 } // namespace v8 5528 } // namespace v8
5523 5529
5524 #endif // V8_TARGET_ARCH_X64 5530 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/crankshaft/mips64/lithium-codegen-mips64.cc ('k') | test/cctest/compiler/test-simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698