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

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

Issue 1765823002: [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 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 #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 if (Token::IsOrderedRelationalCompareOp(instr->op())) { 5196 Handle<Code> code = CodeFactory::StringCompare(isolate(), instr->op()).code();
5197 Handle<Code> code = CodeFactory::StringCompare(isolate()).code(); 5197 CallCode(code, RelocInfo::CODE_TARGET, instr);
5198 CallCode(code, RelocInfo::CODE_TARGET, instr); 5198 __ CompareRoot(x0, Heap::kTrueValueRootIndex);
5199 5199 EmitBranch(instr, eq);
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 }
5208 } 5200 }
5209 5201
5210 5202
5211 void LCodeGen::DoSubI(LSubI* instr) { 5203 void LCodeGen::DoSubI(LSubI* instr) {
5212 bool can_overflow = instr->hydrogen()->CheckFlag(HValue::kCanOverflow); 5204 bool can_overflow = instr->hydrogen()->CheckFlag(HValue::kCanOverflow);
5213 Register result = ToRegister32(instr->result()); 5205 Register result = ToRegister32(instr->result());
5214 Register left = ToRegister32(instr->left()); 5206 Register left = ToRegister32(instr->left());
5215 Operand right = ToShiftedRightOperand32(instr->right(), instr); 5207 Operand right = ToShiftedRightOperand32(instr->right(), instr);
5216 5208
5217 if (can_overflow) { 5209 if (can_overflow) {
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
5661 5653
5662 5654
5663 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { 5655 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) {
5664 Register context = ToRegister(instr->context()); 5656 Register context = ToRegister(instr->context());
5665 __ Str(context, MemOperand(fp, StandardFrameConstants::kContextOffset)); 5657 __ Str(context, MemOperand(fp, StandardFrameConstants::kContextOffset));
5666 } 5658 }
5667 5659
5668 5660
5669 } // namespace internal 5661 } // namespace internal
5670 } // namespace v8 5662 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698