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

Unified Diff: runtime/vm/assembler_arm64_test.cc

Issue 261783005: Begins work on arm64 floating point instructions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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_arm64.cc ('k') | runtime/vm/constants_arm64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_arm64_test.cc
===================================================================
--- runtime/vm/assembler_arm64_test.cc (revision 35658)
+++ runtime/vm/assembler_arm64_test.cc (working copy)
@@ -1316,6 +1316,60 @@
}
+// Floating point move immediate, to/from integer register.
+ASSEMBLER_TEST_GENERATE(Fmovdi, assembler) {
+ __ LoadDImmediate(V0, 1.0, kNoPP);
+ __ ret();
+}
+
+
+ASSEMBLER_TEST_RUN(Fmovdi, test) {
+ typedef int (*SimpleCode)();
+ EXPECT_EQ(1.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
+}
+
+
+ASSEMBLER_TEST_GENERATE(Fmovdi2, assembler) {
+ __ LoadDImmediate(V0, 123412983.1324524315, kNoPP);
+ __ ret();
+}
+
+
+ASSEMBLER_TEST_RUN(Fmovdi2, test) {
+ typedef int (*SimpleCode)();
+ EXPECT_FLOAT_EQ(123412983.1324524315,
+ EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()), 0.0001f);
+}
+
+
+ASSEMBLER_TEST_GENERATE(Fmovrd, assembler) {
+ __ LoadDImmediate(V1, 1.0, kNoPP);
+ __ fmovrd(R0, V1);
+ __ ret();
+}
+
+
+ASSEMBLER_TEST_RUN(Fmovrd, test) {
+ typedef int (*SimpleCode)();
+ const int64_t one = bit_cast<int64_t, double>(1.0);
+ EXPECT_EQ(one, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
+}
+
+
+ASSEMBLER_TEST_GENERATE(Fmovdr, assembler) {
+ __ LoadDImmediate(V1, 1.0, kNoPP);
+ __ fmovrd(R1, V1);
+ __ fmovdr(V0, R1);
+ __ ret();
+}
+
+
+ASSEMBLER_TEST_RUN(Fmovdr, test) {
+ typedef int (*SimpleCode)();
+ EXPECT_EQ(1.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
+}
+
+
// Called from assembler_test.cc.
// LR: return address.
// R0: context.
« no previous file with comments | « runtime/vm/assembler_arm64.cc ('k') | runtime/vm/constants_arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698