| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 7 | 7 |
| 8 #include "vm/assembler_macros.h" | 8 #include "vm/assembler_macros.h" |
| 9 | 9 |
| 10 #include "vm/assembler.h" | 10 #include "vm/assembler.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // before a frame is created. | 60 // before a frame is created. |
| 61 if (offset != 0) { | 61 if (offset != 0) { |
| 62 __ addq(Address(RSP, 0), Immediate(-offset)); | 62 __ addq(Address(RSP, 0), Immediate(-offset)); |
| 63 } | 63 } |
| 64 if (frame_size != 0) { | 64 if (frame_size != 0) { |
| 65 __ subq(RSP, Immediate(frame_size)); | 65 __ subq(RSP, Immediate(frame_size)); |
| 66 } | 66 } |
| 67 } | 67 } |
| 68 | 68 |
| 69 | 69 |
| 70 void AssemblerMacros::EnterDartLeafFrame(Assembler* assembler, | |
| 71 intptr_t frame_size) { | |
| 72 __ EnterFrame(0); | |
| 73 Label dart_entry; | |
| 74 // Leave room for the saved PC, it will be filled in lazily, leave | |
| 75 // uninitialized. | |
| 76 __ subq(RSP, Immediate(frame_size + kWordSize)); | |
| 77 #if defined(DEBUG) | |
| 78 // Store an invalid object in saved PC slot. | |
| 79 __ movq(Address(RBP, -kWordSize), Immediate(kHeapObjectTag)); | |
| 80 #endif | |
| 81 } | |
| 82 | |
| 83 | |
| 84 void AssemblerMacros::EnterStubFrame(Assembler* assembler) { | 70 void AssemblerMacros::EnterStubFrame(Assembler* assembler) { |
| 85 __ EnterFrame(0); | 71 __ EnterFrame(0); |
| 86 __ pushq(Immediate(0)); // Push 0 in the saved PC area for stub frames. | 72 __ pushq(Immediate(0)); // Push 0 in the saved PC area for stub frames. |
| 87 } | 73 } |
| 88 | 74 |
| 89 #undef __ | 75 #undef __ |
| 90 | 76 |
| 91 } // namespace dart | 77 } // namespace dart |
| 92 | 78 |
| 93 #endif // defined TARGET_ARCH_X64 | 79 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |