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

Unified Diff: runtime/vm/assembler_arm64_test.cc

Issue 269343010: Adds single-precision and SIMD load/store to arm64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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_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 35932)
+++ runtime/vm/assembler_arm64_test.cc (working copy)
@@ -808,7 +808,7 @@
__ LoadDImmediate(V0, 235.0, kNoPP);
__ LoadDImmediate(V1, 233.0, kNoPP);
- __ fcmpzd(V1);
+ __ fcmpdz(V1);
__ b(&l, GT);
__ LoadDImmediate(V0, 0.0, kNoPP);
__ ret();
@@ -1551,6 +1551,45 @@
}
+ASSEMBLER_TEST_GENERATE(FldrsFstrsPrePostIndex, assembler) {
+ __ LoadDImmediate(V1, 42.0, kNoPP);
+ __ fcvtsd(V2, V1);
+ __ fstrs(V2, Address(SP, -1*kWordSize, Address::PreIndex));
+ __ fldrs(V3, Address(SP, 1*kWordSize, Address::PostIndex));
+ __ fcvtds(V0, V3);
+ __ ret();
+}
+
+
+ASSEMBLER_TEST_RUN(FldrsFstrsPrePostIndex, test) {
+ typedef int (*SimpleCode)();
+ EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
+}
+
+
+ASSEMBLER_TEST_GENERATE(FldrqFstrqPrePostIndex, assembler) {
+ __ LoadDImmediate(V1, 21.0, kNoPP);
+ __ LoadDImmediate(V2, 21.0, kNoPP);
+ __ LoadImmediate(R1, 42, kNoPP);
+ __ Push(R1);
+ __ PushDouble(V1);
+ __ PushDouble(V2);
+ __ fldrq(V3, Address(SP, 2 * kWordSize, Address::PostIndex));
+ __ Pop(R0);
+ __ fstrq(V3, Address(SP, -2 * kWordSize, Address::PreIndex));
+ __ PopDouble(V0);
+ __ PopDouble(V1);
+ __ faddd(V0, V0, V1);
+ __ ret();
+}
+
+
+ASSEMBLER_TEST_RUN(FldrqFstrqPrePostIndex, test) {
+ typedef int (*SimpleCode)();
+ EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
+}
+
+
ASSEMBLER_TEST_GENERATE(Fcvtzds, assembler) {
__ LoadDImmediate(V0, 42.0, kNoPP);
__ fcvtzds(R0, V0);
« 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