OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |