OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/compiler/instruction-selector-impl.h" | 5 #include "src/compiler/instruction-selector-impl.h" |
6 #include "src/compiler/node-matchers.h" | 6 #include "src/compiler/node-matchers.h" |
7 #include "src/compiler/node-properties.h" | 7 #include "src/compiler/node-properties.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1636 bool to_native_stack = descriptor->UseNativeStack(); | 1636 bool to_native_stack = descriptor->UseNativeStack(); |
1637 | 1637 |
1638 int claim_count = static_cast<int>(arguments->size()); | 1638 int claim_count = static_cast<int>(arguments->size()); |
1639 int slot = claim_count - 1; | 1639 int slot = claim_count - 1; |
1640 if (to_native_stack) { | 1640 if (to_native_stack) { |
1641 // Native stack must always be aligned to 16 (2 words). | 1641 // Native stack must always be aligned to 16 (2 words). |
1642 claim_count = RoundUp(claim_count, 2); | 1642 claim_count = RoundUp(claim_count, 2); |
1643 } | 1643 } |
1644 // TODO(titzer): claim and poke probably take small immediates. | 1644 // TODO(titzer): claim and poke probably take small immediates. |
1645 // Bump the stack pointer(s). | 1645 // Bump the stack pointer(s). |
1646 if (claim_count > 0) { | 1646 if (claim_count > 0 || to_native_stack) { |
1647 // TODO(titzer): it would be better to bump the csp here only | 1647 // TODO(titzer): it would be better to bump the csp here only |
1648 // and emit paired stores with increment for non c frames. | 1648 // and emit paired stores with increment for non c frames. |
1649 ArchOpcode claim = to_native_stack ? kArm64ClaimCSP : kArm64ClaimJSSP; | 1649 ArchOpcode claim = to_native_stack ? kArm64ClaimCSP : kArm64ClaimJSSP; |
1650 Emit(claim, g.NoOutput(), g.TempImmediate(claim_count)); | 1650 Emit(claim, g.NoOutput(), g.TempImmediate(claim_count)); |
1651 } | 1651 } |
1652 | 1652 |
1653 // Poke the arguments into the stack. | 1653 // Poke the arguments into the stack. |
1654 ArchOpcode poke = to_native_stack ? kArm64PokeCSP : kArm64PokeJSSP; | 1654 ArchOpcode poke = to_native_stack ? kArm64PokeCSP : kArm64PokeJSSP; |
1655 while (slot >= 0) { | 1655 while (slot >= 0) { |
1656 Emit(poke, g.NoOutput(), g.UseRegister((*arguments)[slot].node()), | 1656 Emit(poke, g.NoOutput(), g.UseRegister((*arguments)[slot].node()), |
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2264 MachineOperatorBuilder::kWord32ShiftIsSafe | | 2264 MachineOperatorBuilder::kWord32ShiftIsSafe | |
2265 MachineOperatorBuilder::kInt32DivIsSafe | | 2265 MachineOperatorBuilder::kInt32DivIsSafe | |
2266 MachineOperatorBuilder::kUint32DivIsSafe | | 2266 MachineOperatorBuilder::kUint32DivIsSafe | |
2267 MachineOperatorBuilder::kWord32ReverseBits | | 2267 MachineOperatorBuilder::kWord32ReverseBits | |
2268 MachineOperatorBuilder::kWord64ReverseBits; | 2268 MachineOperatorBuilder::kWord64ReverseBits; |
2269 } | 2269 } |
2270 | 2270 |
2271 } // namespace compiler | 2271 } // namespace compiler |
2272 } // namespace internal | 2272 } // namespace internal |
2273 } // namespace v8 | 2273 } // namespace v8 |
OLD | NEW |