Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(486)

Side by Side Diff: runtime/vm/os_android.cc

Issue 539573003: Adds support for building arm64 Android. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/cpuinfo_android.cc ('k') | runtime/vm/signal_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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(TARGET_OS_ANDROID) 6 #if defined(TARGET_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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 198
199 199
200 void OS::AlignedFree(void* ptr) { 200 void OS::AlignedFree(void* ptr) {
201 free(ptr); 201 free(ptr);
202 } 202 }
203 203
204 204
205 // TODO(5411554): May need to hoist these architecture dependent code 205 // TODO(5411554): May need to hoist these architecture dependent code
206 // into a architecture specific file e.g: os_ia32_linux.cc 206 // into a architecture specific file e.g: os_ia32_linux.cc
207 intptr_t OS::ActivationFrameAlignment() { 207 intptr_t OS::ActivationFrameAlignment() {
208 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) 208 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) || \
209 defined(TARGET_ARCH_ARM64)
209 const int kMinimumAlignment = 16; 210 const int kMinimumAlignment = 16;
210 #elif defined(TARGET_ARCH_ARM) 211 #elif defined(TARGET_ARCH_ARM)
211 const int kMinimumAlignment = 8; 212 const int kMinimumAlignment = 8;
212 #else 213 #else
213 #error Unsupported architecture. 214 #error Unsupported architecture.
214 #endif 215 #endif
215 intptr_t alignment = kMinimumAlignment; 216 intptr_t alignment = kMinimumAlignment;
216 // TODO(5411554): Allow overriding default stack alignment for 217 // TODO(5411554): Allow overriding default stack alignment for
217 // testing purposes. 218 // testing purposes.
218 // Flags::DebugIsInt("stackalign", &alignment); 219 // Flags::DebugIsInt("stackalign", &alignment);
219 ASSERT(Utils::IsPowerOfTwo(alignment)); 220 ASSERT(Utils::IsPowerOfTwo(alignment));
220 ASSERT(alignment >= kMinimumAlignment); 221 ASSERT(alignment >= kMinimumAlignment);
221 return alignment; 222 return alignment;
222 } 223 }
223 224
224 225
225 intptr_t OS::PreferredCodeAlignment() { 226 intptr_t OS::PreferredCodeAlignment() {
226 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) 227 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) || \
228 defined(TARGET_ARCH_ARM64)
227 const int kMinimumAlignment = 16; 229 const int kMinimumAlignment = 16;
228 #elif defined(TARGET_ARCH_ARM) 230 #elif defined(TARGET_ARCH_ARM)
229 const int kMinimumAlignment = 16; 231 const int kMinimumAlignment = 16;
230 #else 232 #else
231 #error Unsupported architecture. 233 #error Unsupported architecture.
232 #endif 234 #endif
233 intptr_t alignment = kMinimumAlignment; 235 intptr_t alignment = kMinimumAlignment;
234 // TODO(5411554): Allow overriding default code alignment for 236 // TODO(5411554): Allow overriding default code alignment for
235 // testing purposes. 237 // testing purposes.
236 // Flags::DebugIsInt("codealign", &alignment); 238 // Flags::DebugIsInt("codealign", &alignment);
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 } 415 }
414 416
415 417
416 void OS::Exit(int code) { 418 void OS::Exit(int code) {
417 exit(code); 419 exit(code);
418 } 420 }
419 421
420 } // namespace dart 422 } // namespace dart
421 423
422 #endif // defined(TARGET_OS_ANDROID) 424 #endif // defined(TARGET_OS_ANDROID)
OLDNEW
« no previous file with comments | « runtime/vm/cpuinfo_android.cc ('k') | runtime/vm/signal_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698