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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arm64/lithium-codegen-arm64.h" | 7 #include "src/arm64/lithium-codegen-arm64.h" |
8 #include "src/arm64/lithium-gap-resolver-arm64.h" | 8 #include "src/arm64/lithium-gap-resolver-arm64.h" |
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 1751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1762 } | 1762 } |
1763 } | 1763 } |
1764 | 1764 |
1765 | 1765 |
1766 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { | 1766 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { |
1767 DCHECK(ToRegister(instr->context()).is(cp)); | 1767 DCHECK(ToRegister(instr->context()).is(cp)); |
1768 DCHECK(ToRegister(instr->left()).is(x1)); | 1768 DCHECK(ToRegister(instr->left()).is(x1)); |
1769 DCHECK(ToRegister(instr->right()).is(x0)); | 1769 DCHECK(ToRegister(instr->right()).is(x0)); |
1770 DCHECK(ToRegister(instr->result()).is(x0)); | 1770 DCHECK(ToRegister(instr->result()).is(x0)); |
1771 | 1771 |
1772 Handle<Code> code = CodeFactory::BinaryOpIC( | 1772 Handle<Code> code = |
1773 isolate(), instr->op(), instr->language_mode()).code(); | 1773 CodeFactory::BinaryOpIC(isolate(), instr->op(), instr->strength()).code(); |
1774 CallCode(code, RelocInfo::CODE_TARGET, instr); | 1774 CallCode(code, RelocInfo::CODE_TARGET, instr); |
1775 } | 1775 } |
1776 | 1776 |
1777 | 1777 |
1778 void LCodeGen::DoBitI(LBitI* instr) { | 1778 void LCodeGen::DoBitI(LBitI* instr) { |
1779 Register result = ToRegister32(instr->result()); | 1779 Register result = ToRegister32(instr->result()); |
1780 Register left = ToRegister32(instr->left()); | 1780 Register left = ToRegister32(instr->left()); |
1781 Operand right = ToShiftedRightOperand32(instr->right(), instr); | 1781 Operand right = ToShiftedRightOperand32(instr->right(), instr); |
1782 | 1782 |
1783 switch (instr->op()) { | 1783 switch (instr->op()) { |
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2522 | 2522 |
2523 | 2523 |
2524 void LCodeGen::DoCmpT(LCmpT* instr) { | 2524 void LCodeGen::DoCmpT(LCmpT* instr) { |
2525 DCHECK(ToRegister(instr->context()).is(cp)); | 2525 DCHECK(ToRegister(instr->context()).is(cp)); |
2526 Token::Value op = instr->op(); | 2526 Token::Value op = instr->op(); |
2527 Condition cond = TokenToCondition(op, false); | 2527 Condition cond = TokenToCondition(op, false); |
2528 | 2528 |
2529 DCHECK(ToRegister(instr->left()).Is(x1)); | 2529 DCHECK(ToRegister(instr->left()).Is(x1)); |
2530 DCHECK(ToRegister(instr->right()).Is(x0)); | 2530 DCHECK(ToRegister(instr->right()).Is(x0)); |
2531 Handle<Code> ic = | 2531 Handle<Code> ic = |
2532 CodeFactory::CompareIC(isolate(), op, instr->language_mode()).code(); | 2532 CodeFactory::CompareIC(isolate(), op, instr->strength()).code(); |
2533 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2533 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
2534 // Signal that we don't inline smi code before this stub. | 2534 // Signal that we don't inline smi code before this stub. |
2535 InlineSmiCheckInfo::EmitNotInlined(masm()); | 2535 InlineSmiCheckInfo::EmitNotInlined(masm()); |
2536 | 2536 |
2537 // Return true or false depending on CompareIC result. | 2537 // Return true or false depending on CompareIC result. |
2538 // This instruction is marked as call. We can clobber any register. | 2538 // This instruction is marked as call. We can clobber any register. |
2539 DCHECK(instr->IsMarkedAsCall()); | 2539 DCHECK(instr->IsMarkedAsCall()); |
2540 __ LoadTrueFalseRoots(x1, x2); | 2540 __ LoadTrueFalseRoots(x1, x2); |
2541 __ Cmp(x0, 0); | 2541 __ Cmp(x0, 0); |
2542 __ Csel(ToRegister(instr->result()), x1, x2, cond); | 2542 __ Csel(ToRegister(instr->result()), x1, x2, cond); |
(...skipping 3043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5586 __ SmiTagAndPush(char_code); | 5586 __ SmiTagAndPush(char_code); |
5587 CallRuntimeFromDeferred(Runtime::kCharFromCode, 1, instr, instr->context()); | 5587 CallRuntimeFromDeferred(Runtime::kCharFromCode, 1, instr, instr->context()); |
5588 __ StoreToSafepointRegisterSlot(x0, result); | 5588 __ StoreToSafepointRegisterSlot(x0, result); |
5589 } | 5589 } |
5590 | 5590 |
5591 | 5591 |
5592 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { | 5592 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { |
5593 DCHECK(ToRegister(instr->context()).is(cp)); | 5593 DCHECK(ToRegister(instr->context()).is(cp)); |
5594 Token::Value op = instr->op(); | 5594 Token::Value op = instr->op(); |
5595 | 5595 |
5596 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op, SLOPPY).code(); | 5596 Handle<Code> ic = |
| 5597 CodeFactory::CompareIC(isolate(), op, Strength::WEAK).code(); |
5597 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 5598 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
5598 InlineSmiCheckInfo::EmitNotInlined(masm()); | 5599 InlineSmiCheckInfo::EmitNotInlined(masm()); |
5599 | 5600 |
5600 Condition condition = TokenToCondition(op, false); | 5601 Condition condition = TokenToCondition(op, false); |
5601 | 5602 |
5602 EmitCompareAndBranch(instr, condition, x0, 0); | 5603 EmitCompareAndBranch(instr, condition, x0, 0); |
5603 } | 5604 } |
5604 | 5605 |
5605 | 5606 |
5606 void LCodeGen::DoSubI(LSubI* instr) { | 5607 void LCodeGen::DoSubI(LSubI* instr) { |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6094 Handle<ScopeInfo> scope_info = instr->scope_info(); | 6095 Handle<ScopeInfo> scope_info = instr->scope_info(); |
6095 __ Push(scope_info); | 6096 __ Push(scope_info); |
6096 __ Push(ToRegister(instr->function())); | 6097 __ Push(ToRegister(instr->function())); |
6097 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6098 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6098 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6099 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6099 } | 6100 } |
6100 | 6101 |
6101 | 6102 |
6102 } // namespace internal | 6103 } // namespace internal |
6103 } // namespace v8 | 6104 } // namespace v8 |
OLD | NEW |