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

Unified Diff: runtime/vm/assembler_x64_test.cc

Issue 10440099: Adding unary op optimizations. missing assembly operations/ (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | « runtime/vm/assembler_x64.cc ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('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 8171)
+++ runtime/vm/assembler_x64_test.cc (working copy)
@@ -1234,6 +1234,34 @@
}
+ASSEMBLER_TEST_GENERATE(TestNot, assembler) {
+ __ movq(RAX, Immediate(0xFFFFFFFF00000000));
+ __ notq(RAX);
+ __ ret();
+}
+
+
+ASSEMBLER_TEST_RUN(TestNot, entry) {
+ typedef int (*TestNot)();
+ unsigned int res = reinterpret_cast<TestNot>(entry)();
+ EXPECT_EQ(0xFFFFFFFF, res);
+}
+
+
+ASSEMBLER_TEST_GENERATE(XorpdZeroing, assembler) {
+ __ movsd(XMM0, Address(RSP, kWordSize));
+ __ xorpd(XMM0, Address(RSP, kWordSize));
+ __ movq(RAX, Immediate(999));
+ __ ret();
+}
+
+
+ASSEMBLER_TEST_RUN(XorpdZeroing, entry) {
+ typedef double (*XorpdZeroingCode)(double d);
+ double res = reinterpret_cast<XorpdZeroingCode>(entry)(12.56e3);
+ EXPECT_FLOAT_EQ(0.0, res, 0.0001);
+}
+
} // namespace dart
#endif // defined TARGET_ARCH_X64
« no previous file with comments | « runtime/vm/assembler_x64.cc ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698