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

Side by Side Diff: test/cctest/test-disasm-arm.cc

Issue 2546933002: [Turbofan] Add ARM NEON instructions for implementing SIMD. (Closed)
Patch Set: Fourth review comments. Created 4 years 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 unified diff | Download patch
« no previous file with comments | « test/cctest/test-assembler-arm.cc ('k') | test/cctest/test-macro-assembler-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 if (CpuFeatures::IsSupported(NEON)) { 929 if (CpuFeatures::IsSupported(NEON)) {
930 CpuFeatureScope scope(&assm, NEON); 930 CpuFeatureScope scope(&assm, NEON);
931 COMPARE(vld1(Neon8, NeonListOperand(d4, 4), NeonMemOperand(r1)), 931 COMPARE(vld1(Neon8, NeonListOperand(d4, 4), NeonMemOperand(r1)),
932 "f421420f vld1.8 {d4, d5, d6, d7}, [r1]"); 932 "f421420f vld1.8 {d4, d5, d6, d7}, [r1]");
933 COMPARE(vst1(Neon16, NeonListOperand(d17, 4), NeonMemOperand(r9)), 933 COMPARE(vst1(Neon16, NeonListOperand(d17, 4), NeonMemOperand(r9)),
934 "f449124f vst1.16 {d17, d18, d19, d20}, [r9]"); 934 "f449124f vst1.16 {d17, d18, d19, d20}, [r9]");
935 COMPARE(vmovl(NeonU8, q3, d1), 935 COMPARE(vmovl(NeonU8, q3, d1),
936 "f3886a11 vmovl.u8 q3, d1"); 936 "f3886a11 vmovl.u8 q3, d1");
937 COMPARE(vmovl(NeonU8, q4, d2), 937 COMPARE(vmovl(NeonU8, q4, d2),
938 "f3888a12 vmovl.u8 q4, d2"); 938 "f3888a12 vmovl.u8 q4, d2");
939
940 COMPARE(vmov(NeonS8, d0, 0, r0), "ee400b10 vmov.8 d0[0], r0");
941 COMPARE(vmov(NeonU8, d1, 1, r1), "ee411b30 vmov.8 d1[1], r1");
942 COMPARE(vmov(NeonS8, d2, 2, r2), "ee422b50 vmov.8 d2[2], r2");
943 COMPARE(vmov(NeonU8, d3, 3, r8), "ee438b70 vmov.8 d3[3], r8");
944 COMPARE(vmov(NeonS8, d4, 4, r0), "ee640b10 vmov.8 d4[4], r0");
945 COMPARE(vmov(NeonU8, d5, 5, r1), "ee651b30 vmov.8 d5[5], r1");
946 COMPARE(vmov(NeonS8, d6, 6, r2), "ee662b50 vmov.8 d6[6], r2");
947 COMPARE(vmov(NeonU8, d7, 7, r8), "ee678b70 vmov.8 d7[7], r8");
948 COMPARE(vmov(NeonS16, d0, 0, r0), "ee000b30 vmov.16 d0[0], r0");
949 COMPARE(vmov(NeonS16, d1, 1, r1), "ee011b70 vmov.16 d1[1], r1");
950 COMPARE(vmov(NeonS16, d2, 2, r2), "ee222b30 vmov.16 d2[2], r2");
951 COMPARE(vmov(NeonS16, d3, 3, r7), "ee237b70 vmov.16 d3[3], r7");
952 COMPARE(vmov(NeonS32, d0, 0, r0), "ee000b10 vmov.32 d0[0], r0");
953 COMPARE(vmov(NeonU32, d0, 1, r0), "ee200b10 vmov.32 d0[1], r0");
954
955 COMPARE(vmov(NeonS8, r0, d0, 0), "ee500b10 vmov.s8 r0, d0[0]");
956 COMPARE(vmov(NeonU8, r1, d1, 1), "eed11b30 vmov.u8 r1, d1[1]");
957 COMPARE(vmov(NeonS8, r2, d2, 2), "ee522b50 vmov.s8 r2, d2[2]");
958 COMPARE(vmov(NeonU8, r8, d3, 3), "eed38b70 vmov.u8 r8, d3[3]");
959 COMPARE(vmov(NeonS8, r0, d4, 4), "ee740b10 vmov.s8 r0, d4[4]");
960 COMPARE(vmov(NeonU8, r1, d5, 5), "eef51b30 vmov.u8 r1, d5[5]");
961 COMPARE(vmov(NeonS8, r2, d6, 6), "ee762b50 vmov.s8 r2, d6[6]");
962 COMPARE(vmov(NeonU8, r8, d7, 7), "eef78b70 vmov.u8 r8, d7[7]");
963 COMPARE(vmov(NeonS16, r0, d0, 0), "ee100b30 vmov.s16 r0, d0[0]");
964 COMPARE(vmov(NeonU16, r1, d1, 1), "ee911b70 vmov.u16 r1, d1[1]");
965 COMPARE(vmov(NeonS16, r2, d2, 2), "ee322b30 vmov.s16 r2, d2[2]");
966 COMPARE(vmov(NeonU16, r7, d3, 3), "eeb37b70 vmov.u16 r7, d3[3]");
967 COMPARE(vmov(NeonS32, r2, d15, 0), "ee1f2b10 vmov.32 r2, d15[0]");
968 COMPARE(vmov(NeonS32, r3, d14, 1), "ee3e3b10 vmov.32 r3, d14[1]");
969
939 COMPARE(vmov(q0, q15), 970 COMPARE(vmov(q0, q15),
940 "f22e01fe vmov q0, q15"); 971 "f22e01fe vmov q0, q15");
941 COMPARE(vmov(q8, q9), 972 COMPARE(vmov(q8, q9),
942 "f26201f2 vmov q8, q9"); 973 "f26201f2 vmov q8, q9");
974 COMPARE(vmvn(q0, q15),
975 "f3b005ee vmvn q0, q15");
976 COMPARE(vmvn(q8, q9),
977 "f3f005e2 vmvn q8, q9");
943 COMPARE(vswp(d0, d31), 978 COMPARE(vswp(d0, d31),
944 "f3b2002f vswp d0, d31"); 979 "f3b2002f vswp d0, d31");
945 COMPARE(vswp(d16, d14), 980 COMPARE(vswp(d16, d14),
946 "f3f2000e vswp d16, d14"); 981 "f3f2000e vswp d16, d14");
947 COMPARE(vswp(q0, q15), 982 COMPARE(vswp(q0, q15),
948 "f3b2006e vswp q0, q15"); 983 "f3b2006e vswp q0, q15");
949 COMPARE(vswp(q8, q9), 984 COMPARE(vswp(q8, q9),
950 "f3f20062 vswp q8, q9"); 985 "f3f20062 vswp q8, q9");
986 COMPARE(vdup(Neon8, q0, r0),
987 "eee00b10 vdup.8 q0, r0");
988 COMPARE(vdup(Neon16, q1, r4),
989 "eea24b30 vdup.16 q1, r4");
990 COMPARE(vdup(Neon32, q15, r1),
991 "eeae1b90 vdup.32 q15, r1");
992 COMPARE(vdup(q0, s3),
993 "f3bc0c41 vdup q0, d1[1]");
994 COMPARE(vdup(q15, s2),
995 "f3f4ec41 vdup q15, d1[0]");
996 COMPARE(vcvt_f32_s32(q15, q1),
997 "f3fbe642 vcvt.f32.s32 q15, q1");
998 COMPARE(vcvt_f32_u32(q8, q9),
999 "f3fb06e2 vcvt.f32.u32 q8, q9");
1000 COMPARE(vcvt_s32_f32(q15, q1),
1001 "f3fbe742 vcvt.s32.f32 q15, q1");
1002 COMPARE(vcvt_u32_f32(q8, q9),
1003 "f3fb07e2 vcvt.u32.f32 q8, q9");
951 COMPARE(veor(d0, d1, d2), 1004 COMPARE(veor(d0, d1, d2),
952 "f3010112 veor d0, d1, d2"); 1005 "f3010112 veor d0, d1, d2");
953 COMPARE(veor(d0, d30, d31), 1006 COMPARE(veor(d0, d30, d31),
954 "f30e01bf veor d0, d30, d31"); 1007 "f30e01bf veor d0, d30, d31");
955 COMPARE(veor(q0, q1, q2), 1008 COMPARE(veor(q0, q1, q2),
956 "f3020154 veor q0, q1, q2"); 1009 "f3020154 veor q0, q1, q2");
957 COMPARE(veor(q15, q0, q8), 1010 COMPARE(veor(q15, q0, q8),
958 "f340e170 veor q15, q0, q8"); 1011 "f340e170 veor q15, q0, q8");
1012 COMPARE(vadd(q15, q0, q8),
1013 "f240ed60 vadd.f32 q15, q0, q8");
1014 COMPARE(vadd(Neon8, q0, q1, q2),
1015 "f2020844 vadd.i8 q0, q1, q2");
1016 COMPARE(vadd(Neon16, q1, q2, q8),
1017 "f2142860 vadd.i16 q1, q2, q8");
1018 COMPARE(vadd(Neon32, q15, q0, q8),
1019 "f260e860 vadd.i32 q15, q0, q8");
1020 COMPARE(vsub(q15, q0, q8),
1021 "f260ed60 vsub.f32 q15, q0, q8");
1022 COMPARE(vsub(Neon8, q0, q1, q2),
1023 "f3020844 vsub.i8 q0, q1, q2");
1024 COMPARE(vsub(Neon16, q1, q2, q8),
1025 "f3142860 vsub.i16 q1, q2, q8");
1026 COMPARE(vsub(Neon32, q15, q0, q8),
1027 "f360e860 vsub.i32 q15, q0, q8");
1028 COMPARE(vtst(Neon8, q0, q1, q2),
1029 "f2020854 vtst.i8 q0, q1, q2");
1030 COMPARE(vtst(Neon16, q1, q2, q8),
1031 "f2142870 vtst.i16 q1, q2, q8");
1032 COMPARE(vtst(Neon32, q15, q0, q8),
1033 "f260e870 vtst.i32 q15, q0, q8");
1034 COMPARE(vceq(Neon8, q0, q1, q2),
1035 "f3020854 vceq.i8 q0, q1, q2");
1036 COMPARE(vceq(Neon16, q1, q2, q8),
1037 "f3142870 vceq.i16 q1, q2, q8");
1038 COMPARE(vceq(Neon32, q15, q0, q8),
1039 "f360e870 vceq.i32 q15, q0, q8");
1040 COMPARE(vbsl(q0, q1, q2),
1041 "f3120154 vbsl q0, q1, q2");
1042 COMPARE(vbsl(q15, q0, q8),
1043 "f350e170 vbsl q15, q0, q8");
1044 COMPARE(vtbl(d0, NeonListOperand(d1, 1), d2),
1045 "f3b10802 vtbl.8 d0, {d1}, d2");
1046 COMPARE(vtbl(d31, NeonListOperand(d0, 2), d4),
1047 "f3f0f904 vtbl.8 d31, {d0, d1}, d4");
1048 COMPARE(vtbl(d15, NeonListOperand(d1, 3), d5),
1049 "f3b1fa05 vtbl.8 d15, {d1, d2, d3}, d5");
1050 COMPARE(vtbl(d15, NeonListOperand(d1, 4), d5),
1051 "f3b1fb05 vtbl.8 d15, {d1, d2, d3, d4}, d5");
1052 COMPARE(vtbx(d0, NeonListOperand(d1, 1), d2),
1053 "f3b10842 vtbx.8 d0, {d1}, d2");
1054 COMPARE(vtbx(d31, NeonListOperand(d0, 2), d4),
1055 "f3f0f944 vtbx.8 d31, {d0, d1}, d4");
1056 COMPARE(vtbx(d15, NeonListOperand(d1, 3), d5),
1057 "f3b1fa45 vtbx.8 d15, {d1, d2, d3}, d5");
1058 COMPARE(vtbx(d15, NeonListOperand(d1, 4), d5),
1059 "f3b1fb45 vtbx.8 d15, {d1, d2, d3, d4}, d5");
959 } 1060 }
960 1061
961 VERIFY_RUN(); 1062 VERIFY_RUN();
962 } 1063 }
963 1064
964 1065
965 TEST(LoadStore) { 1066 TEST(LoadStore) {
966 SET_UP(); 1067 SET_UP();
967 1068
968 COMPARE(ldrb(r0, MemOperand(r1)), 1069 COMPARE(ldrb(r0, MemOperand(r1)),
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
1239 1340
1240 COMPARE(ldrexb(r0, r1), "e1d10f9f ldrexb r0, [r1]"); 1341 COMPARE(ldrexb(r0, r1), "e1d10f9f ldrexb r0, [r1]");
1241 COMPARE(strexb(r0, r1, r2), "e1c20f91 strexb r0, r1, [r2]"); 1342 COMPARE(strexb(r0, r1, r2), "e1c20f91 strexb r0, r1, [r2]");
1242 COMPARE(ldrexh(r0, r1), "e1f10f9f ldrexh r0, [r1]"); 1343 COMPARE(ldrexh(r0, r1), "e1f10f9f ldrexh r0, [r1]");
1243 COMPARE(strexh(r0, r1, r2), "e1e20f91 strexh r0, r1, [r2]"); 1344 COMPARE(strexh(r0, r1, r2), "e1e20f91 strexh r0, r1, [r2]");
1244 COMPARE(ldrex(r0, r1), "e1910f9f ldrex r0, [r1]"); 1345 COMPARE(ldrex(r0, r1), "e1910f9f ldrex r0, [r1]");
1245 COMPARE(strex(r0, r1, r2), "e1820f91 strex r0, r1, [r2]"); 1346 COMPARE(strex(r0, r1, r2), "e1820f91 strex r0, r1, [r2]");
1246 1347
1247 VERIFY_RUN(); 1348 VERIFY_RUN();
1248 } 1349 }
OLDNEW
« no previous file with comments | « test/cctest/test-assembler-arm.cc ('k') | test/cctest/test-macro-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698