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

Unified Diff: runtime/vm/assembler_x64_test.cc

Issue 8758012: Port object tests to x64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/assembler_x64.cc ('k') | runtime/vm/constants_x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_x64_test.cc
===================================================================
--- runtime/vm/assembler_x64_test.cc (revision 1958)
+++ runtime/vm/assembler_x64_test.cc (working copy)
@@ -1012,6 +1012,31 @@
EXPECT_FLOAT_EQ(14.7, res, 0.001);
}
+
+ASSEMBLER_TEST_GENERATE(TestObjectCompare, assembler) {
+ ObjectStore* object_store = Isolate::Current()->object_store();
+ const Object& obj = Object::ZoneHandle(object_store->smi_class());
+ Label fail;
+ __ LoadObject(RAX, obj);
+ __ CompareObject(RAX, obj);
+ __ j(NOT_EQUAL, &fail);
+ __ LoadObject(RCX, obj);
+ __ CompareObject(RCX, obj);
+ __ j(NOT_EQUAL, &fail);
+ __ movl(RAX, Immediate(1)); // OK
+ __ ret();
+ __ Bind(&fail);
+ __ movl(RAX, Immediate(0)); // Fail.
+ __ ret();
+}
+
+
+ASSEMBLER_TEST_RUN(TestObjectCompare, entry) {
+ typedef bool (*TestObjectCompare)();
+ bool res = reinterpret_cast<TestObjectCompare>(entry)();
+ EXPECT_EQ(true, res);
+}
+
} // namespace dart
#endif // defined TARGET_ARCH_X64
« no previous file with comments | « runtime/vm/assembler_x64.cc ('k') | runtime/vm/constants_x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698