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

Unified Diff: runtime/vm/os_win.cc

Issue 2665143004: Fix various alignments to make ARM precompilation work on Windows. (Closed)
Patch Set: rearrange if-defines Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/os_win.cc
diff --git a/runtime/vm/os_win.cc b/runtime/vm/os_win.cc
index 1134ce70c02dd1e72881bc4b0932f76c4ac92d78..87d2247dc01d1d65412a9f0259074b234bd1ed5d 100644
--- a/runtime/vm/os_win.cc
+++ b/runtime/vm/os_win.cc
@@ -189,7 +189,11 @@ int64_t OS::GetCurrentThreadCPUMicros() {
intptr_t OS::ActivationFrameAlignment() {
-#ifdef _WIN64
+#if defined(TARGET_ARCH_ARM64)
+ return 16;
+#elif defined(TARGET_ARCH_ARM) || defined(TARGET_ARCH_MIPS)
+ return 8;
+#elif defined(_WIN64)
// Windows 64-bit ABI requires the stack to be 16-byte aligned.
return 16;
#else
@@ -201,7 +205,14 @@ intptr_t OS::ActivationFrameAlignment() {
intptr_t OS::PreferredCodeAlignment() {
ASSERT(32 <= OS::kMaxPreferredCodeAlignment);
+#if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) || \
+ defined(TARGET_ARCH_ARM64) || defined(TARGET_ARCH_DBC)
return 32;
+#elif defined(TARGET_ARCH_ARM) || defined(TARGET_ARCH_MIPS)
+ return 16;
+#else
+#error Unsupported architecture.
+#endif
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698