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

Side by Side Diff: src/crankshaft/arm64/lithium-codegen-arm64.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
« no previous file with comments | « src/crankshaft/arm/lithium-codegen-arm.cc ('k') | src/crankshaft/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" 5 #include "src/crankshaft/arm64/lithium-codegen-arm64.h"
6 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 5175 matching lines...) Expand 10 before | Expand all | Expand 10 after
5186 instr->context()); 5186 instr->context());
5187 __ StoreToSafepointRegisterSlot(x0, result); 5187 __ StoreToSafepointRegisterSlot(x0, result);
5188 } 5188 }
5189 5189
5190 5190
5191 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { 5191 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) {
5192 DCHECK(ToRegister(instr->context()).is(cp)); 5192 DCHECK(ToRegister(instr->context()).is(cp));
5193 DCHECK(ToRegister(instr->left()).is(x1)); 5193 DCHECK(ToRegister(instr->left()).is(x1));
5194 DCHECK(ToRegister(instr->right()).is(x0)); 5194 DCHECK(ToRegister(instr->right()).is(x0));
5195 5195
5196 Handle<Code> code = CodeFactory::StringCompare(isolate()).code(); 5196 if (Token::IsOrderedRelationalCompareOp(instr->op())) {
5197 CallCode(code, RelocInfo::CODE_TARGET, instr); 5197 Handle<Code> code = CodeFactory::StringCompare(isolate()).code();
5198 CallCode(code, RelocInfo::CODE_TARGET, instr);
5198 5199
5199 EmitCompareAndBranch(instr, TokenToCondition(instr->op(), false), x0, 0); 5200 EmitCompareAndBranch(instr, TokenToCondition(instr->op(), false), x0, 0);
5201 } else {
5202 Handle<Code> code = CodeFactory::StringEqual(isolate()).code();
5203 CallCode(code, RelocInfo::CODE_TARGET, instr);
5204 __ CompareRoot(x0, Heap::kTrueValueRootIndex);
5205
5206 EmitBranch(instr, TokenToCondition(instr->op(), false));
5207 }
5200 } 5208 }
5201 5209
5202 5210
5203 void LCodeGen::DoSubI(LSubI* instr) { 5211 void LCodeGen::DoSubI(LSubI* instr) {
5204 bool can_overflow = instr->hydrogen()->CheckFlag(HValue::kCanOverflow); 5212 bool can_overflow = instr->hydrogen()->CheckFlag(HValue::kCanOverflow);
5205 Register result = ToRegister32(instr->result()); 5213 Register result = ToRegister32(instr->result());
5206 Register left = ToRegister32(instr->left()); 5214 Register left = ToRegister32(instr->left());
5207 Operand right = ToShiftedRightOperand32(instr->right(), instr); 5215 Operand right = ToShiftedRightOperand32(instr->right(), instr);
5208 5216
5209 if (can_overflow) { 5217 if (can_overflow) {
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
5653 5661
5654 5662
5655 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { 5663 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) {
5656 Register context = ToRegister(instr->context()); 5664 Register context = ToRegister(instr->context());
5657 __ Str(context, MemOperand(fp, StandardFrameConstants::kContextOffset)); 5665 __ Str(context, MemOperand(fp, StandardFrameConstants::kContextOffset));
5658 } 5666 }
5659 5667
5660 5668
5661 } // namespace internal 5669 } // namespace internal
5662 } // namespace v8 5670 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/arm/lithium-codegen-arm.cc ('k') | src/crankshaft/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698