| 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 1649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1660 } | 1660 } |
| 1661 } | 1661 } |
| 1662 | 1662 |
| 1663 | 1663 |
| 1664 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { | 1664 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { |
| 1665 DCHECK(ToRegister(instr->context()).is(cp)); | 1665 DCHECK(ToRegister(instr->context()).is(cp)); |
| 1666 DCHECK(ToRegister(instr->left()).is(x1)); | 1666 DCHECK(ToRegister(instr->left()).is(x1)); |
| 1667 DCHECK(ToRegister(instr->right()).is(x0)); | 1667 DCHECK(ToRegister(instr->right()).is(x0)); |
| 1668 DCHECK(ToRegister(instr->result()).is(x0)); | 1668 DCHECK(ToRegister(instr->result()).is(x0)); |
| 1669 | 1669 |
| 1670 Handle<Code> code = | 1670 Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), instr->op()).code(); |
| 1671 CodeFactory::BinaryOpIC(isolate(), instr->op(), instr->strength()).code(); | |
| 1672 CallCode(code, RelocInfo::CODE_TARGET, instr); | 1671 CallCode(code, RelocInfo::CODE_TARGET, instr); |
| 1673 } | 1672 } |
| 1674 | 1673 |
| 1675 | 1674 |
| 1676 void LCodeGen::DoBitI(LBitI* instr) { | 1675 void LCodeGen::DoBitI(LBitI* instr) { |
| 1677 Register result = ToRegister32(instr->result()); | 1676 Register result = ToRegister32(instr->result()); |
| 1678 Register left = ToRegister32(instr->left()); | 1677 Register left = ToRegister32(instr->left()); |
| 1679 Operand right = ToShiftedRightOperand32(instr->right(), instr); | 1678 Operand right = ToShiftedRightOperand32(instr->right(), instr); |
| 1680 | 1679 |
| 1681 switch (instr->op()) { | 1680 switch (instr->op()) { |
| (...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2392 } | 2391 } |
| 2393 | 2392 |
| 2394 | 2393 |
| 2395 void LCodeGen::DoCmpT(LCmpT* instr) { | 2394 void LCodeGen::DoCmpT(LCmpT* instr) { |
| 2396 DCHECK(ToRegister(instr->context()).is(cp)); | 2395 DCHECK(ToRegister(instr->context()).is(cp)); |
| 2397 Token::Value op = instr->op(); | 2396 Token::Value op = instr->op(); |
| 2398 Condition cond = TokenToCondition(op, false); | 2397 Condition cond = TokenToCondition(op, false); |
| 2399 | 2398 |
| 2400 DCHECK(ToRegister(instr->left()).Is(x1)); | 2399 DCHECK(ToRegister(instr->left()).Is(x1)); |
| 2401 DCHECK(ToRegister(instr->right()).Is(x0)); | 2400 DCHECK(ToRegister(instr->right()).Is(x0)); |
| 2402 Handle<Code> ic = | 2401 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); |
| 2403 CodeFactory::CompareIC(isolate(), op, instr->strength()).code(); | |
| 2404 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2402 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 2405 // Signal that we don't inline smi code before this stub. | 2403 // Signal that we don't inline smi code before this stub. |
| 2406 InlineSmiCheckInfo::EmitNotInlined(masm()); | 2404 InlineSmiCheckInfo::EmitNotInlined(masm()); |
| 2407 | 2405 |
| 2408 // Return true or false depending on CompareIC result. | 2406 // Return true or false depending on CompareIC result. |
| 2409 // This instruction is marked as call. We can clobber any register. | 2407 // This instruction is marked as call. We can clobber any register. |
| 2410 DCHECK(instr->IsMarkedAsCall()); | 2408 DCHECK(instr->IsMarkedAsCall()); |
| 2411 __ LoadTrueFalseRoots(x1, x2); | 2409 __ LoadTrueFalseRoots(x1, x2); |
| 2412 __ Cmp(x0, 0); | 2410 __ Cmp(x0, 0); |
| 2413 __ Csel(ToRegister(instr->result()), x1, x2, cond); | 2411 __ Csel(ToRegister(instr->result()), x1, x2, cond); |
| (...skipping 3328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5742 Handle<ScopeInfo> scope_info = instr->scope_info(); | 5740 Handle<ScopeInfo> scope_info = instr->scope_info(); |
| 5743 __ Push(scope_info); | 5741 __ Push(scope_info); |
| 5744 __ Push(ToRegister(instr->function())); | 5742 __ Push(ToRegister(instr->function())); |
| 5745 CallRuntime(Runtime::kPushBlockContext, instr); | 5743 CallRuntime(Runtime::kPushBlockContext, instr); |
| 5746 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5744 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5747 } | 5745 } |
| 5748 | 5746 |
| 5749 | 5747 |
| 5750 } // namespace internal | 5748 } // namespace internal |
| 5751 } // namespace v8 | 5749 } // namespace v8 |
| OLD | NEW |