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

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

Issue 1413643004: Fix CPU features detection and stack alignment assert on iOS (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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
« runtime/vm/cpu_arm.cc ('K') | « runtime/vm/cpu_arm.cc ('k') | no next file » | 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_MACOS) 6 #if defined(TARGET_OS_MACOS)
7 7
8 #include "vm/os.h" 8 #include "vm/os.h"
9 9
10 #include <errno.h> // NOLINT 10 #include <errno.h> // NOLINT
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 return malloc(size); 134 return malloc(size);
135 } 135 }
136 136
137 137
138 void OS::AlignedFree(void* ptr) { 138 void OS::AlignedFree(void* ptr) {
139 free(ptr); 139 free(ptr);
140 } 140 }
141 141
142 142
143 intptr_t OS::ActivationFrameAlignment() { 143 intptr_t OS::ActivationFrameAlignment() {
144 #if TARGET_OS_IOS
145 #if TARGET_ARCH_ARM
146 return 8;
rmacnak 2015/10/27 20:44:22 // Even if we generate code that maintains a stron
Chinmay 2015/10/27 20:49:47 ack
147 #elif TARGET_ARCH_ARM64
148 return 16;
149 #endif
150 #else // TARGET_OS_IOS
144 // OS X activation frames must be 16 byte-aligned; see "Mac OS X ABI 151 // OS X activation frames must be 16 byte-aligned; see "Mac OS X ABI
145 // Function Call Guide". 152 // Function Call Guide".
146 return 16; 153 return 16;
154 #endif // TARGET_OS_IOS
147 } 155 }
148 156
149 157
150 intptr_t OS::PreferredCodeAlignment() { 158 intptr_t OS::PreferredCodeAlignment() {
151 ASSERT(32 <= OS::kMaxPreferredCodeAlignment); 159 ASSERT(32 <= OS::kMaxPreferredCodeAlignment);
152 return 32; 160 return 32;
153 } 161 }
154 162
155 163
156 bool OS::AllowStackFrameIteratorFromAnotherThread() { 164 bool OS::AllowStackFrameIteratorFromAnotherThread() {
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 } 346 }
339 347
340 348
341 void OS::Exit(int code) { 349 void OS::Exit(int code) {
342 exit(code); 350 exit(code);
343 } 351 }
344 352
345 } // namespace dart 353 } // namespace dart
346 354
347 #endif // defined(TARGET_OS_MACOS) 355 #endif // defined(TARGET_OS_MACOS)
OLDNEW
« runtime/vm/cpu_arm.cc ('K') | « runtime/vm/cpu_arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698