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

Unified Diff: runtime/vm/unit_test.h

Issue 221133002: Begins work on ARM64, first assembler test. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: adds files Created 6 years, 9 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 | « runtime/vm/stub_code_arm64_test.cc ('k') | runtime/vm/unit_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/unit_test.h
===================================================================
--- runtime/vm/unit_test.h (revision 34648)
+++ runtime/vm/unit_test.h (working copy)
@@ -7,6 +7,8 @@
#include "include/dart_api.h"
+#include "platform/globals.h"
+
#include "vm/ast.h"
#include "vm/dart.h"
#include "vm/globals.h"
@@ -130,8 +132,12 @@
}
-#if defined(TARGET_ARCH_ARM) || defined(TARGET_ARCH_MIPS)
-#if defined(HOST_ARCH_ARM) || defined(HOST_ARCH_MIPS)
+#if defined(TARGET_ARCH_ARM) || \
+ defined(TARGET_ARCH_MIPS) || \
+ defined(TARGET_ARCH_ARM64)
+#if defined(HOST_ARCH_ARM) || \
+ defined(HOST_ARCH_MIPS) || \
+ defined(HOST_ARCH_ARM64)
// Running on actual ARM or MIPS hardware, execute code natively.
#define EXECUTE_TEST_CODE_INT32(name, entry) reinterpret_cast<name>(entry)()
#define EXECUTE_TEST_CODE_INT64_LL(name, entry, long_arg0, long_arg1) \
@@ -144,9 +150,16 @@
reinterpret_cast<name>(entry)(double_arg)
#else
// Not running on ARM or MIPS hardware, call simulator to execute code.
+#if defined(ARCH_IS_64_BIT)
+// TODO(zra): Supply more macros for 64-bit as tests are added for ARM64.
#define EXECUTE_TEST_CODE_INT32(name, entry) \
static_cast<int32_t>(Simulator::Current()->Call( \
+ bit_cast<int64_t, uword>(entry), 0, 0, 0, 0))
+#else
+#define EXECUTE_TEST_CODE_INT32(name, entry) \
+ static_cast<int32_t>(Simulator::Current()->Call( \
bit_cast<int32_t, uword>(entry), 0, 0, 0, 0))
+#endif
#define EXECUTE_TEST_CODE_INT64_LL(name, entry, long_arg0, long_arg1) \
static_cast<int64_t>(Simulator::Current()->Call( \
bit_cast<int32_t, uword>(entry), \
« no previous file with comments | « runtime/vm/stub_code_arm64_test.cc ('k') | runtime/vm/unit_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698