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

Unified Diff: runtime/platform/globals.h

Issue 1156053006: - Determine whether the simulator is being used in globals.h (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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 | runtime/vm/cpu_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/platform/globals.h
diff --git a/runtime/platform/globals.h b/runtime/platform/globals.h
index 6837265c23de032b3977c366db6508b97a13e04f..3afd76a6a2febd6c67f57a781c6cc67d85153282 100644
--- a/runtime/platform/globals.h
+++ b/runtime/platform/globals.h
@@ -50,7 +50,7 @@
#include <winsock2.h>
#include <Rpc.h>
#include <shellapi.h>
-#endif
+#endif // defined(_WIN32)
#if !defined(_WIN32)
#include <arpa/inet.h>
@@ -89,6 +89,10 @@
#elif defined(__linux__) || defined(__FreeBSD__)
#define TARGET_OS_LINUX 1
#elif defined(__APPLE__)
+// Define the flavor of Mac OS we are running on.
+#include <TargetConditionals.h>
+// TODO(iposva): Rename TARGET_OS_MACOS to TARGET_OS_MAC to inherit
+// the value defined in TargetConditionals.h
#define TARGET_OS_MACOS 1
#elif defined(_WIN32)
#define TARGET_OS_WINDOWS 1
@@ -171,6 +175,8 @@ typedef simd128_value_t fpu_register_t;
#define HOST_ARCH_ARM 1
#define ARCH_IS_32_BIT 1
#define kFpuRegisterSize 16
+// Mark the fact that we have defined simd_value_t.
+#define SIMD_VALUE_T_
typedef struct {
union {
uint32_t u;
@@ -263,6 +269,30 @@ typedef simd128_value_t fpu_register_t;
#endif
#endif
+// Determine whether we will be using the simulator.
+#if defined(TARGET_ARCH_IA32)
+ // No simulator used.
+#elif defined(TARGET_ARCH_X64)
+ // No simulator used.
+#elif defined(TARGET_ARCH_ARM)
+#if !defined(HOST_ARCH_ARM) || TARGET_OS_IPHONE
srdjan 2015/05/29 16:58:56 || defined(TARGET_OS_IPHONE) ? (also below)
Ivan Posva 2015/05/29 17:25:36 Unfortunately the definition is always there, exce
+#define USING_SIMULATOR 1
+#endif
+
+#elif defined(TARGET_ARCH_ARM64)
+#if !defined(HOST_ARCH_ARM64) || TARGET_OS_IPHONE
+#define USING_SIMULATOR 1
+#endif
+
+#elif defined(TARGET_ARCH_MIPS)
+#if !defined(HOST_ARCH_MIPS) || TARGET_OS_IPHONE
+#define USING_SIMULATOR 1
+#endif
+
+#else
+#error Unknown architecture.
+#endif
+
// Short form printf format specifiers
#define Pd PRIdPTR
« no previous file with comments | « no previous file | runtime/vm/cpu_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698