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

Unified Diff: runtime/vm/unit_test.h

Issue 1927203002: Start to add assembler tests for DBC (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Add -NonSmi tests Created 4 years, 8 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/assembler_dbc_test.cc ('k') | runtime/vm/vm_sources.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/unit_test.h
diff --git a/runtime/vm/unit_test.h b/runtime/vm/unit_test.h
index f170ffc983d3838078c4c06ddcee42cea950fa3c..cbf4a06e32047e63536252d3264281aed7036b4a 100644
--- a/runtime/vm/unit_test.h
+++ b/runtime/vm/unit_test.h
@@ -201,7 +201,7 @@
bit_cast<int32_t, uword>(entry), \
bit_cast<int32_t, intptr_t>(pointer_arg), \
0, 0, 0))
-#endif
+#endif // defined(ARCH_IS_64_BIT)
#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), \
@@ -224,7 +224,21 @@
Utils::High32Bits(bit_cast<int64_t, double>(double_arg)), \
0, 0, false, true))
#endif // defined(HOST_ARCH_ARM) || defined(HOST_ARCH_MIPS)
-#endif // defined(TARGET_ARCH_ARM) || defined(TARGET_ARCH_MIPS)
+#else
+// For DBC Assembler tests.
+#define EXECUTE_TEST_CODE_INTPTR(code) \
+ Smi::Value(Smi::RawCast(Simulator::Current()->Call( \
+ code, \
+ Array::Handle(ArgumentsDescriptor::New(0)), \
+ Array::Handle(Array::New(0)), \
+ Thread::Current())))
+#define EXECUTE_TEST_CODE_BOOL(code) \
+ (Bool::RawCast(Simulator::Current()->Call( \
+ code, \
+ Array::Handle(ArgumentsDescriptor::New(0)), \
+ Array::Handle(Array::New(0)), \
+ Thread::Current())) == Bool::True().raw())
+#endif // defined(TARGET_ARCH_{ARM, ARM64, MIPS})
inline Dart_Handle NewString(const char* str) {
« no previous file with comments | « runtime/vm/assembler_dbc_test.cc ('k') | runtime/vm/vm_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698