OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
7 | 7 |
8 #include "vm/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
9 | 9 |
10 #include "lib/error.h" | 10 #include "lib/error.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 __ Bind(entry_label()); | 32 __ Bind(entry_label()); |
33 | 33 |
34 if (deoptimization_env_ == NULL) { | 34 if (deoptimization_env_ == NULL) { |
35 // TODO(srdjan): Deprecate once non-SSA optimizing compiler is removed. | 35 // TODO(srdjan): Deprecate once non-SSA optimizing compiler is removed. |
36 for (intptr_t i = 0; i < registers_.length(); i++) { | 36 for (intptr_t i = 0; i < registers_.length(); i++) { |
37 if (registers_[i] != kNoRegister) { | 37 if (registers_[i] != kNoRegister) { |
38 __ pushq(registers_[i]); | 38 __ pushq(registers_[i]); |
39 } | 39 } |
40 } | 40 } |
41 } | 41 } |
| 42 |
42 if (compiler->IsLeaf()) { | 43 if (compiler->IsLeaf()) { |
43 __ Comment("Leaf method, lazy PC marker setup"); | 44 __ Comment("Leaf method, lazy PC marker setup"); |
44 // TODO(srdjan): Can we use TMP instead of RAX? We must guarantee that | 45 // TODO(srdjan): Can we use TMP instead of RAX? We must guarantee that |
45 // TMP is never part of deoptimization environment. | 46 // TMP is never part of deoptimization environment. |
46 __ pushq(RAX); // Preserve RAX. | 47 __ pushq(RAX); // Preserve RAX. |
47 Label L; | 48 Label L; |
48 __ call(&L); | 49 __ call(&L); |
49 const intptr_t offset = assem->CodeSize(); | 50 const intptr_t offset = assem->CodeSize(); |
50 __ Bind(&L); | 51 __ Bind(&L); |
51 __ popq(RAX); | 52 __ popq(RAX); |
(...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1193 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { | 1194 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { |
1194 __ Exchange(mem1, mem2); | 1195 __ Exchange(mem1, mem2); |
1195 } | 1196 } |
1196 | 1197 |
1197 | 1198 |
1198 #undef __ | 1199 #undef __ |
1199 | 1200 |
1200 } // namespace dart | 1201 } // namespace dart |
1201 | 1202 |
1202 #endif // defined TARGET_ARCH_X64 | 1203 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |