| 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" | 5 #include "vm/globals.h" |
| 6 #if defined(HOST_OS_ANDROID) | 6 #if defined(HOST_OS_ANDROID) |
| 7 | 7 |
| 8 #include "vm/os.h" | 8 #include "vm/os.h" |
| 9 | 9 |
| 10 #include <android/log.h> // NOLINT | 10 #include <android/log.h> // NOLINT |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 ASSERT(Utils::IsPowerOfTwo(alignment)); | 202 ASSERT(Utils::IsPowerOfTwo(alignment)); |
| 203 ASSERT(alignment >= kMinimumAlignment); | 203 ASSERT(alignment >= kMinimumAlignment); |
| 204 return alignment; | 204 return alignment; |
| 205 } | 205 } |
| 206 | 206 |
| 207 | 207 |
| 208 intptr_t OS::PreferredCodeAlignment() { | 208 intptr_t OS::PreferredCodeAlignment() { |
| 209 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) || \ | 209 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) || \ |
| 210 defined(TARGET_ARCH_ARM64) || defined(TARGET_ARCH_DBC) | 210 defined(TARGET_ARCH_ARM64) || defined(TARGET_ARCH_DBC) |
| 211 const int kMinimumAlignment = 32; | 211 const int kMinimumAlignment = 32; |
| 212 #elif defined(TARGET_ARCH_ARM) || defined(TARGET_ARCH_MIPS) | 212 #elif defined(TARGET_ARCH_ARM) |
| 213 const int kMinimumAlignment = 16; | 213 const int kMinimumAlignment = 16; |
| 214 #else | 214 #else |
| 215 #error Unsupported architecture. | 215 #error Unsupported architecture. |
| 216 #endif | 216 #endif |
| 217 intptr_t alignment = kMinimumAlignment; | 217 intptr_t alignment = kMinimumAlignment; |
| 218 // TODO(5411554): Allow overriding default code alignment for | 218 // TODO(5411554): Allow overriding default code alignment for |
| 219 // testing purposes. | 219 // testing purposes. |
| 220 // Flags::DebugIsInt("codealign", &alignment); | 220 // Flags::DebugIsInt("codealign", &alignment); |
| 221 ASSERT(Utils::IsPowerOfTwo(alignment)); | 221 ASSERT(Utils::IsPowerOfTwo(alignment)); |
| 222 ASSERT(alignment >= kMinimumAlignment); | 222 ASSERT(alignment >= kMinimumAlignment); |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 } | 439 } |
| 440 | 440 |
| 441 | 441 |
| 442 void OS::Exit(int code) { | 442 void OS::Exit(int code) { |
| 443 exit(code); | 443 exit(code); |
| 444 } | 444 } |
| 445 | 445 |
| 446 } // namespace dart | 446 } // namespace dart |
| 447 | 447 |
| 448 #endif // defined(HOST_OS_ANDROID) | 448 #endif // defined(HOST_OS_ANDROID) |
| OLD | NEW |