| 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 #ifndef RUNTIME_VM_GLOBALS_H_ | 5 #ifndef RUNTIME_VM_GLOBALS_H_ |
| 6 #define RUNTIME_VM_GLOBALS_H_ | 6 #define RUNTIME_VM_GLOBALS_H_ |
| 7 | 7 |
| 8 // This file contains global definitions for the VM library only. Anything that | 8 // This file contains global definitions for the VM library only. Anything that |
| 9 // is more globally useful should be added to 'vm/globals.h'. | 9 // is more globally useful should be added to 'vm/globals.h'. |
| 10 | 10 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 // Macros to get the contents of the fp register. | 100 // Macros to get the contents of the fp register. |
| 101 #if defined(TARGET_OS_WINDOWS) | 101 #if defined(TARGET_OS_WINDOWS) |
| 102 | 102 |
| 103 // clang-format off | 103 // clang-format off |
| 104 #if defined(HOST_ARCH_IA32) | 104 #if defined(HOST_ARCH_IA32) |
| 105 #define COPY_FP_REGISTER(fp) \ | 105 #define COPY_FP_REGISTER(fp) \ |
| 106 __asm { mov fp, ebp} \ | 106 __asm { mov fp, ebp} \ |
| 107 ; // NOLINT | 107 ; // NOLINT |
| 108 // clang-format on | 108 // clang-format on |
| 109 #elif defined(HOST_ARCH_X64) | 109 #elif defined(HOST_ARCH_X64) |
| 110 #define COPY_FP_REGISTER(fp) UNIMPLEMENTED(); | 110 // We don't have the asm equivalent to get at the frame pointer on |
| 111 // windows x64, return the stack pointer instead. |
| 112 #define COPY_FP_REGISTER(fp) fp = Thread::GetCurrentStackPointer(); |
| 111 #else | 113 #else |
| 112 #error Unknown host architecture. | 114 #error Unknown host architecture. |
| 113 #endif | 115 #endif |
| 114 | 116 |
| 115 #else // !defined(TARGET_OS_WINDOWS)) | 117 #else // !defined(TARGET_OS_WINDOWS)) |
| 116 | 118 |
| 117 // Assume GCC-like inline syntax is valid. | 119 // Assume GCC-like inline syntax is valid. |
| 118 #if defined(HOST_ARCH_IA32) | 120 #if defined(HOST_ARCH_IA32) |
| 119 #define COPY_FP_REGISTER(fp) asm volatile("movl %%ebp, %0" : "=r"(fp)); | 121 #define COPY_FP_REGISTER(fp) asm volatile("movl %%ebp, %0" : "=r"(fp)); |
| 120 #elif defined(HOST_ARCH_X64) | 122 #elif defined(HOST_ARCH_X64) |
| (...skipping 18 matching lines...) Expand all Loading... |
| 139 // Default value for flag --use-corelib-source-files. | 141 // Default value for flag --use-corelib-source-files. |
| 140 #if defined(TARGET_OS_WINDOWS) | 142 #if defined(TARGET_OS_WINDOWS) |
| 141 static const bool kDefaultCorelibSourceFlag = true; | 143 static const bool kDefaultCorelibSourceFlag = true; |
| 142 #else | 144 #else |
| 143 static const bool kDefaultCorelibSourceFlag = false; | 145 static const bool kDefaultCorelibSourceFlag = false; |
| 144 #endif // defined(TARGET_OS_WINDOWS) | 146 #endif // defined(TARGET_OS_WINDOWS) |
| 145 | 147 |
| 146 } // namespace dart | 148 } // namespace dart |
| 147 | 149 |
| 148 #endif // RUNTIME_VM_GLOBALS_H_ | 150 #endif // RUNTIME_VM_GLOBALS_H_ |
| OLD | NEW |