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

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

Issue 2812573003: Reland "ARM64: Add NEON support" (Closed)
Patch Set: Add trace directory to gitignore Created 3 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 unified diff | Download patch
« no previous file with comments | « test/cctest/test-assembler-arm64.cc ('k') | test/cctest/test-simulator-neon-arm64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 COMPARE(strh(w3, MemOperand(x4, 255)), "sturh w3, [x4, #255]"); 1048 COMPARE(strh(w3, MemOperand(x4, 255)), "sturh w3, [x4, #255]");
1049 COMPARE(strh(x5, MemOperand(x6, -256)), "sturh w5, [x6, #-256]"); 1049 COMPARE(strh(x5, MemOperand(x6, -256)), "sturh w5, [x6, #-256]");
1050 COMPARE(ldrsh(w0, MemOperand(x1)), "ldrsh w0, [x1]"); 1050 COMPARE(ldrsh(w0, MemOperand(x1)), "ldrsh w0, [x1]");
1051 COMPARE(ldrsh(w2, MemOperand(x3, 8)), "ldrsh w2, [x3, #8]"); 1051 COMPARE(ldrsh(w2, MemOperand(x3, 8)), "ldrsh w2, [x3, #8]");
1052 COMPARE(ldrsh(w4, MemOperand(x5, 42, PreIndex)), "ldrsh w4, [x5, #42]!"); 1052 COMPARE(ldrsh(w4, MemOperand(x5, 42, PreIndex)), "ldrsh w4, [x5, #42]!");
1053 COMPARE(ldrsh(x6, MemOperand(x7, -11, PostIndex)), "ldrsh x6, [x7], #-11"); 1053 COMPARE(ldrsh(x6, MemOperand(x7, -11, PostIndex)), "ldrsh x6, [x7], #-11");
1054 1054
1055 CLEANUP(); 1055 CLEANUP();
1056 } 1056 }
1057 1057
1058 1058 TEST(load_store_v_offset) {
1059 TEST_(load_store_fp) {
1060 SET_UP_ASM(); 1059 SET_UP_ASM();
1061 1060
1062 COMPARE(ldr(s0, MemOperand(x1)), "ldr s0, [x1]"); 1061 COMPARE(ldr(s0, MemOperand(x1)), "ldr s0, [x1]");
1063 COMPARE(ldr(s2, MemOperand(x3, 4)), "ldr s2, [x3, #4]"); 1062 COMPARE(ldr(s2, MemOperand(x3, 4)), "ldr s2, [x3, #4]");
1064 COMPARE(ldr(s4, MemOperand(x5, 16380)), "ldr s4, [x5, #16380]"); 1063 COMPARE(ldr(s4, MemOperand(x5, 16380)), "ldr s4, [x5, #16380]");
1065 COMPARE(ldr(d6, MemOperand(x7)), "ldr d6, [x7]"); 1064 COMPARE(ldr(d6, MemOperand(x7)), "ldr d6, [x7]");
1066 COMPARE(ldr(d8, MemOperand(x9, 8)), "ldr d8, [x9, #8]"); 1065 COMPARE(ldr(d8, MemOperand(x9, 8)), "ldr d8, [x9, #8]");
1067 COMPARE(ldr(d10, MemOperand(x11, 32760)), "ldr d10, [x11, #32760]"); 1066 COMPARE(ldr(d10, MemOperand(x11, 32760)), "ldr d10, [x11, #32760]");
1068 COMPARE(str(s12, MemOperand(x13)), "str s12, [x13]"); 1067 COMPARE(str(s12, MemOperand(x13)), "str s12, [x13]");
1069 COMPARE(str(s14, MemOperand(x15, 4)), "str s14, [x15, #4]"); 1068 COMPARE(str(s14, MemOperand(x15, 4)), "str s14, [x15, #4]");
1070 COMPARE(str(s16, MemOperand(x17, 16380)), "str s16, [x17, #16380]"); 1069 COMPARE(str(s16, MemOperand(x17, 16380)), "str s16, [x17, #16380]");
1071 COMPARE(str(d18, MemOperand(x19)), "str d18, [x19]"); 1070 COMPARE(str(d18, MemOperand(x19)), "str d18, [x19]");
1072 COMPARE(str(d20, MemOperand(x21, 8)), "str d20, [x21, #8]"); 1071 COMPARE(str(d20, MemOperand(x21, 8)), "str d20, [x21, #8]");
1073 COMPARE(str(d22, MemOperand(x23, 32760)), "str d22, [x23, #32760]"); 1072 COMPARE(str(d22, MemOperand(x23, 32760)), "str d22, [x23, #32760]");
1074 1073
1074 COMPARE(ldr(b0, MemOperand(x1)), "ldr b0, [x1]");
1075 COMPARE(ldr(b2, MemOperand(x3, 1)), "ldr b2, [x3, #1]");
1076 COMPARE(ldr(b4, MemOperand(x5, 4095)), "ldr b4, [x5, #4095]");
1077 COMPARE(ldr(h6, MemOperand(x7)), "ldr h6, [x7]");
1078 COMPARE(ldr(h8, MemOperand(x9, 2)), "ldr h8, [x9, #2]");
1079 COMPARE(ldr(h10, MemOperand(x11, 8190)), "ldr h10, [x11, #8190]");
1080 COMPARE(ldr(q12, MemOperand(x13)), "ldr q12, [x13]");
1081 COMPARE(ldr(q14, MemOperand(x15, 16)), "ldr q14, [x15, #16]");
1082 COMPARE(ldr(q16, MemOperand(x17, 65520)), "ldr q16, [x17, #65520]");
1083 COMPARE(str(b18, MemOperand(x19)), "str b18, [x19]");
1084 COMPARE(str(b20, MemOperand(x21, 1)), "str b20, [x21, #1]");
1085 COMPARE(str(b22, MemOperand(x23, 4095)), "str b22, [x23, #4095]");
1086 COMPARE(str(h24, MemOperand(x25)), "str h24, [x25]");
1087 COMPARE(str(h26, MemOperand(x27, 2)), "str h26, [cp, #2]");
1088 COMPARE(str(h28, MemOperand(x29, 8190)), "str h28, [fp, #8190]");
1089 COMPARE(str(q30, MemOperand(x30)), "str q30, [lr]");
1090 COMPARE(str(q31, MemOperand(x1, 16)), "str q31, [x1, #16]");
1091 COMPARE(str(q0, MemOperand(x3, 65520)), "str q0, [x3, #65520]");
1092
1093 COMPARE(ldr(s24, MemOperand(csp)), "ldr s24, [csp]");
1094 COMPARE(ldr(d25, MemOperand(csp, 8)), "ldr d25, [csp, #8]");
1095 COMPARE(ldr(b26, MemOperand(csp, 1)), "ldr b26, [csp, #1]");
1096 COMPARE(ldr(h27, MemOperand(csp, 2)), "ldr h27, [csp, #2]");
1097 COMPARE(ldr(q28, MemOperand(csp, 16)), "ldr q28, [csp, #16]");
1098
1099 CLEANUP();
1100 }
1101
1102 TEST(load_store_v_pre) {
1103 SET_UP_ASM();
1104
1075 COMPARE(ldr(s0, MemOperand(x1, 4, PreIndex)), "ldr s0, [x1, #4]!"); 1105 COMPARE(ldr(s0, MemOperand(x1, 4, PreIndex)), "ldr s0, [x1, #4]!");
1076 COMPARE(ldr(s2, MemOperand(x3, 255, PreIndex)), "ldr s2, [x3, #255]!"); 1106 COMPARE(ldr(s2, MemOperand(x3, 255, PreIndex)), "ldr s2, [x3, #255]!");
1077 COMPARE(ldr(s4, MemOperand(x5, -256, PreIndex)), "ldr s4, [x5, #-256]!"); 1107 COMPARE(ldr(s4, MemOperand(x5, -256, PreIndex)), "ldr s4, [x5, #-256]!");
1078 COMPARE(ldr(d6, MemOperand(x7, 8, PreIndex)), "ldr d6, [x7, #8]!"); 1108 COMPARE(ldr(d6, MemOperand(x7, 8, PreIndex)), "ldr d6, [x7, #8]!");
1079 COMPARE(ldr(d8, MemOperand(x9, 255, PreIndex)), "ldr d8, [x9, #255]!"); 1109 COMPARE(ldr(d8, MemOperand(x9, 255, PreIndex)), "ldr d8, [x9, #255]!");
1080 COMPARE(ldr(d10, MemOperand(x11, -256, PreIndex)), "ldr d10, [x11, #-256]!"); 1110 COMPARE(ldr(d10, MemOperand(x11, -256, PreIndex)), "ldr d10, [x11, #-256]!");
1111
1081 COMPARE(str(s12, MemOperand(x13, 4, PreIndex)), "str s12, [x13, #4]!"); 1112 COMPARE(str(s12, MemOperand(x13, 4, PreIndex)), "str s12, [x13, #4]!");
1082 COMPARE(str(s14, MemOperand(x15, 255, PreIndex)), "str s14, [x15, #255]!"); 1113 COMPARE(str(s14, MemOperand(x15, 255, PreIndex)), "str s14, [x15, #255]!");
1083 COMPARE(str(s16, MemOperand(x17, -256, PreIndex)), "str s16, [x17, #-256]!"); 1114 COMPARE(str(s16, MemOperand(x17, -256, PreIndex)), "str s16, [x17, #-256]!");
1084 COMPARE(str(d18, MemOperand(x19, 8, PreIndex)), "str d18, [x19, #8]!"); 1115 COMPARE(str(d18, MemOperand(x19, 8, PreIndex)), "str d18, [x19, #8]!");
1085 COMPARE(str(d20, MemOperand(x21, 255, PreIndex)), "str d20, [x21, #255]!"); 1116 COMPARE(str(d20, MemOperand(x21, 255, PreIndex)), "str d20, [x21, #255]!");
1086 COMPARE(str(d22, MemOperand(x23, -256, PreIndex)), "str d22, [x23, #-256]!"); 1117 COMPARE(str(d22, MemOperand(x23, -256, PreIndex)), "str d22, [x23, #-256]!");
1087 1118
1119 COMPARE(ldr(b0, MemOperand(x1, 1, PreIndex)), "ldr b0, [x1, #1]!");
1120 COMPARE(ldr(b2, MemOperand(x3, 255, PreIndex)), "ldr b2, [x3, #255]!");
1121 COMPARE(ldr(b4, MemOperand(x5, -256, PreIndex)), "ldr b4, [x5, #-256]!");
1122 COMPARE(ldr(h6, MemOperand(x7, 2, PreIndex)), "ldr h6, [x7, #2]!");
1123 COMPARE(ldr(h8, MemOperand(x9, 255, PreIndex)), "ldr h8, [x9, #255]!");
1124 COMPARE(ldr(h10, MemOperand(x11, -256, PreIndex)), "ldr h10, [x11, #-256]!");
1125 COMPARE(ldr(q12, MemOperand(x13, 16, PreIndex)), "ldr q12, [x13, #16]!");
1126 COMPARE(ldr(q14, MemOperand(x15, 255, PreIndex)), "ldr q14, [x15, #255]!");
1127 COMPARE(ldr(q16, MemOperand(x17, -256, PreIndex)), "ldr q16, [x17, #-256]!");
1128
1129 COMPARE(str(b18, MemOperand(x19, 1, PreIndex)), "str b18, [x19, #1]!");
1130 COMPARE(str(b20, MemOperand(x21, 255, PreIndex)), "str b20, [x21, #255]!");
1131 COMPARE(str(b22, MemOperand(x23, -256, PreIndex)), "str b22, [x23, #-256]!");
1132 COMPARE(str(h24, MemOperand(x25, 2, PreIndex)), "str h24, [x25, #2]!");
1133 COMPARE(str(h26, MemOperand(x27, 255, PreIndex)), "str h26, [cp, #255]!");
1134 COMPARE(str(h28, MemOperand(x29, -256, PreIndex)), "str h28, [fp, #-256]!");
1135 COMPARE(str(q30, MemOperand(x1, 16, PreIndex)), "str q30, [x1, #16]!");
1136 COMPARE(str(q31, MemOperand(x3, 255, PreIndex)), "str q31, [x3, #255]!");
1137 COMPARE(str(q0, MemOperand(x5, -256, PreIndex)), "str q0, [x5, #-256]!");
1138
1139 COMPARE(str(b24, MemOperand(csp, 1, PreIndex)), "str b24, [csp, #1]!");
1140 COMPARE(str(h25, MemOperand(csp, -2, PreIndex)), "str h25, [csp, #-2]!");
1141 COMPARE(str(s26, MemOperand(csp, 4, PreIndex)), "str s26, [csp, #4]!");
1142 COMPARE(str(d27, MemOperand(csp, -8, PreIndex)), "str d27, [csp, #-8]!");
1143 COMPARE(str(q28, MemOperand(csp, 16, PreIndex)), "str q28, [csp, #16]!");
1144
1145 CLEANUP();
1146 }
1147
1148 TEST(load_store_v_post) {
1149 SET_UP_ASM();
1150
1088 COMPARE(ldr(s0, MemOperand(x1, 4, PostIndex)), "ldr s0, [x1], #4"); 1151 COMPARE(ldr(s0, MemOperand(x1, 4, PostIndex)), "ldr s0, [x1], #4");
1089 COMPARE(ldr(s2, MemOperand(x3, 255, PostIndex)), "ldr s2, [x3], #255"); 1152 COMPARE(ldr(s2, MemOperand(x3, 255, PostIndex)), "ldr s2, [x3], #255");
1090 COMPARE(ldr(s4, MemOperand(x5, -256, PostIndex)), "ldr s4, [x5], #-256"); 1153 COMPARE(ldr(s4, MemOperand(x5, -256, PostIndex)), "ldr s4, [x5], #-256");
1091 COMPARE(ldr(d6, MemOperand(x7, 8, PostIndex)), "ldr d6, [x7], #8"); 1154 COMPARE(ldr(d6, MemOperand(x7, 8, PostIndex)), "ldr d6, [x7], #8");
1092 COMPARE(ldr(d8, MemOperand(x9, 255, PostIndex)), "ldr d8, [x9], #255"); 1155 COMPARE(ldr(d8, MemOperand(x9, 255, PostIndex)), "ldr d8, [x9], #255");
1093 COMPARE(ldr(d10, MemOperand(x11, -256, PostIndex)), "ldr d10, [x11], #-256"); 1156 COMPARE(ldr(d10, MemOperand(x11, -256, PostIndex)), "ldr d10, [x11], #-256");
1157
1094 COMPARE(str(s12, MemOperand(x13, 4, PostIndex)), "str s12, [x13], #4"); 1158 COMPARE(str(s12, MemOperand(x13, 4, PostIndex)), "str s12, [x13], #4");
1095 COMPARE(str(s14, MemOperand(x15, 255, PostIndex)), "str s14, [x15], #255"); 1159 COMPARE(str(s14, MemOperand(x15, 255, PostIndex)), "str s14, [x15], #255");
1096 COMPARE(str(s16, MemOperand(x17, -256, PostIndex)), "str s16, [x17], #-256"); 1160 COMPARE(str(s16, MemOperand(x17, -256, PostIndex)), "str s16, [x17], #-256");
1097 COMPARE(str(d18, MemOperand(x19, 8, PostIndex)), "str d18, [x19], #8"); 1161 COMPARE(str(d18, MemOperand(x19, 8, PostIndex)), "str d18, [x19], #8");
1098 COMPARE(str(d20, MemOperand(x21, 255, PostIndex)), "str d20, [x21], #255"); 1162 COMPARE(str(d20, MemOperand(x21, 255, PostIndex)), "str d20, [x21], #255");
1099 COMPARE(str(d22, MemOperand(x23, -256, PostIndex)), "str d22, [x23], #-256"); 1163 COMPARE(str(d22, MemOperand(x23, -256, PostIndex)), "str d22, [x23], #-256");
1100 1164
1101 // TODO(all): Fix this for jssp. 1165 COMPARE(ldr(b0, MemOperand(x1, 4, PostIndex)), "ldr b0, [x1], #4");
1102 COMPARE(ldr(s24, MemOperand(jssp)), "ldr s24, [jssp]"); 1166 COMPARE(ldr(b2, MemOperand(x3, 255, PostIndex)), "ldr b2, [x3], #255");
1103 COMPARE(ldr(d25, MemOperand(jssp, 8)), "ldr d25, [jssp, #8]"); 1167 COMPARE(ldr(b4, MemOperand(x5, -256, PostIndex)), "ldr b4, [x5], #-256");
1104 COMPARE(str(s26, MemOperand(jssp, 4, PreIndex)), "str s26, [jssp, #4]!"); 1168 COMPARE(ldr(h6, MemOperand(x7, 8, PostIndex)), "ldr h6, [x7], #8");
1105 COMPARE(str(d27, MemOperand(jssp, -8, PostIndex)), "str d27, [jssp], #-8"); 1169 COMPARE(ldr(h8, MemOperand(x9, 255, PostIndex)), "ldr h8, [x9], #255");
1170 COMPARE(ldr(h10, MemOperand(x11, -256, PostIndex)), "ldr h10, [x11], #-256");
1171 COMPARE(ldr(q12, MemOperand(x13, 8, PostIndex)), "ldr q12, [x13], #8");
1172 COMPARE(ldr(q14, MemOperand(x15, 255, PostIndex)), "ldr q14, [x15], #255");
1173 COMPARE(ldr(q16, MemOperand(x17, -256, PostIndex)), "ldr q16, [x17], #-256");
1174
1175 COMPARE(str(b18, MemOperand(x19, 4, PostIndex)), "str b18, [x19], #4");
1176 COMPARE(str(b20, MemOperand(x21, 255, PostIndex)), "str b20, [x21], #255");
1177 COMPARE(str(b22, MemOperand(x23, -256, PostIndex)), "str b22, [x23], #-256");
1178 COMPARE(str(h24, MemOperand(x25, 8, PostIndex)), "str h24, [x25], #8");
1179 COMPARE(str(h26, MemOperand(x27, 255, PostIndex)), "str h26, [cp], #255");
1180 COMPARE(str(h28, MemOperand(x29, -256, PostIndex)), "str h28, [fp], #-256");
1181 COMPARE(str(q30, MemOperand(x1, 8, PostIndex)), "str q30, [x1], #8");
1182 COMPARE(str(q31, MemOperand(x3, 255, PostIndex)), "str q31, [x3], #255");
1183 COMPARE(str(q0, MemOperand(x5, -256, PostIndex)), "str q0, [x5], #-256");
1184
1185 COMPARE(ldr(b24, MemOperand(csp, -1, PreIndex)), "ldr b24, [csp, #-1]!");
1186 COMPARE(ldr(h25, MemOperand(csp, 2, PreIndex)), "ldr h25, [csp, #2]!");
1187 COMPARE(ldr(s26, MemOperand(csp, -4, PreIndex)), "ldr s26, [csp, #-4]!");
1188 COMPARE(ldr(d27, MemOperand(csp, 8, PreIndex)), "ldr d27, [csp, #8]!");
1189 COMPARE(ldr(q28, MemOperand(csp, -16, PreIndex)), "ldr q28, [csp, #-16]!");
1106 1190
1107 CLEANUP(); 1191 CLEANUP();
1108 } 1192 }
1193
1194 TEST(load_store_v_regoffset) {
1195 SET_UP_ASM();
1196
1197 COMPARE(ldr(b0, MemOperand(x1, x2)), "ldr b0, [x1, x2]");
1198 COMPARE(ldr(b1, MemOperand(x2, w3, UXTW)), "ldr b1, [x2, w3, uxtw]");
1199 COMPARE(ldr(b2, MemOperand(x3, w4, SXTW)), "ldr b2, [x3, w4, sxtw]");
1200 // We can't assemble this instruction, but we check it disassembles correctly.
1201 COMPARE(dci(0x3c657883), "ldr b3, [x4, x5, lsl #0]");
1202 COMPARE(ldr(b30, MemOperand(csp, xzr)), "ldr b30, [csp, xzr]");
1203 COMPARE(ldr(b31, MemOperand(csp, wzr, UXTW)), "ldr b31, [csp, wzr, uxtw]");
1204
1205 COMPARE(ldr(h0, MemOperand(x1, x2)), "ldr h0, [x1, x2]");
1206 COMPARE(ldr(h1, MemOperand(x2, w3, UXTW)), "ldr h1, [x2, w3, uxtw]");
1207 COMPARE(ldr(h2, MemOperand(x3, w4, SXTW)), "ldr h2, [x3, w4, sxtw]");
1208 COMPARE(ldr(h3, MemOperand(x4, w5, UXTW, 1)), "ldr h3, [x4, w5, uxtw #1]");
1209 COMPARE(ldr(h4, MemOperand(x5, w5, SXTW, 1)), "ldr h4, [x5, w5, sxtw #1]");
1210 COMPARE(ldr(h30, MemOperand(csp, xzr)), "ldr h30, [csp, xzr]");
1211 COMPARE(ldr(h31, MemOperand(csp, wzr, SXTW, 1)),
1212 "ldr h31, [csp, wzr, sxtw #1]");
1213
1214 COMPARE(ldr(s0, MemOperand(x1, x2)), "ldr s0, [x1, x2]");
1215 COMPARE(ldr(s1, MemOperand(x2, w3, UXTW)), "ldr s1, [x2, w3, uxtw]");
1216 COMPARE(ldr(s2, MemOperand(x3, w4, SXTW)), "ldr s2, [x3, w4, sxtw]");
1217 COMPARE(ldr(s3, MemOperand(x4, w5, UXTW, 2)), "ldr s3, [x4, w5, uxtw #2]");
1218 COMPARE(ldr(s4, MemOperand(x5, w5, SXTW, 2)), "ldr s4, [x5, w5, sxtw #2]");
1219 COMPARE(ldr(s30, MemOperand(csp, xzr)), "ldr s30, [csp, xzr]");
1220 COMPARE(ldr(s31, MemOperand(csp, wzr, SXTW, 2)),
1221 "ldr s31, [csp, wzr, sxtw #2]");
1222
1223 COMPARE(ldr(d0, MemOperand(x1, x2)), "ldr d0, [x1, x2]");
1224 COMPARE(ldr(d1, MemOperand(x2, w3, UXTW)), "ldr d1, [x2, w3, uxtw]");
1225 COMPARE(ldr(d2, MemOperand(x3, w4, SXTW)), "ldr d2, [x3, w4, sxtw]");
1226 COMPARE(ldr(d3, MemOperand(x4, w5, UXTW, 3)), "ldr d3, [x4, w5, uxtw #3]");
1227 COMPARE(ldr(d4, MemOperand(x5, w5, SXTW, 3)), "ldr d4, [x5, w5, sxtw #3]");
1228 COMPARE(ldr(d30, MemOperand(csp, xzr)), "ldr d30, [csp, xzr]");
1229 COMPARE(ldr(d31, MemOperand(csp, wzr, SXTW, 3)),
1230 "ldr d31, [csp, wzr, sxtw #3]");
1231
1232 COMPARE(ldr(q0, MemOperand(x1, x2)), "ldr q0, [x1, x2]");
1233 COMPARE(ldr(q1, MemOperand(x2, w3, UXTW)), "ldr q1, [x2, w3, uxtw]");
1234 COMPARE(ldr(q2, MemOperand(x3, w4, SXTW)), "ldr q2, [x3, w4, sxtw]");
1235 COMPARE(ldr(q3, MemOperand(x4, w5, UXTW, 4)), "ldr q3, [x4, w5, uxtw #4]");
1236 COMPARE(ldr(q4, MemOperand(x5, w5, SXTW, 4)), "ldr q4, [x5, w5, sxtw #4]");
1237 COMPARE(ldr(q30, MemOperand(csp, xzr)), "ldr q30, [csp, xzr]");
1238 COMPARE(ldr(q31, MemOperand(csp, wzr, SXTW, 4)),
1239 "ldr q31, [csp, wzr, sxtw #4]");
1240
1241 COMPARE(str(b0, MemOperand(x1, x2)), "str b0, [x1, x2]");
1242 COMPARE(str(b1, MemOperand(x2, w3, UXTW)), "str b1, [x2, w3, uxtw]");
1243 COMPARE(str(b2, MemOperand(x3, w4, SXTW)), "str b2, [x3, w4, sxtw]");
1244 // We can't assemble this instruction, but we check it disassembles correctly.
1245 COMPARE(dci(0x3c257883), "str b3, [x4, x5, lsl #0]");
1246 COMPARE(str(b30, MemOperand(csp, xzr)), "str b30, [csp, xzr]");
1247 COMPARE(str(b31, MemOperand(csp, wzr, UXTW)), "str b31, [csp, wzr, uxtw]");
1248
1249 COMPARE(str(h0, MemOperand(x1, x2)), "str h0, [x1, x2]");
1250 COMPARE(str(h1, MemOperand(x2, w3, UXTW)), "str h1, [x2, w3, uxtw]");
1251 COMPARE(str(h2, MemOperand(x3, w4, SXTW)), "str h2, [x3, w4, sxtw]");
1252 COMPARE(str(h3, MemOperand(x4, w5, UXTW, 1)), "str h3, [x4, w5, uxtw #1]");
1253 COMPARE(str(h4, MemOperand(x5, w5, SXTW, 1)), "str h4, [x5, w5, sxtw #1]");
1254 COMPARE(str(h30, MemOperand(csp, xzr)), "str h30, [csp, xzr]");
1255 COMPARE(str(h31, MemOperand(csp, wzr, SXTW, 1)),
1256 "str h31, [csp, wzr, sxtw #1]");
1257
1258 COMPARE(str(s0, MemOperand(x1, x2)), "str s0, [x1, x2]");
1259 COMPARE(str(s1, MemOperand(x2, w3, UXTW)), "str s1, [x2, w3, uxtw]");
1260 COMPARE(str(s2, MemOperand(x3, w4, SXTW)), "str s2, [x3, w4, sxtw]");
1261 COMPARE(str(s3, MemOperand(x4, w5, UXTW, 2)), "str s3, [x4, w5, uxtw #2]");
1262 COMPARE(str(s4, MemOperand(x5, w5, SXTW, 2)), "str s4, [x5, w5, sxtw #2]");
1263 COMPARE(str(s30, MemOperand(csp, xzr)), "str s30, [csp, xzr]");
1264 COMPARE(str(s31, MemOperand(csp, wzr, SXTW, 2)),
1265 "str s31, [csp, wzr, sxtw #2]");
1266
1267 COMPARE(str(d0, MemOperand(x1, x2)), "str d0, [x1, x2]");
1268 COMPARE(str(d1, MemOperand(x2, w3, UXTW)), "str d1, [x2, w3, uxtw]");
1269 COMPARE(str(d2, MemOperand(x3, w4, SXTW)), "str d2, [x3, w4, sxtw]");
1270 COMPARE(str(d3, MemOperand(x4, w5, UXTW, 3)), "str d3, [x4, w5, uxtw #3]");
1271 COMPARE(str(d4, MemOperand(x5, w5, SXTW, 3)), "str d4, [x5, w5, sxtw #3]");
1272 COMPARE(str(d30, MemOperand(csp, xzr)), "str d30, [csp, xzr]");
1273 COMPARE(str(d31, MemOperand(csp, wzr, SXTW, 3)),
1274 "str d31, [csp, wzr, sxtw #3]");
1275
1276 COMPARE(str(q0, MemOperand(x1, x2)), "str q0, [x1, x2]");
1277 COMPARE(str(q1, MemOperand(x2, w3, UXTW)), "str q1, [x2, w3, uxtw]");
1278 COMPARE(str(q2, MemOperand(x3, w4, SXTW)), "str q2, [x3, w4, sxtw]");
1279 COMPARE(str(q3, MemOperand(x4, w5, UXTW, 4)), "str q3, [x4, w5, uxtw #4]");
1280 COMPARE(str(q4, MemOperand(x5, w5, SXTW, 4)), "str q4, [x5, w5, sxtw #4]");
1281 COMPARE(str(q30, MemOperand(csp, xzr)), "str q30, [csp, xzr]");
1282 COMPARE(str(q31, MemOperand(csp, wzr, SXTW, 4)),
1283 "str q31, [csp, wzr, sxtw #4]");
1284
1285 CLEANUP();
1286 }
1109 1287
1110 1288
1111 TEST_(load_store_unscaled) { 1289 TEST_(load_store_unscaled) {
1112 SET_UP_ASM(); 1290 SET_UP_ASM();
1113 1291
1114 COMPARE(ldr(w0, MemOperand(x1, 1)), "ldur w0, [x1, #1]"); 1292 COMPARE(ldr(w0, MemOperand(x1, 1)), "ldur w0, [x1, #1]");
1115 COMPARE(ldr(w2, MemOperand(x3, -1)), "ldur w2, [x3, #-1]"); 1293 COMPARE(ldr(w2, MemOperand(x3, -1)), "ldur w2, [x3, #-1]");
1116 COMPARE(ldr(w4, MemOperand(x5, 255)), "ldur w4, [x5, #255]"); 1294 COMPARE(ldr(w4, MemOperand(x5, 255)), "ldur w4, [x5, #255]");
1117 COMPARE(ldr(w6, MemOperand(x7, -256)), "ldur w6, [x7, #-256]"); 1295 COMPARE(ldr(w6, MemOperand(x7, -256)), "ldur w6, [x7, #-256]");
1118 COMPARE(ldr(x8, MemOperand(x9, 1)), "ldur x8, [x9, #1]"); 1296 COMPARE(ldr(x8, MemOperand(x9, 1)), "ldur x8, [x9, #1]");
1119 COMPARE(ldr(x10, MemOperand(x11, -1)), "ldur x10, [x11, #-1]"); 1297 COMPARE(ldr(x10, MemOperand(x11, -1)), "ldur x10, [x11, #-1]");
1120 COMPARE(ldr(x12, MemOperand(x13, 255)), "ldur x12, [x13, #255]"); 1298 COMPARE(ldr(x12, MemOperand(x13, 255)), "ldur x12, [x13, #255]");
1121 COMPARE(ldr(x14, MemOperand(x15, -256)), "ldur x14, [x15, #-256]"); 1299 COMPARE(ldr(x14, MemOperand(x15, -256)), "ldur x14, [x15, #-256]");
1122 COMPARE(str(w16, MemOperand(x17, 1)), "stur w16, [x17, #1]"); 1300 COMPARE(str(w16, MemOperand(x17, 1)), "stur w16, [x17, #1]");
1123 COMPARE(str(w18, MemOperand(x19, -1)), "stur w18, [x19, #-1]"); 1301 COMPARE(str(w18, MemOperand(x19, -1)), "stur w18, [x19, #-1]");
1124 COMPARE(str(w20, MemOperand(x21, 255)), "stur w20, [x21, #255]"); 1302 COMPARE(str(w20, MemOperand(x21, 255)), "stur w20, [x21, #255]");
1125 COMPARE(str(w22, MemOperand(x23, -256)), "stur w22, [x23, #-256]"); 1303 COMPARE(str(w22, MemOperand(x23, -256)), "stur w22, [x23, #-256]");
1126 COMPARE(str(x24, MemOperand(x25, 1)), "stur x24, [x25, #1]"); 1304 COMPARE(str(x24, MemOperand(x25, 1)), "stur x24, [x25, #1]");
1127 COMPARE(str(x26, MemOperand(cp, -1)), "stur x26, [cp, #-1]"); 1305 COMPARE(str(x26, MemOperand(x27, -1)), "stur x26, [cp, #-1]");
1128 COMPARE(str(jssp, MemOperand(fp, 255)), "stur jssp, [fp, #255]"); 1306 COMPARE(str(x28, MemOperand(x29, 255)), "stur jssp, [fp, #255]");
1129 COMPARE(str(lr, MemOperand(x0, -256)), "stur lr, [x0, #-256]"); 1307 COMPARE(str(x30, MemOperand(x0, -256)), "stur lr, [x0, #-256]");
1130 COMPARE(ldr(w0, MemOperand(csp, 1)), "ldur w0, [csp, #1]"); 1308 COMPARE(ldr(w0, MemOperand(csp, 1)), "ldur w0, [csp, #1]");
1131 COMPARE(str(x1, MemOperand(csp, -1)), "stur x1, [csp, #-1]"); 1309 COMPARE(str(x1, MemOperand(csp, -1)), "stur x1, [csp, #-1]");
1132 COMPARE(ldrb(w2, MemOperand(x3, -2)), "ldurb w2, [x3, #-2]"); 1310 COMPARE(ldrb(w2, MemOperand(x3, -2)), "ldurb w2, [x3, #-2]");
1133 COMPARE(ldrsb(w4, MemOperand(x5, -3)), "ldursb w4, [x5, #-3]"); 1311 COMPARE(ldrsb(w4, MemOperand(x5, -3)), "ldursb w4, [x5, #-3]");
1134 COMPARE(ldrsb(x6, MemOperand(x7, -4)), "ldursb x6, [x7, #-4]"); 1312 COMPARE(ldrsb(x6, MemOperand(x7, -4)), "ldursb x6, [x7, #-4]");
1135 COMPARE(ldrh(w8, MemOperand(x9, -5)), "ldurh w8, [x9, #-5]"); 1313 COMPARE(ldrh(w8, MemOperand(x9, -5)), "ldurh w8, [x9, #-5]");
1136 COMPARE(ldrsh(w10, MemOperand(x11, -6)), "ldursh w10, [x11, #-6]"); 1314 COMPARE(ldrsh(w10, MemOperand(x11, -6)), "ldursh w10, [x11, #-6]");
1137 COMPARE(ldrsh(x12, MemOperand(x13, -7)), "ldursh x12, [x13, #-7]"); 1315 COMPARE(ldrsh(x12, MemOperand(x13, -7)), "ldursh x12, [x13, #-7]");
1138 COMPARE(ldrsw(x14, MemOperand(x15, -8)), "ldursw x14, [x15, #-8]"); 1316 COMPARE(ldrsw(x14, MemOperand(x15, -8)), "ldursw x14, [x15, #-8]");
1139 1317
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
1233 COMPARE(stp(d23, d24, MemOperand(x25, -512)), "stp d23, d24, [x25, #-512]"); 1411 COMPARE(stp(d23, d24, MemOperand(x25, -512)), "stp d23, d24, [x25, #-512]");
1234 COMPARE(stp(d26, d27, MemOperand(jssp, 504, PreIndex)), 1412 COMPARE(stp(d26, d27, MemOperand(jssp, 504, PreIndex)),
1235 "stp d26, d27, [jssp, #504]!"); 1413 "stp d26, d27, [jssp, #504]!");
1236 COMPARE(stp(d29, d30, MemOperand(fp, -512, PreIndex)), 1414 COMPARE(stp(d29, d30, MemOperand(fp, -512, PreIndex)),
1237 "stp d29, d30, [fp, #-512]!"); 1415 "stp d29, d30, [fp, #-512]!");
1238 COMPARE(stp(d31, d0, MemOperand(x1, 504, PostIndex)), 1416 COMPARE(stp(d31, d0, MemOperand(x1, 504, PostIndex)),
1239 "stp d31, d0, [x1], #504"); 1417 "stp d31, d0, [x1], #504");
1240 COMPARE(stp(d2, d3, MemOperand(x4, -512, PostIndex)), 1418 COMPARE(stp(d2, d3, MemOperand(x4, -512, PostIndex)),
1241 "stp d2, d3, [x4], #-512"); 1419 "stp d2, d3, [x4], #-512");
1242 1420
1243 // TODO(all): Update / Restore this test. 1421 COMPARE(stp(q5, q6, MemOperand(x7)), "stp q5, q6, [x7]");
1422 COMPARE(stp(q8, q9, MemOperand(x10, 1008)), "stp q8, q9, [x10, #1008]");
1423 COMPARE(stp(q11, q12, MemOperand(x13, -1024)), "stp q11, q12, [x13, #-1024]");
1424 COMPARE(stp(q14, q15, MemOperand(x16, 1008, PreIndex)),
1425 "stp q14, q15, [x16, #1008]!");
1426 COMPARE(stp(q17, q18, MemOperand(x19, -1024, PreIndex)),
1427 "stp q17, q18, [x19, #-1024]!");
1428 COMPARE(stp(q20, q21, MemOperand(x22, 1008, PostIndex)),
1429 "stp q20, q21, [x22], #1008");
1430 COMPARE(stp(q23, q24, MemOperand(x25, -1024, PostIndex)),
1431 "stp q23, q24, [x25], #-1024");
1432
1244 COMPARE(ldp(w16, w17, MemOperand(jssp, 4, PostIndex)), 1433 COMPARE(ldp(w16, w17, MemOperand(jssp, 4, PostIndex)),
1245 "ldp w16, w17, [jssp], #4"); 1434 "ldp w16, w17, [jssp], #4");
1246 COMPARE(stp(x18, x19, MemOperand(jssp, -8, PreIndex)), 1435 COMPARE(stp(x18, x19, MemOperand(jssp, -8, PreIndex)),
1247 "stp x18, x19, [jssp, #-8]!"); 1436 "stp x18, x19, [jssp, #-8]!");
1248 COMPARE(ldp(s30, s31, MemOperand(jssp, 12, PostIndex)), 1437 COMPARE(ldp(s30, s31, MemOperand(jssp, 12, PostIndex)),
1249 "ldp s30, s31, [jssp], #12"); 1438 "ldp s30, s31, [jssp], #12");
1250 COMPARE(stp(d30, d31, MemOperand(jssp, -16)), 1439 COMPARE(stp(d30, d31, MemOperand(jssp, -16)),
1251 "stp d30, d31, [jssp, #-16]"); 1440 "stp d30, d31, [jssp, #-16]");
1441 COMPARE(ldp(q30, q31, MemOperand(jssp, 32, PostIndex)),
1442 "ldp q30, q31, [jssp], #32");
1252 1443
1253 COMPARE(ldpsw(x0, x1, MemOperand(x2)), "ldpsw x0, x1, [x2]"); 1444 COMPARE(ldpsw(x0, x1, MemOperand(x2)), "ldpsw x0, x1, [x2]");
1254 COMPARE(ldpsw(x3, x4, MemOperand(x5, 16)), "ldpsw x3, x4, [x5, #16]"); 1445 COMPARE(ldpsw(x3, x4, MemOperand(x5, 16)), "ldpsw x3, x4, [x5, #16]");
1255 COMPARE(ldpsw(x6, x7, MemOperand(x8, -32, PreIndex)), 1446 COMPARE(ldpsw(x6, x7, MemOperand(x8, -32, PreIndex)),
1256 "ldpsw x6, x7, [x8, #-32]!"); 1447 "ldpsw x6, x7, [x8, #-32]!");
1257 COMPARE(ldpsw(x9, x10, MemOperand(x11, 128, PostIndex)), 1448 COMPARE(ldpsw(x9, x10, MemOperand(x11, 128, PostIndex)),
1258 "ldpsw x9, x10, [x11], #128"); 1449 "ldpsw x9, x10, [x11], #128");
1259 1450
1260 CLEANUP(); 1451 CLEANUP();
1261 } 1452 }
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
1398 1589
1399 TEST_(fmov_reg) { 1590 TEST_(fmov_reg) {
1400 SET_UP_ASM(); 1591 SET_UP_ASM();
1401 1592
1402 COMPARE(fmov(w3, s13), "fmov w3, s13"); 1593 COMPARE(fmov(w3, s13), "fmov w3, s13");
1403 COMPARE(fmov(x6, d26), "fmov x6, d26"); 1594 COMPARE(fmov(x6, d26), "fmov x6, d26");
1404 COMPARE(fmov(s11, w30), "fmov s11, w30"); 1595 COMPARE(fmov(s11, w30), "fmov s11, w30");
1405 COMPARE(fmov(d31, x2), "fmov d31, x2"); 1596 COMPARE(fmov(d31, x2), "fmov d31, x2");
1406 COMPARE(fmov(s12, s13), "fmov s12, s13"); 1597 COMPARE(fmov(s12, s13), "fmov s12, s13");
1407 COMPARE(fmov(d22, d23), "fmov d22, d23"); 1598 COMPARE(fmov(d22, d23), "fmov d22, d23");
1599 COMPARE(fmov(v0.D(), 1, x13), "fmov v0.D[1], x13");
1600 COMPARE(fmov(x13, v0.D(), 1), "fmov x13, v0.D[1]");
1408 1601
1409 CLEANUP(); 1602 CLEANUP();
1410 } 1603 }
1411 1604
1412 1605
1413 TEST_(fp_dp1) { 1606 TEST_(fp_dp1) {
1414 SET_UP_ASM(); 1607 SET_UP_ASM();
1415 1608
1416 COMPARE(fabs(s0, s1), "fabs s0, s1"); 1609 COMPARE(fabs(s0, s1), "fabs s0, s1");
1417 COMPARE(fabs(s31, s30), "fabs s31, s30"); 1610 COMPARE(fabs(s31, s30), "fabs s31, s30");
1418 COMPARE(fabs(d2, d3), "fabs d2, d3"); 1611 COMPARE(fabs(d2, d3), "fabs d2, d3");
1419 COMPARE(fabs(d31, d30), "fabs d31, d30"); 1612 COMPARE(fabs(d31, d30), "fabs d31, d30");
1420 COMPARE(fneg(s4, s5), "fneg s4, s5"); 1613 COMPARE(fneg(s4, s5), "fneg s4, s5");
1421 COMPARE(fneg(s31, s30), "fneg s31, s30"); 1614 COMPARE(fneg(s31, s30), "fneg s31, s30");
1422 COMPARE(fneg(d6, d7), "fneg d6, d7"); 1615 COMPARE(fneg(d6, d7), "fneg d6, d7");
1423 COMPARE(fneg(d31, d30), "fneg d31, d30"); 1616 COMPARE(fneg(d31, d30), "fneg d31, d30");
1424 COMPARE(fsqrt(s8, s9), "fsqrt s8, s9"); 1617 COMPARE(fsqrt(s8, s9), "fsqrt s8, s9");
1425 COMPARE(fsqrt(s31, s30), "fsqrt s31, s30"); 1618 COMPARE(fsqrt(s31, s30), "fsqrt s31, s30");
1426 COMPARE(fsqrt(d10, d11), "fsqrt d10, d11"); 1619 COMPARE(fsqrt(d10, d11), "fsqrt d10, d11");
1427 COMPARE(fsqrt(d31, d30), "fsqrt d31, d30"); 1620 COMPARE(fsqrt(d31, d30), "fsqrt d31, d30");
1428 COMPARE(frinta(s10, s11), "frinta s10, s11"); 1621 COMPARE(frinta(s10, s11), "frinta s10, s11");
1429 COMPARE(frinta(s31, s30), "frinta s31, s30"); 1622 COMPARE(frinta(s31, s30), "frinta s31, s30");
1430 COMPARE(frinta(d12, d13), "frinta d12, d13"); 1623 COMPARE(frinta(d12, d13), "frinta d12, d13");
1431 COMPARE(frinta(d31, d30), "frinta d31, d30"); 1624 COMPARE(frinta(d31, d30), "frinta d31, d30");
1625 COMPARE(frinti(s10, s11), "frinti s10, s11");
1626 COMPARE(frinti(s31, s30), "frinti s31, s30");
1627 COMPARE(frinti(d12, d13), "frinti d12, d13");
1628 COMPARE(frinti(d31, d30), "frinti d31, d30");
1629 COMPARE(frintm(s10, s11), "frintm s10, s11");
1630 COMPARE(frintm(s31, s30), "frintm s31, s30");
1631 COMPARE(frintm(d12, d13), "frintm d12, d13");
1632 COMPARE(frintm(d31, d30), "frintm d31, d30");
1432 COMPARE(frintn(s10, s11), "frintn s10, s11"); 1633 COMPARE(frintn(s10, s11), "frintn s10, s11");
1433 COMPARE(frintn(s31, s30), "frintn s31, s30"); 1634 COMPARE(frintn(s31, s30), "frintn s31, s30");
1434 COMPARE(frintn(d12, d13), "frintn d12, d13"); 1635 COMPARE(frintn(d12, d13), "frintn d12, d13");
1435 COMPARE(frintn(d31, d30), "frintn d31, d30"); 1636 COMPARE(frintn(d31, d30), "frintn d31, d30");
1637 COMPARE(frintx(s10, s11), "frintx s10, s11");
1638 COMPARE(frintx(s31, s30), "frintx s31, s30");
1639 COMPARE(frintx(d12, d13), "frintx d12, d13");
1640 COMPARE(frintx(d31, d30), "frintx d31, d30");
1436 COMPARE(frintp(s10, s11), "frintp s10, s11"); 1641 COMPARE(frintp(s10, s11), "frintp s10, s11");
1437 COMPARE(frintp(s31, s30), "frintp s31, s30"); 1642 COMPARE(frintp(s31, s30), "frintp s31, s30");
1438 COMPARE(frintp(d12, d13), "frintp d12, d13"); 1643 COMPARE(frintp(d12, d13), "frintp d12, d13");
1439 COMPARE(frintp(d31, d30), "frintp d31, d30"); 1644 COMPARE(frintp(d31, d30), "frintp d31, d30");
1440 COMPARE(frintz(s10, s11), "frintz s10, s11"); 1645 COMPARE(frintz(s10, s11), "frintz s10, s11");
1441 COMPARE(frintz(s31, s30), "frintz s31, s30"); 1646 COMPARE(frintz(s31, s30), "frintz s31, s30");
1442 COMPARE(frintz(d12, d13), "frintz d12, d13"); 1647 COMPARE(frintz(d12, d13), "frintz d12, d13");
1443 COMPARE(frintz(d31, d30), "frintz d31, d30"); 1648 COMPARE(frintz(d31, d30), "frintz d31, d30");
1444 COMPARE(fcvt(d14, s15), "fcvt d14, s15"); 1649 COMPARE(fcvt(d14, s15), "fcvt d14, s15");
1445 COMPARE(fcvt(d31, s31), "fcvt d31, s31"); 1650 COMPARE(fcvt(d31, s31), "fcvt d31, s31");
1651 COMPARE(fcvt(s0, d1), "fcvt s0, d1");
1652 COMPARE(fcvt(s2, h3), "fcvt s2, h3");
1653 COMPARE(fcvt(d4, h5), "fcvt d4, h5");
1654 COMPARE(fcvt(h6, s7), "fcvt h6, s7");
1655 COMPARE(fcvt(h8, d9), "fcvt h8, d9");
1446 1656
1447 CLEANUP(); 1657 CLEANUP();
1448 } 1658 }
1449 1659
1450 1660
1451 TEST_(fp_dp2) { 1661 TEST_(fp_dp2) {
1452 SET_UP_ASM(); 1662 SET_UP_ASM();
1453 1663
1454 COMPARE(fadd(s0, s1, s2), "fadd s0, s1, s2"); 1664 COMPARE(fadd(s0, s1, s2), "fadd s0, s1, s2");
1455 COMPARE(fadd(d3, d4, d5), "fadd d3, d4, d5"); 1665 COMPARE(fadd(d3, d4, d5), "fadd d3, d4, d5");
1456 COMPARE(fsub(s31, s30, s29), "fsub s31, s30, s29"); 1666 COMPARE(fsub(s31, s30, s29), "fsub s31, s30, s29");
1457 COMPARE(fsub(d31, d30, d29), "fsub d31, d30, d29"); 1667 COMPARE(fsub(d31, d30, d29), "fsub d31, d30, d29");
1458 COMPARE(fmul(s7, s8, s9), "fmul s7, s8, s9"); 1668 COMPARE(fmul(s7, s8, s9), "fmul s7, s8, s9");
1459 COMPARE(fmul(d10, d11, d12), "fmul d10, d11, d12"); 1669 COMPARE(fmul(d10, d11, d12), "fmul d10, d11, d12");
1670 COMPARE(fnmul(s7, s8, s9), "fnmul s7, s8, s9");
1671 COMPARE(fnmul(d10, d11, d12), "fnmul d10, d11, d12");
1460 COMPARE(fdiv(s13, s14, s15), "fdiv s13, s14, s15"); 1672 COMPARE(fdiv(s13, s14, s15), "fdiv s13, s14, s15");
1461 COMPARE(fdiv(d16, d17, d18), "fdiv d16, d17, d18"); 1673 COMPARE(fdiv(d16, d17, d18), "fdiv d16, d17, d18");
1462 COMPARE(fmax(s19, s20, s21), "fmax s19, s20, s21"); 1674 COMPARE(fmax(s19, s20, s21), "fmax s19, s20, s21");
1463 COMPARE(fmax(d22, d23, d24), "fmax d22, d23, d24"); 1675 COMPARE(fmax(d22, d23, d24), "fmax d22, d23, d24");
1464 COMPARE(fmin(s25, s26, s27), "fmin s25, s26, s27"); 1676 COMPARE(fmin(s25, s26, s27), "fmin s25, s26, s27");
1465 COMPARE(fmin(d28, d29, d30), "fmin d28, d29, d30"); 1677 COMPARE(fmin(d28, d29, d30), "fmin d28, d29, d30");
1466 COMPARE(fmaxnm(s31, s0, s1), "fmaxnm s31, s0, s1"); 1678 COMPARE(fmaxnm(s31, s0, s1), "fmaxnm s31, s0, s1");
1467 COMPARE(fmaxnm(d2, d3, d4), "fmaxnm d2, d3, d4"); 1679 COMPARE(fmaxnm(d2, d3, d4), "fmaxnm d2, d3, d4");
1468 COMPARE(fminnm(s5, s6, s7), "fminnm s5, s6, s7"); 1680 COMPARE(fminnm(s5, s6, s7), "fminnm s5, s6, s7");
1469 COMPARE(fminnm(d8, d9, d10), "fminnm d8, d9, d10"); 1681 COMPARE(fminnm(d8, d9, d10), "fminnm d8, d9, d10");
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
1555 COMPARE(fcvtnu(w12, d13), "fcvtnu w12, d13"); 1767 COMPARE(fcvtnu(w12, d13), "fcvtnu w12, d13");
1556 COMPARE(fcvtnu(x14, d15), "fcvtnu x14, d15"); 1768 COMPARE(fcvtnu(x14, d15), "fcvtnu x14, d15");
1557 COMPARE(fcvtzu(x16, d17), "fcvtzu x16, d17"); 1769 COMPARE(fcvtzu(x16, d17), "fcvtzu x16, d17");
1558 COMPARE(fcvtzu(w18, d19), "fcvtzu w18, d19"); 1770 COMPARE(fcvtzu(w18, d19), "fcvtzu w18, d19");
1559 COMPARE(fcvtzs(x20, d21), "fcvtzs x20, d21"); 1771 COMPARE(fcvtzs(x20, d21), "fcvtzs x20, d21");
1560 COMPARE(fcvtzs(w22, d23), "fcvtzs w22, d23"); 1772 COMPARE(fcvtzs(w22, d23), "fcvtzs w22, d23");
1561 COMPARE(fcvtzu(x16, s17), "fcvtzu x16, s17"); 1773 COMPARE(fcvtzu(x16, s17), "fcvtzu x16, s17");
1562 COMPARE(fcvtzu(w18, s19), "fcvtzu w18, s19"); 1774 COMPARE(fcvtzu(w18, s19), "fcvtzu w18, s19");
1563 COMPARE(fcvtzs(x20, s21), "fcvtzs x20, s21"); 1775 COMPARE(fcvtzs(x20, s21), "fcvtzs x20, s21");
1564 COMPARE(fcvtzs(w22, s23), "fcvtzs w22, s23"); 1776 COMPARE(fcvtzs(w22, s23), "fcvtzs w22, s23");
1777 COMPARE(fcvtzs(w2, d1, 1), "fcvtzs w2, d1, #1");
1778 COMPARE(fcvtzs(w2, s1, 1), "fcvtzs w2, s1, #1");
1779 COMPARE(fcvtzs(x4, d3, 15), "fcvtzs x4, d3, #15");
1780 COMPARE(fcvtzs(x4, s3, 15), "fcvtzs x4, s3, #15");
1781 COMPARE(fcvtzs(w6, d5, 32), "fcvtzs w6, d5, #32");
1782 COMPARE(fcvtzs(w6, s5, 32), "fcvtzs w6, s5, #32");
1783 COMPARE(fcvtzu(w2, d1, 1), "fcvtzu w2, d1, #1");
1784 COMPARE(fcvtzu(w2, s1, 1), "fcvtzu w2, s1, #1");
1785 COMPARE(fcvtzu(x4, d3, 15), "fcvtzu x4, d3, #15");
1786 COMPARE(fcvtzu(x4, s3, 15), "fcvtzu x4, s3, #15");
1787 COMPARE(fcvtzu(w6, d5, 32), "fcvtzu w6, d5, #32");
1788 COMPARE(fcvtzu(w6, s5, 32), "fcvtzu w6, s5, #32");
1789 COMPARE(fcvtpu(x24, d25), "fcvtpu x24, d25");
1790 COMPARE(fcvtpu(w26, d27), "fcvtpu w26, d27");
1791 COMPARE(fcvtps(x28, d29), "fcvtps jssp, d29");
1792 COMPARE(fcvtps(w30, d31), "fcvtps w30, d31");
1793 COMPARE(fcvtpu(x0, s1), "fcvtpu x0, s1");
1794 COMPARE(fcvtpu(w2, s3), "fcvtpu w2, s3");
1795 COMPARE(fcvtps(x4, s5), "fcvtps x4, s5");
1796 COMPARE(fcvtps(w6, s7), "fcvtps w6, s7");
1565 COMPARE(scvtf(d24, w25), "scvtf d24, w25"); 1797 COMPARE(scvtf(d24, w25), "scvtf d24, w25");
1566 COMPARE(scvtf(s24, w25), "scvtf s24, w25"); 1798 COMPARE(scvtf(s24, w25), "scvtf s24, w25");
1567 COMPARE(scvtf(d26, x0), "scvtf d26, x0"); 1799 COMPARE(scvtf(d26, x0), "scvtf d26, x0");
1568 COMPARE(scvtf(s26, x0), "scvtf s26, x0"); 1800 COMPARE(scvtf(s26, x0), "scvtf s26, x0");
1569 COMPARE(ucvtf(d28, w29), "ucvtf d28, w29"); 1801 COMPARE(ucvtf(d28, w29), "ucvtf d28, w29");
1570 COMPARE(ucvtf(s28, w29), "ucvtf s28, w29"); 1802 COMPARE(ucvtf(s28, w29), "ucvtf s28, w29");
1571 COMPARE(ucvtf(d0, x1), "ucvtf d0, x1"); 1803 COMPARE(ucvtf(d0, x1), "ucvtf d0, x1");
1572 COMPARE(ucvtf(s0, x1), "ucvtf s0, x1"); 1804 COMPARE(ucvtf(s0, x1), "ucvtf s0, x1");
1573 COMPARE(ucvtf(d0, x1, 0), "ucvtf d0, x1"); 1805 COMPARE(ucvtf(d0, x1, 0), "ucvtf d0, x1");
1574 COMPARE(ucvtf(s0, x1, 0), "ucvtf s0, x1"); 1806 COMPARE(ucvtf(s0, x1, 0), "ucvtf s0, x1");
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
1784 COMPARE(Dsb(FullSystem, BarrierOther), "dsb sy (0b1100)"); 2016 COMPARE(Dsb(FullSystem, BarrierOther), "dsb sy (0b1100)");
1785 COMPARE(Dsb(InnerShareable, BarrierOther), "dsb sy (0b1000)"); 2017 COMPARE(Dsb(InnerShareable, BarrierOther), "dsb sy (0b1000)");
1786 COMPARE(Dsb(NonShareable, BarrierOther), "dsb sy (0b0100)"); 2018 COMPARE(Dsb(NonShareable, BarrierOther), "dsb sy (0b0100)");
1787 COMPARE(Dsb(OuterShareable, BarrierOther), "dsb sy (0b0000)"); 2019 COMPARE(Dsb(OuterShareable, BarrierOther), "dsb sy (0b0000)");
1788 2020
1789 // ISB 2021 // ISB
1790 COMPARE(Isb(), "isb"); 2022 COMPARE(Isb(), "isb");
1791 2023
1792 CLEANUP(); 2024 CLEANUP();
1793 } 2025 }
2026
2027 #define VLIST2(v) \
2028 v, VRegister::Create((v.code() + 1) % 32, v.SizeInBits(), v.LaneCount())
2029 #define VLIST3(v) \
2030 VLIST2(v) \
2031 , VRegister::Create((v.code() + 2) % 32, v.SizeInBits(), v.LaneCount())
2032 #define VLIST4(v) \
2033 VLIST3(v) \
2034 , VRegister::Create((v.code() + 3) % 32, v.SizeInBits(), v.LaneCount())
2035
2036 #define NEON_FORMAT_LIST(V) \
2037 V(V8B(), "8b") \
2038 V(V16B(), "16b") \
2039 V(V4H(), "4h") \
2040 V(V8H(), "8h") \
2041 V(V2S(), "2s") \
2042 V(V4S(), "4s") \
2043 V(V2D(), "2d")
2044
2045 #define NEON_FORMAT_LIST_LP(V) \
2046 V(V4H(), "4h", V8B(), "8b") \
2047 V(V2S(), "2s", V4H(), "4h") \
2048 V(V1D(), "1d", V2S(), "2s") \
2049 V(V8H(), "8h", V16B(), "16b") \
2050 V(V4S(), "4s", V8H(), "8h") \
2051 V(V2D(), "2d", V4S(), "4s")
2052
2053 #define NEON_FORMAT_LIST_LW(V) \
2054 V(V8H(), "8h", V8B(), "8b") \
2055 V(V4S(), "4s", V4H(), "4h") \
2056 V(V2D(), "2d", V2S(), "2s")
2057
2058 #define NEON_FORMAT_LIST_LW2(V) \
2059 V(V8H(), "8h", V16B(), "16b") \
2060 V(V4S(), "4s", V8H(), "8h") \
2061 V(V2D(), "2d", V4S(), "4s")
2062
2063 #define NEON_FORMAT_LIST_BHS(V) \
2064 V(V8B(), "8b") \
2065 V(V16B(), "16b") \
2066 V(V4H(), "4h") \
2067 V(V8H(), "8h") \
2068 V(V2S(), "2s") \
2069 V(V4S(), "4s")
2070
2071 #define NEON_FORMAT_LIST_HS(V) \
2072 V(V4H(), "4h") \
2073 V(V8H(), "8h") \
2074 V(V2S(), "2s") \
2075 V(V4S(), "4s")
2076
2077 #define NEON_FORMAT_LIST_FP(V) \
2078 V(V2S(), "2s") \
2079 V(V4S(), "4s") \
2080 V(V2D(), "2d")
2081
2082 TEST(neon_load_store_vector) {
2083 SET_UP_MASM();
2084
2085 #define DISASM_INST(M, S) \
2086 COMPARE(Ld1(v0.M, MemOperand(x15)), "ld1 {v0." S "}, [x15]"); \
2087 COMPARE(Ld1(v1.M, v2.M, MemOperand(x16)), \
2088 "ld1 {v1." S ", v2." S "}, [x16]"); \
2089 COMPARE(Ld1(v3.M, v4.M, v5.M, MemOperand(x17)), \
2090 "ld1 {v3." S ", v4." S ", v5." S "}, [x17]"); \
2091 COMPARE(Ld1(v6.M, v7.M, v8_.M, v9.M, MemOperand(x18)), \
2092 "ld1 {v6." S ", v7." S ", v8_." S ", v9." S "}, [x18]") \
2093 COMPARE(Ld1(v30.M, v31.M, v0.M, v1.M, MemOperand(sp)), \
2094 "ld1 {v30." S ", v31." S ", v0." S ", v1." S "}, [csp]") \
2095 COMPARE(Ld2(v1.M, v2.M, MemOperand(x16)), \
2096 "ld2 {v1." S ", v2." S "}, [x16]"); \
2097 COMPARE(Ld3(v3.M, v4.M, v5.M, MemOperand(x17)), \
2098 "ld3 {v3." S ", v4." S ", v5." S "}, [x17]"); \
2099 COMPARE(Ld4(v6.M, v7.M, v8_.M, v9.M, MemOperand(x18)), \
2100 "ld4 {v6." S ", v7." S ", v8." S ", v9." S "}, [x18]") \
2101 COMPARE(Ld4(v30.M, v31.M, v0.M, v1.M, MemOperand(sp)), \
2102 "ld4 {v30." S ", v31." S ", v0." S ", v1." S "}, [csp]") \
2103 NEON_FORMAT_LIST(DISASM_INST);
2104 #undef DISASM_INST
2105
2106 #define DISASM_INST(M, S) \
2107 COMPARE(Ld1(v0.M, MemOperand(x15, x20, PostIndex)), \
2108 "ld1 {v0." S "}, [x15], x20"); \
2109 COMPARE(Ld1(v1.M, v2.M, MemOperand(x16, x21, PostIndex)), \
2110 "ld1 {v1." S ", v2." S "}, [x16], x21"); \
2111 COMPARE(Ld1(v3.M, v4.M, v5.M, MemOperand(x17, x22, PostIndex)), \
2112 "ld1 {v3." S ", v4." S ", v5." S "}, [x17], x22"); \
2113 COMPARE(Ld1(v6.M, v7.M, v8_.M, v9.M, MemOperand(x18, x23, PostIndex)), \
2114 "ld1 {v6." S ", v7." S ", v8." S ", v9." S "}, [x18], x23") \
2115 COMPARE(Ld1(v30.M, v31.M, v0.M, v1.M, MemOperand(sp, x24, PostIndex)), \
2116 "ld1 {v30." S ", v31." S ", v0." S ", v1." S "}, [csp], x24") \
2117 COMPARE(Ld2(v1.M, v2.M, MemOperand(x16, x21, PostIndex)), \
2118 "ld2 {v1." S ", v2." S "}, [x16], x21"); \
2119 COMPARE(Ld3(v3.M, v4.M, v5.M, MemOperand(x17, x22, PostIndex)), \
2120 "ld3 {v3." S ", v4." S ", v5." S "}, [x17], x22"); \
2121 COMPARE(Ld4(v6.M, v7.M, v8_.M, v9.M, MemOperand(x18, x23, PostIndex)), \
2122 "ld4 {v6." S ", v7." S ", v8_." S ", v9." S "}, [x18], x23") \
2123 COMPARE(Ld4(v30.M, v31.M, v0.M, v1.M, MemOperand(sp, x24, PostIndex)), \
2124 "ld4 {v30." S ", v31." S ", v0." S ", v1." S "}, [csp], x24") \
2125 NEON_FORMAT_LIST(DISASM_INST);
2126 #undef DISASM_INST
2127
2128 COMPARE(Ld1(v0.V8B(), MemOperand(x15, 8, PostIndex)),
2129 "ld1 {v0.8b}, [x15], #8");
2130 COMPARE(Ld1(v1.V16B(), MemOperand(x16, 16, PostIndex)),
2131 "ld1 {v1.16b}, [x16], #16");
2132 COMPARE(Ld1(v2.V4H(), v3.V4H(), MemOperand(x17, 16, PostIndex)),
2133 "ld1 {v2.4h, v3.4h}, [x17], #16");
2134 COMPARE(Ld1(v4.V8H(), v5.V8H(), MemOperand(x18, 32, PostIndex)),
2135 "ld1 {v4.8h, v5.8h}, [x18], #32");
2136 COMPARE(Ld1(v16.V2S(), v17.V2S(), v18.V2S(), MemOperand(x19, 24, PostIndex)),
2137 "ld1 {v16.2s, v17.2s, v18.2s}, [x19], #24");
2138 COMPARE(Ld1(v16.V4S(), v17.V4S(), v18.V4S(), MemOperand(x19, 48, PostIndex)),
2139 "ld1 {v16.4s, v17.4s, v18.4s}, [x19], #48");
2140 COMPARE(Ld1(v19.V2S(), v20.V2S(), v21.V2S(), v22.V2S(),
2141 MemOperand(x20, 32, PostIndex)),
2142 "ld1 {v19.2s, v20.2s, v21.2s, v22.2s}, [x20], #32");
2143 COMPARE(Ld1(v23.V2D(), v24.V2D(), v25.V2D(), v26.V2D(),
2144 MemOperand(x21, 64, PostIndex)),
2145 "ld1 {v23.2d, v24.2d, v25.2d, v26.2d}, [x21], #64");
2146
2147 COMPARE(Ld2(v2.V4H(), v3.V4H(), MemOperand(x17, 16, PostIndex)),
2148 "ld2 {v2.4h, v3.4h}, [x17], #16");
2149 COMPARE(Ld2(v4.V8H(), v5.V8H(), MemOperand(x18, 32, PostIndex)),
2150 "ld2 {v4.8h, v5.8h}, [x18], #32");
2151 COMPARE(Ld3(v16.V2S(), v17.V2S(), v18.V2S(), MemOperand(x19, 24, PostIndex)),
2152 "ld3 {v16.2s, v17.2s, v18.2s}, [x19], #24");
2153 COMPARE(Ld3(v16.V4S(), v17.V4S(), v18.V4S(), MemOperand(x19, 48, PostIndex)),
2154 "ld3 {v16.4s, v17.4s, v18.4s}, [x19], #48");
2155 COMPARE(Ld4(v19.V2S(), v20.V2S(), v21.V2S(), v22.V2S(),
2156 MemOperand(x20, 32, PostIndex)),
2157 "ld4 {v19.2s, v20.2s, v21.2s, v22.2s}, [x20], #32");
2158 COMPARE(Ld4(v23.V2D(), v24.V2D(), v25.V2D(), v26.V2D(),
2159 MemOperand(x21, 64, PostIndex)),
2160 "ld4 {v23.2d, v24.2d, v25.2d, v26.2d}, [x21], #64");
2161
2162 COMPARE(Ld1(v0.V1D(), MemOperand(x16)), "ld1 {v0.1d}, [x16]");
2163 COMPARE(Ld1(v1.V1D(), v2.V1D(), MemOperand(x17, 16, PostIndex)),
2164 "ld1 {v1.1d, v2.1d}, [x17], #16");
2165 COMPARE(Ld1(v3.V1D(), v4.V1D(), v5.V1D(), MemOperand(x18, x19, PostIndex)),
2166 "ld1 {v3.1d, v4.1d, v5.1d}, [x18], x19");
2167 COMPARE(Ld1(v30.V1D(), v31.V1D(), v0.V1D(), v1.V1D(),
2168 MemOperand(x20, 32, PostIndex)),
2169 "ld1 {v30.1d, v31.1d, v0.1d, v1.1d}, [x20], #32");
2170 COMPARE(Ld1(d30, d31, d0, d1, MemOperand(x21, x22, PostIndex)),
2171 "ld1 {v30.1d, v31.1d, v0.1d, v1.1d}, [x21], x22");
2172
2173 #define DISASM_INST(M, S) \
2174 COMPARE(St1(v20.M, MemOperand(x15)), "st1 {v20." S "}, [x15]"); \
2175 COMPARE(St1(v21.M, v22.M, MemOperand(x16)), \
2176 "st1 {v21." S ", v22." S "}, [x16]"); \
2177 COMPARE(St1(v23.M, v24.M, v25.M, MemOperand(x17)), \
2178 "st1 {v23." S ", v24." S ", v25." S "}, [x17]"); \
2179 COMPARE(St1(v26.M, v27.M, v28.M, v29.M, MemOperand(x18)), \
2180 "st1 {v26." S ", v27." S ", v28." S ", v29." S "}, [x18]") \
2181 COMPARE(St1(v30.M, v31.M, v0.M, v1.M, MemOperand(csp)), \
2182 "st1 {v30." S ", v31." S ", v0." S ", v1." S "}, [csp]") \
2183 COMPARE(St2(VLIST2(v21.M), MemOperand(x16)), \
2184 "st2 {v21." S ", v22." S "}, [x16]"); \
2185 COMPARE(St3(v23.M, v24.M, v25.M, MemOperand(x17)), \
2186 "st3 {v23." S ", v24." S ", v25." S "}, [x17]"); \
2187 COMPARE(St4(v30.M, v31.M, v0.M, v1.M, MemOperand(csp)), \
2188 "st4 {v30." S ", v31." S ", v0." S ", v1." S "}, [csp]")
2189 NEON_FORMAT_LIST(DISASM_INST);
2190 #undef DISASM_INST
2191
2192 #define DISASM_INST(M, S) \
2193 COMPARE(St1(v0.M, MemOperand(x15, x20, PostIndex)), \
2194 "st1 {v0." S "}, [x15], x20"); \
2195 COMPARE(St1(v1.M, v2.M, MemOperand(x16, x21, PostIndex)), \
2196 "st1 {v1." S ", v2." S "}, [x16], x21"); \
2197 COMPARE(St1(v3.M, v4.M, v5.M, MemOperand(x17, x22, PostIndex)), \
2198 "st1 {v3." S ", v4." S ", v5." S "}, [x17], x22"); \
2199 COMPARE(St1(v6.M, v7.M, v8_.M, v9.M, MemOperand(x18, x23, PostIndex)), \
2200 "st1 {v6." S ", v7." S ", v8." S ", v9." S "}, [x18], x23") \
2201 COMPARE(St1(v30.M, v31.M, v0.M, v1.M, MemOperand(csp, x24, PostIndex)), \
2202 "st1 {v30." S ", v31." S ", v0." S ", v1." S "}, [csp], x24") \
2203 COMPARE(St2(v1.M, v2.M, MemOperand(x16, x21, PostIndex)), \
2204 "st2 {v1." S ", v2." S "}, [x16], x21"); \
2205 COMPARE(St3(v3.M, v4.M, v5.M, MemOperand(x17, x22, PostIndex)), \
2206 "st3 {v3." S ", v4." S ", v5." S "}, [x17], x22"); \
2207 COMPARE(St4(v6.M, v7.M, v8_.M, v9.M, MemOperand(x18, x23, PostIndex)), \
2208 "st4 {v6." S ", v7." S ", v8." S ", v9." S "}, [x18], x23") \
2209 COMPARE(St4(v30.M, v31.M, v0.M, v1.M, MemOperand(csp, x24, PostIndex)), \
2210 "st4 {v30." S ", v31." S ", v0." S ", v1." S "}, [csp], x24")
2211 NEON_FORMAT_LIST(DISASM_INST);
2212 #undef DISASM_INST
2213
2214 COMPARE(St1(v0.V8B(), MemOperand(x15, 8, PostIndex)),
2215 "st1 {v0.8b}, [x15], #8");
2216 COMPARE(St1(v1.V16B(), MemOperand(x16, 16, PostIndex)),
2217 "st1 {v1.16b}, [x16], #16");
2218 COMPARE(St1(v2.V4H(), v3.V4H(), MemOperand(x17, 16, PostIndex)),
2219 "st1 {v2.4h, v3.4h}, [x17], #16");
2220 COMPARE(St1(v4.V8H(), v5.V8H(), MemOperand(x18, 32, PostIndex)),
2221 "st1 {v4.8h, v5.8h}, [x18], #32");
2222 COMPARE(St1(v16.V2S(), v17.V2S(), v18.V2S(), MemOperand(x19, 24, PostIndex)),
2223 "st1 {v16.2s, v17.2s, v18.2s}, [x19], #24");
2224 COMPARE(St1(v16.V4S(), v17.V4S(), v18.V4S(), MemOperand(x19, 48, PostIndex)),
2225 "st1 {v16.4s, v17.4s, v18.4s}, [x19], #48");
2226 COMPARE(St1(v19.V2S(), v20.V2S(), v21.V2S(), v22.V2S(),
2227 MemOperand(x20, 32, PostIndex)),
2228 "st1 {v19.2s, v20.2s, v21.2s, v22.2s}, [x20], #32");
2229 COMPARE(St1(v23.V2D(), v24.V2D(), v25.V2D(), v26.V2D(),
2230 MemOperand(x21, 64, PostIndex)),
2231 "st1 {v23.2d, v24.2d, v25.2d, v26.2d}, [x21], #64");
2232 COMPARE(St2(v1.V16B(), v2.V16B(), MemOperand(x16, 32, PostIndex)),
2233 "st2 {v1.16b, v2.16b}, [x16], #32");
2234 COMPARE(St2(v2.V4H(), v3.V4H(), MemOperand(x17, 16, PostIndex)),
2235 "st2 {v2.4h, v3.4h}, [x17], #16");
2236 COMPARE(St2(v4.V8H(), v5.V8H(), MemOperand(x18, 32, PostIndex)),
2237 "st2 {v4.8h, v5.8h}, [x18], #32");
2238 COMPARE(St3(v16.V2S(), v17.V2S(), v18.V2S(), MemOperand(x19, 24, PostIndex)),
2239 "st3 {v16.2s, v17.2s, v18.2s}, [x19], #24");
2240 COMPARE(St3(v16.V4S(), v17.V4S(), v18.V4S(), MemOperand(x19, 48, PostIndex)),
2241 "st3 {v16.4s, v17.4s, v18.4s}, [x19], #48");
2242 COMPARE(St4(v19.V2S(), v20.V2S(), v21.V2S(), v22.V2S(),
2243 MemOperand(x20, 32, PostIndex)),
2244 "st4 {v19.2s, v20.2s, v21.2s, v22.2s}, [x20], #32");
2245 COMPARE(St4(v23.V2D(), v24.V2D(), v25.V2D(), v26.V2D(),
2246 MemOperand(x21, 64, PostIndex)),
2247 "st4 {v23.2d, v24.2d, v25.2d, v26.2d}, [x21], #64");
2248
2249 COMPARE(St1(v0.V1D(), MemOperand(x16)), "st1 {v0.1d}, [x16]");
2250 COMPARE(St1(v1.V1D(), v2.V1D(), MemOperand(x17, 16, PostIndex)),
2251 "st1 {v1.1d, v2.1d}, [x17], #16");
2252 COMPARE(St1(v3.V1D(), v4.V1D(), v5.V1D(), MemOperand(x18, x19, PostIndex)),
2253 "st1 {v3.1d, v4.1d, v5.1d}, [x18], x19");
2254 COMPARE(St1(v30.V1D(), v31.V1D(), v0.V1D(), v1.V1D(),
2255 MemOperand(x20, 32, PostIndex)),
2256 "st1 {v30.1d, v31.1d, v0.1d, v1.1d}, [x20], #32");
2257 COMPARE(St1(d30, d31, d0, d1, MemOperand(x21, x22, PostIndex)),
2258 "st1 {v30.1d, v31.1d, v0.1d, v1.1d}, [x21], x22");
2259
2260 CLEANUP();
2261 }
2262
2263 TEST(neon_load_store_vector_unallocated) {
2264 SET_UP_MASM();
2265
2266 const char* expected = "unallocated (NEONLoadStoreMultiStruct)";
2267 // LD[1-4] (multiple structures) (no offset)
2268 COMPARE(dci(0x0c401000), expected); // opcode = 0b0001
2269 COMPARE(dci(0x0c403000), expected); // opcode = 0b0011
2270 COMPARE(dci(0x0c405000), expected); // opcode = 0b0101
2271 COMPARE(dci(0x0c409000), expected); // opcode = 0b1001
2272 COMPARE(dci(0x0c40b000), expected); // opcode = 0b1011
2273 COMPARE(dci(0x0c40c000), expected); // opcode = 0b1100
2274 COMPARE(dci(0x0c40d000), expected); // opcode = 0b1101
2275 COMPARE(dci(0x0c40e000), expected); // opcode = 0b1110
2276 COMPARE(dci(0x0c40f000), expected); // opcode = 0b1111
2277 COMPARE(dci(0x0c400c00), expected); // opcode = 0b0000, size:Q = 0b110
2278 COMPARE(dci(0x0c404c00), expected); // opcode = 0b0100, size:Q = 0b110
2279 COMPARE(dci(0x0c408c00), expected); // opcode = 0b1000, size:Q = 0b110
2280
2281 // ST[1-4] (multiple structures) (no offset)
2282 COMPARE(dci(0x0c001000), expected); // opcode = 0b0001
2283 COMPARE(dci(0x0c003000), expected); // opcode = 0b0011
2284 COMPARE(dci(0x0c005000), expected); // opcode = 0b0101
2285 COMPARE(dci(0x0c009000), expected); // opcode = 0b1001
2286 COMPARE(dci(0x0c00b000), expected); // opcode = 0b1011
2287 COMPARE(dci(0x0c00c000), expected); // opcode = 0b1100
2288 COMPARE(dci(0x0c00d000), expected); // opcode = 0b1101
2289 COMPARE(dci(0x0c00e000), expected); // opcode = 0b1110
2290 COMPARE(dci(0x0c00f000), expected); // opcode = 0b1111
2291 COMPARE(dci(0x0c000c00), expected); // opcode = 0b0000, size:Q = 0b110
2292 COMPARE(dci(0x0c004c00), expected); // opcode = 0b0100, size:Q = 0b110
2293 COMPARE(dci(0x0c008c00), expected); // opcode = 0b1000, size:Q = 0b110
2294
2295 expected = "unallocated (NEONLoadStoreMultiStructPostIndex)";
2296 // LD[1-4] (multiple structures) (post index)
2297 COMPARE(dci(0x0cc01000), expected); // opcode = 0b0001
2298 COMPARE(dci(0x0cc03000), expected); // opcode = 0b0011
2299 COMPARE(dci(0x0cc05000), expected); // opcode = 0b0101
2300 COMPARE(dci(0x0cc09000), expected); // opcode = 0b1001
2301 COMPARE(dci(0x0cc0b000), expected); // opcode = 0b1011
2302 COMPARE(dci(0x0cc0c000), expected); // opcode = 0b1100
2303 COMPARE(dci(0x0cc0d000), expected); // opcode = 0b1101
2304 COMPARE(dci(0x0cc0e000), expected); // opcode = 0b1110
2305 COMPARE(dci(0x0cc0f000), expected); // opcode = 0b1111
2306 COMPARE(dci(0x0cc00c00), expected); // opcode = 0b0000, size:Q = 0b110
2307 COMPARE(dci(0x0cc04c00), expected); // opcode = 0b0100, size:Q = 0b110
2308 COMPARE(dci(0x0cc08c00), expected); // opcode = 0b1000, size:Q = 0b110
2309
2310 // ST[1-4] (multiple structures) (post index)
2311 COMPARE(dci(0x0c801000), expected); // opcode = 0b0001
2312 COMPARE(dci(0x0c803000), expected); // opcode = 0b0011
2313 COMPARE(dci(0x0c805000), expected); // opcode = 0b0101
2314 COMPARE(dci(0x0c809000), expected); // opcode = 0b1001
2315 COMPARE(dci(0x0c80b000), expected); // opcode = 0b1011
2316 COMPARE(dci(0x0c80c000), expected); // opcode = 0b1100
2317 COMPARE(dci(0x0c80d000), expected); // opcode = 0b1101
2318 COMPARE(dci(0x0c80e000), expected); // opcode = 0b1110
2319 COMPARE(dci(0x0c80f000), expected); // opcode = 0b1111
2320 COMPARE(dci(0x0c800c00), expected); // opcode = 0b0000, size:Q = 0b110
2321 COMPARE(dci(0x0c804c00), expected); // opcode = 0b0100, size:Q = 0b110
2322 COMPARE(dci(0x0c808c00), expected); // opcode = 0b1000, size:Q = 0b110
2323
2324 CLEANUP();
2325 }
2326
2327 TEST(neon_load_store_lane) {
2328 SET_UP_MASM();
2329
2330 COMPARE(Ld1(v0.V8B(), 0, MemOperand(x15)), "ld1 {v0.b}[0], [x15]");
2331 COMPARE(Ld1(v1.V16B(), 1, MemOperand(x16)), "ld1 {v1.b}[1], [x16]");
2332 COMPARE(Ld1(v2.V4H(), 2, MemOperand(x17)), "ld1 {v2.h}[2], [x17]");
2333 COMPARE(Ld1(v3.V8H(), 3, MemOperand(x18)), "ld1 {v3.h}[3], [x18]");
2334 COMPARE(Ld1(v4.V2S(), 0, MemOperand(x19)), "ld1 {v4.s}[0], [x19]");
2335 COMPARE(Ld1(v5.V4S(), 1, MemOperand(x20)), "ld1 {v5.s}[1], [x20]");
2336 COMPARE(Ld1(v6.V2D(), 0, MemOperand(x21)), "ld1 {v6.d}[0], [x21]");
2337 COMPARE(Ld1(v7.B(), 7, MemOperand(x22)), "ld1 {v7.b}[7], [x22]");
2338 COMPARE(Ld1(v8_.B(), 15, MemOperand(x23)), "ld1 {v8.b}[15], [x23]");
2339 COMPARE(Ld1(v9.H(), 3, MemOperand(x24)), "ld1 {v9.h}[3], [x24]");
2340 COMPARE(Ld1(v10.H(), 7, MemOperand(x25)), "ld1 {v10.h}[7], [x25]");
2341 COMPARE(Ld1(v11.S(), 1, MemOperand(x26)), "ld1 {v11.s}[1], [x26]");
2342 COMPARE(Ld1(v12.S(), 3, MemOperand(x27)), "ld1 {v12.s}[3], [cp]");
2343 COMPARE(Ld1(v13.D(), 1, MemOperand(csp)), "ld1 {v13.d}[1], [csp]");
2344
2345 COMPARE(Ld1(v0.V8B(), 0, MemOperand(x15, x0, PostIndex)),
2346 "ld1 {v0.b}[0], [x15], x0");
2347 COMPARE(Ld1(v1.V16B(), 1, MemOperand(x16, 1, PostIndex)),
2348 "ld1 {v1.b}[1], [x16], #1");
2349 COMPARE(Ld1(v2.V4H(), 2, MemOperand(x17, 2, PostIndex)),
2350 "ld1 {v2.h}[2], [x17], #2");
2351 COMPARE(Ld1(v3.V8H(), 3, MemOperand(x18, x1, PostIndex)),
2352 "ld1 {v3.h}[3], [x18], x1");
2353 COMPARE(Ld1(v4.V2S(), 0, MemOperand(x19, x2, PostIndex)),
2354 "ld1 {v4.s}[0], [x19], x2");
2355 COMPARE(Ld1(v5.V4S(), 1, MemOperand(x20, 4, PostIndex)),
2356 "ld1 {v5.s}[1], [x20], #4");
2357 COMPARE(Ld1(v6.V2D(), 0, MemOperand(x21, 8, PostIndex)),
2358 "ld1 {v6.d}[0], [x21], #8");
2359 COMPARE(Ld1(v7.B(), 7, MemOperand(x22, 1, PostIndex)),
2360 "ld1 {v7.b}[7], [x22], #1");
2361 COMPARE(Ld1(v8_.B(), 15, MemOperand(x23, x3, PostIndex)),
2362 "ld1 {v8.b}[15], [x23], x3");
2363 COMPARE(Ld1(v9.H(), 3, MemOperand(x24, x4, PostIndex)),
2364 "ld1 {v9.h}[3], [x24], x4");
2365 COMPARE(Ld1(v10.H(), 7, MemOperand(x25, 2, PostIndex)),
2366 "ld1 {v10.h}[7], [x25], #2");
2367 COMPARE(Ld1(v11.S(), 1, MemOperand(x26, 4, PostIndex)),
2368 "ld1 {v11.s}[1], [x26], #4");
2369 COMPARE(Ld1(v12.S(), 3, MemOperand(x27, x5, PostIndex)),
2370 "ld1 {v12.s}[3], [cp], x5");
2371 COMPARE(Ld1(v12.S(), 3, MemOperand(x27, 4, PostIndex)),
2372 "ld1 {v12.s}[3], [cp], #4");
2373 COMPARE(Ld1(v13.D(), 1, MemOperand(csp, x6, PostIndex)),
2374 "ld1 {v13.d}[1], [csp], x6");
2375 COMPARE(Ld1(v13.D(), 1, MemOperand(csp, 8, PostIndex)),
2376 "ld1 {v13.d}[1], [csp], #8");
2377
2378 COMPARE(Ld2(v0.V8B(), v1.V8B(), 0, MemOperand(x15)),
2379 "ld2 {v0.b, v1.b}[0], [x15]");
2380 COMPARE(Ld2(v1.V16B(), v2.V16B(), 1, MemOperand(x16)),
2381 "ld2 {v1.b, v2.b}[1], [x16]");
2382 COMPARE(Ld2(v2.V4H(), v3.V4H(), 2, MemOperand(x17)),
2383 "ld2 {v2.h, v3.h}[2], [x17]");
2384 COMPARE(Ld2(v3.V8H(), v4.V8H(), 3, MemOperand(x18)),
2385 "ld2 {v3.h, v4.h}[3], [x18]");
2386 COMPARE(Ld2(v4.V2S(), v5.V2S(), 0, MemOperand(x19)),
2387 "ld2 {v4.s, v5.s}[0], [x19]");
2388 COMPARE(Ld2(v5.V4S(), v6.V4S(), 1, MemOperand(x20)),
2389 "ld2 {v5.s, v6.s}[1], [x20]");
2390 COMPARE(Ld2(v6.V2D(), v7.V2D(), 0, MemOperand(x21)),
2391 "ld2 {v6.d, v7.d}[0], [x21]");
2392 COMPARE(Ld2(v7.B(), v8_.B(), 7, MemOperand(x22)),
2393 "ld2 {v7.b, v8.b}[7], [x22]");
2394 COMPARE(Ld2(v8_.B(), v9.B(), 15, MemOperand(x23)),
2395 "ld2 {v8.b, v9.b}[15], [x23]");
2396 COMPARE(Ld2(v9.H(), v10.H(), 3, MemOperand(x24)),
2397 "ld2 {v9.h, v10.h}[3], [x24]");
2398 COMPARE(Ld2(v10.H(), v11.H(), 7, MemOperand(x25)),
2399 "ld2 {v10.h, v11.h}[7], [x25]");
2400 COMPARE(Ld2(v11.S(), v12.S(), 1, MemOperand(x26)),
2401 "ld2 {v11.s, v12.s}[1], [x26]");
2402 COMPARE(Ld2(v12.S(), v13.S(), 3, MemOperand(x27)),
2403 "ld2 {v12.s, v13.s}[3], [cp]");
2404 COMPARE(Ld2(v13.D(), v14.D(), 1, MemOperand(csp)),
2405 "ld2 {v13.d, v14.d}[1], [csp]");
2406
2407 COMPARE(Ld2(v0.V8B(), v1.V8B(), 0, MemOperand(x15, x0, PostIndex)),
2408 "ld2 {v0.b, v1.b}[0], [x15], x0");
2409 COMPARE(Ld2(v1.V16B(), v2.V16B(), 1, MemOperand(x16, 2, PostIndex)),
2410 "ld2 {v1.b, v2.b}[1], [x16], #2");
2411 COMPARE(Ld2(v2.V4H(), v3.V4H(), 2, MemOperand(x17, 4, PostIndex)),
2412 "ld2 {v2.h, v3.h}[2], [x17], #4");
2413 COMPARE(Ld2(v3.V8H(), v4.V8H(), 3, MemOperand(x18, x1, PostIndex)),
2414 "ld2 {v3.h, v4.h}[3], [x18], x1");
2415 COMPARE(Ld2(v4.V2S(), v5.V2S(), 0, MemOperand(x19, x2, PostIndex)),
2416 "ld2 {v4.s, v5.s}[0], [x19], x2");
2417 COMPARE(Ld2(v5.V4S(), v6.V4S(), 1, MemOperand(x20, 8, PostIndex)),
2418 "ld2 {v5.s, v6.s}[1], [x20], #8");
2419 COMPARE(Ld2(v6.V2D(), v7.V2D(), 0, MemOperand(x21, 16, PostIndex)),
2420 "ld2 {v6.d, v7.d}[0], [x21], #16");
2421 COMPARE(Ld2(v7.B(), v8_.B(), 7, MemOperand(x22, 2, PostIndex)),
2422 "ld2 {v7.b, v8.b}[7], [x22], #2");
2423 COMPARE(Ld2(v8_.B(), v9.B(), 15, MemOperand(x23, x3, PostIndex)),
2424 "ld2 {v8.b, v9.b}[15], [x23], x3");
2425 COMPARE(Ld2(v9.H(), v10.H(), 3, MemOperand(x24, x4, PostIndex)),
2426 "ld2 {v9.h, v10.h}[3], [x24], x4");
2427 COMPARE(Ld2(v10.H(), v11.H(), 7, MemOperand(x25, 4, PostIndex)),
2428 "ld2 {v10.h, v11.h}[7], [x25], #4");
2429 COMPARE(Ld2(v11.S(), v12.S(), 1, MemOperand(x26, 8, PostIndex)),
2430 "ld2 {v11.s, v12.s}[1], [x26], #8");
2431 COMPARE(Ld2(v12.S(), v13.S(), 3, MemOperand(x27, x5, PostIndex)),
2432 "ld2 {v12.s, v13.s}[3], [cp], x5");
2433 COMPARE(Ld2(v11.S(), v12.S(), 3, MemOperand(x26, 8, PostIndex)),
2434 "ld2 {v11.s, v12.s}[3], [x26], #8");
2435 COMPARE(Ld2(v13.D(), v14.D(), 1, MemOperand(csp, x6, PostIndex)),
2436 "ld2 {v13.d, v14.d}[1], [csp], x6");
2437 COMPARE(Ld2(v13.D(), v14.D(), 1, MemOperand(csp, 16, PostIndex)),
2438 "ld2 {v13.d, v14.d}[1], [csp], #16");
2439
2440 COMPARE(Ld3(v0.V8B(), v1.V8B(), v2.V8B(), 0, MemOperand(x15)),
2441 "ld3 {v0.b, v1.b, v2.b}[0], [x15]");
2442 COMPARE(Ld3(v1.V16B(), v2.V16B(), v3.V16B(), 1, MemOperand(x16)),
2443 "ld3 {v1.b, v2.b, v3.b}[1], [x16]");
2444 COMPARE(Ld3(v2.V4H(), v3.V4H(), v4.V4H(), 2, MemOperand(x17)),
2445 "ld3 {v2.h, v3.h, v4.h}[2], [x17]");
2446 COMPARE(Ld3(v3.V8H(), v4.V8H(), v5.V8H(), 3, MemOperand(x18)),
2447 "ld3 {v3.h, v4.h, v5.h}[3], [x18]");
2448 COMPARE(Ld3(v4.V2S(), v5.V2S(), v6.V2S(), 0, MemOperand(x19)),
2449 "ld3 {v4.s, v5.s, v6.s}[0], [x19]");
2450 COMPARE(Ld3(v5.V4S(), v6.V4S(), v7.V4S(), 1, MemOperand(x20)),
2451 "ld3 {v5.s, v6.s, v7.s}[1], [x20]");
2452 COMPARE(Ld3(v6.V2D(), v7.V2D(), v8_.V2D(), 0, MemOperand(x21)),
2453 "ld3 {v6.d, v7.d, v8.d}[0], [x21]");
2454 COMPARE(Ld3(v7.B(), v8_.B(), v9.B(), 7, MemOperand(x22)),
2455 "ld3 {v7.b, v8.b, v9.b}[7], [x22]");
2456 COMPARE(Ld3(v8_.B(), v9.B(), v10.B(), 15, MemOperand(x23)),
2457 "ld3 {v8.b, v9.b, v10.b}[15], [x23]");
2458 COMPARE(Ld3(v9.H(), v10.H(), v11.H(), 3, MemOperand(x24)),
2459 "ld3 {v9.h, v10.h, v11.h}[3], [x24]");
2460 COMPARE(Ld3(v10.H(), v11.H(), v12.H(), 7, MemOperand(x25)),
2461 "ld3 {v10.h, v11.h, v12.h}[7], [x25]");
2462 COMPARE(Ld3(v11.S(), v12.S(), v13.S(), 1, MemOperand(x26)),
2463 "ld3 {v11.s, v12.s, v13.s}[1], [x26]");
2464 COMPARE(Ld3(v12.S(), v13.S(), v14.S(), 3, MemOperand(x27)),
2465 "ld3 {v12.s, v13.s, v14.s}[3], [cp]");
2466 COMPARE(Ld3(v13.D(), v14.D(), v15.D(), 1, MemOperand(csp)),
2467 "ld3 {v13.d, v14.d, v15.d}[1], [csp]");
2468
2469 COMPARE(Ld3(v0.V8B(), v1.V8B(), v2.V8B(), 0, MemOperand(x15, x0, PostIndex)),
2470 "ld3 {v0.b, v1.b, v2.b}[0], [x15], x0");
2471 COMPARE(
2472 Ld3(v1.V16B(), v2.V16B(), v3.V16B(), 1, MemOperand(x16, 3, PostIndex)),
2473 "ld3 {v1.b, v2.b, v3.b}[1], [x16], #3");
2474 COMPARE(Ld3(v2.V4H(), v3.V4H(), v4.V4H(), 2, MemOperand(x17, 6, PostIndex)),
2475 "ld3 {v2.h, v3.h, v4.h}[2], [x17], #6");
2476 COMPARE(Ld3(v3.V8H(), v4.V8H(), v5.V8H(), 3, MemOperand(x18, x1, PostIndex)),
2477 "ld3 {v3.h, v4.h, v5.h}[3], [x18], x1");
2478 COMPARE(Ld3(v4.V2S(), v5.V2S(), v6.V2S(), 0, MemOperand(x19, x2, PostIndex)),
2479 "ld3 {v4.s, v5.s, v6.s}[0], [x19], x2");
2480 COMPARE(Ld3(v5.V4S(), v6.V4S(), v7.V4S(), 1, MemOperand(x20, 12, PostIndex)),
2481 "ld3 {v5.s, v6.s, v7.s}[1], [x20], #12");
2482 COMPARE(Ld3(v6.V2D(), v7.V2D(), v8_.V2D(), 0, MemOperand(x21, 24, PostIndex)),
2483 "ld3 {v6.d, v7.d, v8.d}[0], [x21], #24");
2484 COMPARE(Ld3(v7.B(), v8_.B(), v9.B(), 7, MemOperand(x22, 3, PostIndex)),
2485 "ld3 {v7.b, v8.b, v9.b}[7], [x22], #3");
2486 COMPARE(Ld3(v8_.B(), v9.B(), v10.B(), 15, MemOperand(x23, x3, PostIndex)),
2487 "ld3 {v8.b, v9.b, v10.b}[15], [x23], x3");
2488 COMPARE(Ld3(v9.H(), v10.H(), v11.H(), 3, MemOperand(x24, x4, PostIndex)),
2489 "ld3 {v9.h, v10.h, v11.h}[3], [x24], x4");
2490 COMPARE(Ld3(v10.H(), v11.H(), v12.H(), 7, MemOperand(x25, 6, PostIndex)),
2491 "ld3 {v10.h, v11.h, v12.h}[7], [x25], #6");
2492 COMPARE(Ld3(v11.S(), v12.S(), v13.S(), 1, MemOperand(x26, 12, PostIndex)),
2493 "ld3 {v11.s, v12.s, v13.s}[1], [x26], #12");
2494 COMPARE(Ld3(v12.S(), v13.S(), v14.S(), 3, MemOperand(x27, x5, PostIndex)),
2495 "ld3 {v12.s, v13.s, v14.s}[3], [cp], x5");
2496 COMPARE(Ld3(v12.S(), v13.S(), v14.S(), 3, MemOperand(x27, 12, PostIndex)),
2497 "ld3 {v12.s, v13.s, v14.s}[3], [cp], #12");
2498 COMPARE(Ld3(v13.D(), v14.D(), v15.D(), 1, MemOperand(csp, x6, PostIndex)),
2499 "ld3 {v13.d, v14.d, v15.d}[1], [csp], x6");
2500 COMPARE(Ld3(v13.D(), v14.D(), v15.D(), 1, MemOperand(csp, 24, PostIndex)),
2501 "ld3 {v13.d, v14.d, v15.d}[1], [csp], #24");
2502
2503 COMPARE(Ld4(v0.V8B(), v1.V8B(), v2.V8B(), v3.V8B(), 0, MemOperand(x15)),
2504 "ld4 {v0.b, v1.b, v2.b, v3.b}[0], [x15]");
2505 COMPARE(Ld4(v1.V16B(), v2.V16B(), v3.V16B(), v4.V16B(), 1, MemOperand(x16)),
2506 "ld4 {v1.b, v2.b, v3.b, v4.b}[1], [x16]");
2507 COMPARE(Ld4(v2.V4H(), v3.V4H(), v4.V4H(), v5.V4H(), 2, MemOperand(x17)),
2508 "ld4 {v2.h, v3.h, v4.h, v5.h}[2], [x17]");
2509 COMPARE(Ld4(v3.V8H(), v4.V8H(), v5.V8H(), v6.V8H(), 3, MemOperand(x18)),
2510 "ld4 {v3.h, v4.h, v5.h, v6.h}[3], [x18]");
2511 COMPARE(Ld4(v4.V2S(), v5.V2S(), v6.V2S(), v7.V2S(), 0, MemOperand(x19)),
2512 "ld4 {v4.s, v5.s, v6.s, v7.s}[0], [x19]");
2513 COMPARE(Ld4(v5.V4S(), v6.V4S(), v7.V4S(), v8_.V4S(), 1, MemOperand(x20)),
2514 "ld4 {v5.s, v6.s, v7.s, v8.s}[1], [x20]");
2515 COMPARE(Ld4(v6.V2D(), v7.V2D(), v8_.V2D(), v9.V2D(), 0, MemOperand(x21)),
2516 "ld4 {v6.d, v7.d, v8.d, v9.d}[0], [x21]");
2517 COMPARE(Ld4(v7.B(), v8_.B(), v9.B(), v10.B(), 7, MemOperand(x22)),
2518 "ld4 {v7.b, v8.b, v9.b, v10.b}[7], [x22]");
2519 COMPARE(Ld4(v8_.B(), v9.B(), v10.B(), v11.B(), 15, MemOperand(x23)),
2520 "ld4 {v8.b, v9.b, v10.b, v11.b}[15], [x23]");
2521 COMPARE(Ld4(v9.H(), v10.H(), v11.H(), v12.H(), 3, MemOperand(x24)),
2522 "ld4 {v9.h, v10.h, v11.h, v12.h}[3], [x24]");
2523 COMPARE(Ld4(v10.H(), v11.H(), v12.H(), v13.H(), 7, MemOperand(x25)),
2524 "ld4 {v10.h, v11.h, v12.h, v13.h}[7], [x25]");
2525 COMPARE(Ld4(v11.S(), v12.S(), v13.S(), v14.S(), 1, MemOperand(x26)),
2526 "ld4 {v11.s, v12.s, v13.s, v14.s}[1], [x26]");
2527 COMPARE(Ld4(v12.S(), v13.S(), v14.S(), v15.S(), 3, MemOperand(x27)),
2528 "ld4 {v12.s, v13.s, v14.s, v15.s}[3], [cp]");
2529 COMPARE(Ld4(v13.D(), v14.D(), v15.D(), v16.D(), 1, MemOperand(csp)),
2530 "ld4 {v13.d, v14.d, v15.d, v16.d}[1], [csp]");
2531
2532 COMPARE(Ld4(v0.V8B(), v1.V8B(), v2.V8B(), v3.V8B(), 0,
2533 MemOperand(x15, x0, PostIndex)),
2534 "ld4 {v0.b, v1.b, v2.b, v3.b}[0], [x15], x0");
2535 COMPARE(Ld4(v1.V16B(), v2.V16B(), v3.V16B(), v4.V16B(), 1,
2536 MemOperand(x16, 4, PostIndex)),
2537 "ld4 {v1.b, v2.b, v3.b, v4.b}[1], [x16], #4");
2538 COMPARE(Ld4(v2.V4H(), v3.V4H(), v4.V4H(), v5.V4H(), 2,
2539 MemOperand(x17, 8, PostIndex)),
2540 "ld4 {v2.h, v3.h, v4.h, v5.h}[2], [x17], #8");
2541 COMPARE(Ld4(v3.V8H(), v4.V8H(), v5.V8H(), v6.V8H(), 3,
2542 MemOperand(x18, x1, PostIndex)),
2543 "ld4 {v3.h, v4.h, v5.h, v6.h}[3], [x18], x1");
2544 COMPARE(Ld4(v4.V2S(), v5.V2S(), v6.V2S(), v7.V2S(), 0,
2545 MemOperand(x19, x2, PostIndex)),
2546 "ld4 {v4.s, v5.s, v6.s, v7.s}[0], [x19], x2");
2547 COMPARE(Ld4(v5.V4S(), v6.V4S(), v7.V4S(), v8_.V4S(), 1,
2548 MemOperand(x20, 16, PostIndex)),
2549 "ld4 {v5.s, v6.s, v7.s, v8.s}[1], [x20], #16");
2550 COMPARE(Ld4(v6.V2D(), v7.V2D(), v8_.V2D(), v9.V2D(), 0,
2551 MemOperand(x21, 32, PostIndex)),
2552 "ld4 {v6.d, v7.d, v8.d, v9.d}[0], [x21], #32");
2553 COMPARE(
2554 Ld4(v7.B(), v8_.B(), v9.B(), v10.B(), 7, MemOperand(x22, 4, PostIndex)),
2555 "ld4 {v7.b, v8.b, v9.b, v10.b}[7], [x22], #4");
2556 COMPARE(Ld4(v8_.B(), v9.B(), v10.B(), v11.B(), 15,
2557 MemOperand(x23, x3, PostIndex)),
2558 "ld4 {v8.b, v9.b, v10.b, v11.b}[15], [x23], x3");
2559 COMPARE(
2560 Ld4(v9.H(), v10.H(), v11.H(), v12.H(), 3, MemOperand(x24, x4, PostIndex)),
2561 "ld4 {v9.h, v10.h, v11.h, v12.h}[3], [x24], x4");
2562 COMPARE(
2563 Ld4(v10.H(), v11.H(), v12.H(), v13.H(), 7, MemOperand(x25, 8, PostIndex)),
2564 "ld4 {v10.h, v11.h, v12.h, v13.h}[7], [x25], #8");
2565 COMPARE(Ld4(v11.S(), v12.S(), v13.S(), v14.S(), 1,
2566 MemOperand(x26, 16, PostIndex)),
2567 "ld4 {v11.s, v12.s, v13.s, v14.s}[1], [x26], #16");
2568 COMPARE(Ld4(v12.S(), v13.S(), v14.S(), v15.S(), 3,
2569 MemOperand(x27, x5, PostIndex)),
2570 "ld4 {v12.s, v13.s, v14.s, v15.s}[3], [cp], x5");
2571 COMPARE(Ld4(v11.S(), v12.S(), v13.S(), v14.S(), 3,
2572 MemOperand(x26, 16, PostIndex)),
2573 "ld4 {v11.s, v12.s, v13.s, v14.s}[3], [x26], #16");
2574 COMPARE(Ld4(v13.D(), v14.D(), v15.D(), v16.D(), 1,
2575 MemOperand(csp, x6, PostIndex)),
2576 "ld4 {v13.d, v14.d, v15.d, v16.d}[1], [csp], x6");
2577 COMPARE(Ld4(v13.D(), v14.D(), v15.D(), v16.D(), 1,
2578 MemOperand(csp, 32, PostIndex)),
2579 "ld4 {v13.d, v14.d, v15.d, v16.d}[1], [csp], #32");
2580
2581 COMPARE(St1(v0.V8B(), 0, MemOperand(x15)), "st1 {v0.b}[0], [x15]");
2582 COMPARE(St1(v1.V16B(), 1, MemOperand(x16)), "st1 {v1.b}[1], [x16]");
2583 COMPARE(St1(v2.V4H(), 2, MemOperand(x17)), "st1 {v2.h}[2], [x17]");
2584 COMPARE(St1(v3.V8H(), 3, MemOperand(x18)), "st1 {v3.h}[3], [x18]");
2585 COMPARE(St1(v4.V2S(), 0, MemOperand(x19)), "st1 {v4.s}[0], [x19]");
2586 COMPARE(St1(v5.V4S(), 1, MemOperand(x20)), "st1 {v5.s}[1], [x20]");
2587 COMPARE(St1(v6.V2D(), 0, MemOperand(x21)), "st1 {v6.d}[0], [x21]");
2588 COMPARE(St1(v7.B(), 7, MemOperand(x22)), "st1 {v7.b}[7], [x22]");
2589 COMPARE(St1(v8_.B(), 15, MemOperand(x23)), "st1 {v8.b}[15], [x23]");
2590 COMPARE(St1(v9.H(), 3, MemOperand(x24)), "st1 {v9.h}[3], [x24]");
2591 COMPARE(St1(v10.H(), 7, MemOperand(x25)), "st1 {v10.h}[7], [x25]");
2592 COMPARE(St1(v11.S(), 1, MemOperand(x26)), "st1 {v11.s}[1], [x26]");
2593 COMPARE(St1(v12.S(), 3, MemOperand(x27)), "st1 {v12.s}[3], [cp]");
2594 COMPARE(St1(v13.D(), 1, MemOperand(csp)), "st1 {v13.d}[1], [csp]");
2595
2596 COMPARE(St1(v0.V8B(), 0, MemOperand(x15, x0, PostIndex)),
2597 "st1 {v0.b}[0], [x15], x0");
2598 COMPARE(St1(v1.V16B(), 1, MemOperand(x16, 1, PostIndex)),
2599 "st1 {v1.b}[1], [x16], #1");
2600 COMPARE(St1(v2.V4H(), 2, MemOperand(x17, 2, PostIndex)),
2601 "st1 {v2.h}[2], [x17], #2");
2602 COMPARE(St1(v3.V8H(), 3, MemOperand(x18, x1, PostIndex)),
2603 "st1 {v3.h}[3], [x18], x1");
2604 COMPARE(St1(v4.V2S(), 0, MemOperand(x19, x2, PostIndex)),
2605 "st1 {v4.s}[0], [x19], x2");
2606 COMPARE(St1(v5.V4S(), 1, MemOperand(x20, 4, PostIndex)),
2607 "st1 {v5.s}[1], [x20], #4");
2608 COMPARE(St1(v6.V2D(), 0, MemOperand(x21, 8, PostIndex)),
2609 "st1 {v6.d}[0], [x21], #8");
2610 COMPARE(St1(v7.B(), 7, MemOperand(x22, 1, PostIndex)),
2611 "st1 {v7.b}[7], [x22], #1");
2612 COMPARE(St1(v8_.B(), 15, MemOperand(x23, x3, PostIndex)),
2613 "st1 {v8.b}[15], [x23], x3");
2614 COMPARE(St1(v9.H(), 3, MemOperand(x24, x4, PostIndex)),
2615 "st1 {v9.h}[3], [x24], x4");
2616 COMPARE(St1(v10.H(), 7, MemOperand(x25, 2, PostIndex)),
2617 "st1 {v10.h}[7], [x25], #2");
2618 COMPARE(St1(v11.S(), 1, MemOperand(x26, 4, PostIndex)),
2619 "st1 {v11.s}[1], [x26], #4");
2620 COMPARE(St1(v12.S(), 3, MemOperand(x27, x5, PostIndex)),
2621 "st1 {v12.s}[3], [cp], x5");
2622 COMPARE(St1(v13.D(), 1, MemOperand(csp, x6, PostIndex)),
2623 "st1 {v13.d}[1], [csp], x6");
2624 COMPARE(St2(v0.V8B(), v1.V8B(), 0, MemOperand(x15, x0, PostIndex)),
2625 "st2 {v0.b, v1.b}[0], [x15], x0");
2626 COMPARE(St2(v1.V16B(), v2.V16B(), 1, MemOperand(x16, 2, PostIndex)),
2627 "st2 {v1.b, v2.b}[1], [x16], #2");
2628 COMPARE(St2(v2.V4H(), v3.V4H(), 2, MemOperand(x17, 4, PostIndex)),
2629 "st2 {v2.h, v3.h}[2], [x17], #4");
2630 COMPARE(St2(v3.V8H(), v4.V8H(), 3, MemOperand(x18, x1, PostIndex)),
2631 "st2 {v3.h, v4.h}[3], [x18], x1");
2632 COMPARE(St2(v4.V2S(), v5.V2S(), 0, MemOperand(x19, x2, PostIndex)),
2633 "st2 {v4.s, v5.s}[0], [x19], x2");
2634 COMPARE(St2(v5.V4S(), v6.V4S(), 1, MemOperand(x20, 8, PostIndex)),
2635 "st2 {v5.s, v6.s}[1], [x20], #8");
2636 COMPARE(St2(v6.V2D(), v7.V2D(), 0, MemOperand(x21, 16, PostIndex)),
2637 "st2 {v6.d, v7.d}[0], [x21], #16");
2638 COMPARE(St2(v7.B(), v8_.B(), 7, MemOperand(x22, 2, PostIndex)),
2639 "st2 {v7.b, v8.b}[7], [x22], #2");
2640 COMPARE(St2(v8_.B(), v9.B(), 15, MemOperand(x23, x3, PostIndex)),
2641 "st2 {v8.b, v9.b}[15], [x23], x3");
2642 COMPARE(St2(v9.H(), v10.H(), 3, MemOperand(x24, x4, PostIndex)),
2643 "st2 {v9.h, v10.h}[3], [x24], x4");
2644 COMPARE(St2(v10.H(), v11.H(), 7, MemOperand(x25, 4, PostIndex)),
2645 "st2 {v10.h, v11.h}[7], [x25], #4");
2646 COMPARE(St2(v11.S(), v12.S(), 1, MemOperand(x26, 8, PostIndex)),
2647 "st2 {v11.s, v12.s}[1], [x26], #8");
2648 COMPARE(St2(v12.S(), v13.S(), 3, MemOperand(x27, x5, PostIndex)),
2649 "st2 {v12.s, v13.s}[3], [cp], x5");
2650 COMPARE(St2(v13.D(), v14.D(), 1, MemOperand(csp, x6, PostIndex)),
2651 "st2 {v13.d, v14.d}[1], [csp], x6");
2652 COMPARE(St3(VLIST3(v0.V8B()), 0, MemOperand(x15, x0, PostIndex)),
2653 "st3 {v0.b, v1.b, v2.b}[0], [x15], x0");
2654 COMPARE(St3(VLIST3(v1.V16B()), 1, MemOperand(x16, 3, PostIndex)),
2655 "st3 {v1.b, v2.b, v3.b}[1], [x16], #3");
2656 COMPARE(St3(VLIST3(v2.V4H()), 2, MemOperand(x17, 6, PostIndex)),
2657 "st3 {v2.h, v3.h, v4.h}[2], [x17], #6");
2658 COMPARE(St3(VLIST3(v3.V8H()), 3, MemOperand(x18, x1, PostIndex)),
2659 "st3 {v3.h, v4.h, v5.h}[3], [x18], x1");
2660 COMPARE(St3(VLIST3(v4.V2S()), 0, MemOperand(x19, x2, PostIndex)),
2661 "st3 {v4.s, v5.s, v6.s}[0], [x19], x2");
2662 COMPARE(St3(VLIST3(v5.V4S()), 1, MemOperand(x20, 12, PostIndex)),
2663 "st3 {v5.s, v6.s, v7.s}[1], [x20], #12");
2664 COMPARE(St3(VLIST3(v6.V2D()), 0, MemOperand(x21, 24, PostIndex)),
2665 "st3 {v6.d, v7.d, v8.d}[0], [x21], #24");
2666 COMPARE(St3(VLIST3(v7.B()), 7, MemOperand(x22, 3, PostIndex)),
2667 "st3 {v7.b, v8.b, v9.b}[7], [x22], #3");
2668 COMPARE(St3(VLIST3(v8_.B()), 15, MemOperand(x23, x3, PostIndex)),
2669 "st3 {v8.b, v9.b, v10.b}[15], [x23], x3");
2670 COMPARE(St3(VLIST3(v9.H()), 3, MemOperand(x24, x4, PostIndex)),
2671 "st3 {v9.h, v10.h, v11.h}[3], [x24], x4");
2672 COMPARE(St3(VLIST3(v10.H()), 7, MemOperand(x25, 6, PostIndex)),
2673 "st3 {v10.h, v11.h, v12.h}[7], [x25], #6");
2674 COMPARE(St3(VLIST3(v11.S()), 1, MemOperand(x26, 12, PostIndex)),
2675 "st3 {v11.s, v12.s, v13.s}[1], [x26], #12");
2676 COMPARE(St3(VLIST3(v12.S()), 3, MemOperand(x27, x5, PostIndex)),
2677 "st3 {v12.s, v13.s, v14.s}[3], [cp], x5");
2678 COMPARE(St3(VLIST3(v13.D()), 1, MemOperand(csp, x6, PostIndex)),
2679 "st3 {v13.d, v14.d, v15.d}[1], [csp], x6");
2680
2681 COMPARE(St4(VLIST4(v0.V8B()), 0, MemOperand(x15, x0, PostIndex)),
2682 "st4 {v0.b, v1.b, v2.b, v3.b}[0], [x15], x0");
2683 COMPARE(St4(VLIST4(v1.V16B()), 1, MemOperand(x16, 4, PostIndex)),
2684 "st4 {v1.b, v2.b, v3.b, v4.b}[1], [x16], #4");
2685 COMPARE(St4(VLIST4(v2.V4H()), 2, MemOperand(x17, 8, PostIndex)),
2686 "st4 {v2.h, v3.h, v4.h, v5.h}[2], [x17], #8");
2687 COMPARE(St4(VLIST4(v3.V8H()), 3, MemOperand(x18, x1, PostIndex)),
2688 "st4 {v3.h, v4.h, v5.h, v6.h}[3], [x18], x1");
2689 COMPARE(St4(VLIST4(v4.V2S()), 0, MemOperand(x19, x2, PostIndex)),
2690 "st4 {v4.s, v5.s, v6.s, v7.s}[0], [x19], x2");
2691 COMPARE(St4(VLIST4(v5.V4S()), 1, MemOperand(x20, 16, PostIndex)),
2692 "st4 {v5.s, v6.s, v7.s, v8.s}[1], [x20], #16");
2693 COMPARE(St4(VLIST4(v6.V2D()), 0, MemOperand(x21, 32, PostIndex)),
2694 "st4 {v6.d, v7.d, v8.d, v9.d}[0], [x21], #32");
2695 COMPARE(St4(VLIST4(v7.B()), 7, MemOperand(x22, 4, PostIndex)),
2696 "st4 {v7.b, v8.b, v9.b, v10.b}[7], [x22], #4");
2697 COMPARE(St4(VLIST4(v8_.B()), 15, MemOperand(x23, x3, PostIndex)),
2698 "st4 {v8.b, v9.b, v10.b, v11.b}[15], [x23], x3");
2699 COMPARE(St4(VLIST4(v9.H()), 3, MemOperand(x24, x4, PostIndex)),
2700 "st4 {v9.h, v10.h, v11.h, v12.h}[3], [x24], x4");
2701 COMPARE(St4(VLIST4(v10.H()), 7, MemOperand(x25, 8, PostIndex)),
2702 "st4 {v10.h, v11.h, v12.h, v13.h}[7], [x25], #8");
2703 COMPARE(St4(VLIST4(v11.S()), 1, MemOperand(x26, 16, PostIndex)),
2704 "st4 {v11.s, v12.s, v13.s, v14.s}[1], [x26], #16");
2705 COMPARE(St4(VLIST4(v12.S()), 3, MemOperand(x27, x5, PostIndex)),
2706 "st4 {v12.s, v13.s, v14.s, v15.s}[3], [cp], x5");
2707 COMPARE(St4(VLIST4(v13.D()), 1, MemOperand(csp, x6, PostIndex)),
2708 "st4 {v13.d, v14.d, v15.d, v16.d}[1], [csp], x6");
2709
2710 CLEANUP();
2711 }
2712
2713 TEST(neon_load_store_lane_unallocated) {
2714 SET_UP_MASM();
2715
2716 const char* expected = "unallocated (NEONLoadStoreSingleStruct)";
2717 // LD1 (single structure) (no offset)
2718 COMPARE(dci(0x0d404400), expected); // .h, size<0> = 1
2719 COMPARE(dci(0x0d408800), expected); // .s, size<1> = 1
2720 COMPARE(dci(0x0d409400), expected); // .d, size<0> = 1, S = 1
2721 // LD2 (single structure) (no offset)
2722 COMPARE(dci(0x0d604400), expected); // .h, size<0> = 1
2723 COMPARE(dci(0x0d608800), expected); // .s, size<1> = 1
2724 COMPARE(dci(0x0d609400), expected); // .d, size<0> = 1, S = 1
2725 // LD3 (single structure) (no offset)
2726 COMPARE(dci(0x0d406400), expected); // .h, size<0> = 1
2727 COMPARE(dci(0x0d40a800), expected); // .s, size<1> = 1
2728 COMPARE(dci(0x0d40b400), expected); // .d, size<0> = 1, S = 1
2729 // LD4 (single structure) (no offset)
2730 COMPARE(dci(0x0d606400), expected); // .h, size<0> = 1
2731 COMPARE(dci(0x0d60a800), expected); // .s, size<1> = 1
2732 COMPARE(dci(0x0d60b400), expected); // .d, size<0> = 1, S = 1
2733 // ST1 (single structure) (no offset)
2734 COMPARE(dci(0x0d004400), expected); // .h, size<0> = 1
2735 COMPARE(dci(0x0d008800), expected); // .s, size<1> = 1
2736 COMPARE(dci(0x0d009400), expected); // .d, size<0> = 1, S = 1
2737 // ST2 (single structure) (no offset)
2738 COMPARE(dci(0x0d204400), expected); // .h, size<0> = 1
2739 COMPARE(dci(0x0d208800), expected); // .s, size<1> = 1
2740 COMPARE(dci(0x0d209400), expected); // .d, size<0> = 1, S = 1
2741 // ST3 (single structure) (no offset)
2742 COMPARE(dci(0x0d006400), expected); // .h, size<0> = 1
2743 COMPARE(dci(0x0d00a800), expected); // .s, size<1> = 1
2744 COMPARE(dci(0x0d00b400), expected); // .d, size<0> = 1, S = 1
2745 // ST4 (single structure) (no offset)
2746 COMPARE(dci(0x0d206400), expected); // .h, size<0> = 1
2747 COMPARE(dci(0x0d20a800), expected); // .s, size<1> = 1
2748 COMPARE(dci(0x0d20b400), expected); // .d, size<0> = 1, S = 1
2749
2750 expected = "unallocated (NEONLoadStoreSingleStructPostIndex)";
2751 // LD1 (single structure) (post index)
2752 COMPARE(dci(0x0dc04400), expected); // .h, size<0> = 1
2753 COMPARE(dci(0x0dc08800), expected); // .s, size<1> = 1
2754 COMPARE(dci(0x0dc09400), expected); // .d, size<0> = 1, S = 1
2755 // LD2 (single structure) (post index)
2756 COMPARE(dci(0x0de04400), expected); // .h, size<0> = 1
2757 COMPARE(dci(0x0de08800), expected); // .s, size<1> = 1
2758 COMPARE(dci(0x0de09400), expected); // .d, size<0> = 1, S = 1
2759 // LD3 (single structure) (post index)
2760 COMPARE(dci(0x0dc06400), expected); // .h, size<0> = 1
2761 COMPARE(dci(0x0dc0a800), expected); // .s, size<1> = 1
2762 COMPARE(dci(0x0dc0b400), expected); // .d, size<0> = 1, S = 1
2763 // LD4 (single structure) (post index)
2764 COMPARE(dci(0x0de06400), expected); // .h, size<0> = 1
2765 COMPARE(dci(0x0de0a800), expected); // .s, size<1> = 1
2766 COMPARE(dci(0x0de0b400), expected); // .d, size<0> = 1, S = 1
2767 // ST1 (single structure) (post index)
2768 COMPARE(dci(0x0d804400), expected); // .h, size<0> = 1
2769 COMPARE(dci(0x0d808800), expected); // .s, size<1> = 1
2770 COMPARE(dci(0x0d809400), expected); // .d, size<0> = 1, S = 1
2771 // ST2 (single structure) (post index)
2772 COMPARE(dci(0x0da04400), expected); // .h, size<0> = 1
2773 COMPARE(dci(0x0da08800), expected); // .s, size<1> = 1
2774 COMPARE(dci(0x0da09400), expected); // .d, size<0> = 1, S = 1
2775 // ST3 (single structure) (post index)
2776 COMPARE(dci(0x0d806400), expected); // .h, size<0> = 1
2777 COMPARE(dci(0x0d80a800), expected); // .s, size<1> = 1
2778 COMPARE(dci(0x0d80b400), expected); // .d, size<0> = 1, S = 1
2779 // ST4 (single structure) (post index)
2780 COMPARE(dci(0x0da06400), expected); // .h, size<0> = 1
2781 COMPARE(dci(0x0da0a800), expected); // .s, size<1> = 1
2782 COMPARE(dci(0x0da0b400), expected); // .d, size<0> = 1, S = 1
2783
2784 CLEANUP();
2785 }
2786
2787 TEST(neon_load_all_lanes) {
2788 SET_UP_MASM();
2789
2790 COMPARE(Ld1r(v14.V8B(), MemOperand(x0)), "ld1r {v14.8b}, [x0]");
2791 COMPARE(Ld1r(v15.V16B(), MemOperand(x1)), "ld1r {v15.16b}, [x1]");
2792 COMPARE(Ld1r(v16.V4H(), MemOperand(x2)), "ld1r {v16.4h}, [x2]");
2793 COMPARE(Ld1r(v17.V8H(), MemOperand(x3)), "ld1r {v17.8h}, [x3]");
2794 COMPARE(Ld1r(v18.V2S(), MemOperand(x4)), "ld1r {v18.2s}, [x4]");
2795 COMPARE(Ld1r(v19.V4S(), MemOperand(x5)), "ld1r {v19.4s}, [x5]");
2796 COMPARE(Ld1r(v20.V2D(), MemOperand(csp)), "ld1r {v20.2d}, [csp]");
2797 COMPARE(Ld1r(v21.V1D(), MemOperand(x30)), "ld1r {v21.1d}, [lr]");
2798
2799 COMPARE(Ld1r(v22.V8B(), MemOperand(x6, 1, PostIndex)),
2800 "ld1r {v22.8b}, [x6], #1");
2801 COMPARE(Ld1r(v23.V16B(), MemOperand(x7, x16, PostIndex)),
2802 "ld1r {v23.16b}, [x7], x16");
2803 COMPARE(Ld1r(v24.V4H(), MemOperand(x8, x17, PostIndex)),
2804 "ld1r {v24.4h}, [x8], x17");
2805 COMPARE(Ld1r(v25.V8H(), MemOperand(x9, 2, PostIndex)),
2806 "ld1r {v25.8h}, [x9], #2");
2807 COMPARE(Ld1r(v26.V2S(), MemOperand(x10, 4, PostIndex)),
2808 "ld1r {v26.2s}, [x10], #4");
2809 COMPARE(Ld1r(v27.V4S(), MemOperand(x11, x18, PostIndex)),
2810 "ld1r {v27.4s}, [x11], x18");
2811 COMPARE(Ld1r(v28.V2D(), MemOperand(x12, 8, PostIndex)),
2812 "ld1r {v28.2d}, [x12], #8");
2813 COMPARE(Ld1r(v29.V1D(), MemOperand(x13, 8, PostIndex)),
2814 "ld1r {v29.1d}, [x13], #8");
2815
2816 COMPARE(Ld2r(v14.V8B(), v15.V8B(), MemOperand(x0)),
2817 "ld2r {v14.8b, v15.8b}, [x0]");
2818 COMPARE(Ld2r(v15.V16B(), v16.V16B(), MemOperand(x1)),
2819 "ld2r {v15.16b, v16.16b}, [x1]");
2820 COMPARE(Ld2r(v16.V4H(), v17.V4H(), MemOperand(x2)),
2821 "ld2r {v16.4h, v17.4h}, [x2]");
2822 COMPARE(Ld2r(v17.V8H(), v18.V8H(), MemOperand(x3)),
2823 "ld2r {v17.8h, v18.8h}, [x3]");
2824 COMPARE(Ld2r(v18.V2S(), v19.V2S(), MemOperand(x4)),
2825 "ld2r {v18.2s, v19.2s}, [x4]");
2826 COMPARE(Ld2r(v19.V4S(), v20.V4S(), MemOperand(x5)),
2827 "ld2r {v19.4s, v20.4s}, [x5]");
2828 COMPARE(Ld2r(v20.V2D(), v21.V2D(), MemOperand(csp)),
2829 "ld2r {v20.2d, v21.2d}, [csp]");
2830 COMPARE(Ld2r(v21.V8B(), v22.V8B(), MemOperand(x6, 2, PostIndex)),
2831 "ld2r {v21.8b, v22.8b}, [x6], #2");
2832 COMPARE(Ld2r(v22.V16B(), v23.V16B(), MemOperand(x7, x16, PostIndex)),
2833 "ld2r {v22.16b, v23.16b}, [x7], x16");
2834 COMPARE(Ld2r(v23.V4H(), v24.V4H(), MemOperand(x8, x17, PostIndex)),
2835 "ld2r {v23.4h, v24.4h}, [x8], x17");
2836 COMPARE(Ld2r(v24.V8H(), v25.V8H(), MemOperand(x9, 4, PostIndex)),
2837 "ld2r {v24.8h, v25.8h}, [x9], #4");
2838 COMPARE(Ld2r(v25.V2S(), v26.V2S(), MemOperand(x10, 8, PostIndex)),
2839 "ld2r {v25.2s, v26.2s}, [x10], #8");
2840 COMPARE(Ld2r(v26.V4S(), v27.V4S(), MemOperand(x11, x18, PostIndex)),
2841 "ld2r {v26.4s, v27.4s}, [x11], x18");
2842 COMPARE(Ld2r(v27.V2D(), v28.V2D(), MemOperand(x12, 16, PostIndex)),
2843 "ld2r {v27.2d, v28.2d}, [x12], #16");
2844
2845 COMPARE(Ld3r(v14.V8B(), v15.V8B(), v16.V8B(), MemOperand(x0)),
2846 "ld3r {v14.8b, v15.8b, v16.8b}, [x0]");
2847 COMPARE(Ld3r(v15.V16B(), v16.V16B(), v17.V16B(), MemOperand(x1)),
2848 "ld3r {v15.16b, v16.16b, v17.16b}, [x1]");
2849 COMPARE(Ld3r(v16.V4H(), v17.V4H(), v18.V4H(), MemOperand(x2)),
2850 "ld3r {v16.4h, v17.4h, v18.4h}, [x2]");
2851 COMPARE(Ld3r(v17.V8H(), v18.V8H(), v19.V8H(), MemOperand(x3)),
2852 "ld3r {v17.8h, v18.8h, v19.8h}, [x3]");
2853 COMPARE(Ld3r(v18.V2S(), v19.V2S(), v20.V2S(), MemOperand(x4)),
2854 "ld3r {v18.2s, v19.2s, v20.2s}, [x4]");
2855 COMPARE(Ld3r(v19.V4S(), v20.V4S(), v21.V4S(), MemOperand(x5)),
2856 "ld3r {v19.4s, v20.4s, v21.4s}, [x5]");
2857 COMPARE(Ld3r(v20.V2D(), v21.V2D(), v22.V2D(), MemOperand(csp)),
2858 "ld3r {v20.2d, v21.2d, v22.2d}, [csp]");
2859 COMPARE(Ld3r(v21.V8B(), v22.V8B(), v23.V8B(), MemOperand(x6, 3, PostIndex)),
2860 "ld3r {v21.8b, v22.8b, v23.8b}, [x6], #3");
2861 COMPARE(
2862 Ld3r(v22.V16B(), v23.V16B(), v24.V16B(), MemOperand(x7, x16, PostIndex)),
2863 "ld3r {v22.16b, v23.16b, v24.16b}, [x7], x16");
2864 COMPARE(Ld3r(v23.V4H(), v24.V4H(), v25.V4H(), MemOperand(x8, x17, PostIndex)),
2865 "ld3r {v23.4h, v24.4h, v25.4h}, [x8], x17");
2866 COMPARE(Ld3r(v24.V8H(), v25.V8H(), v26.V8H(), MemOperand(x9, 6, PostIndex)),
2867 "ld3r {v24.8h, v25.8h, v26.8h}, [x9], #6");
2868 COMPARE(Ld3r(v25.V2S(), v26.V2S(), v27.V2S(), MemOperand(x10, 12, PostIndex)),
2869 "ld3r {v25.2s, v26.2s, v27.2s}, [x10], #12");
2870 COMPARE(
2871 Ld3r(v26.V4S(), v27.V4S(), v28.V4S(), MemOperand(x11, x18, PostIndex)),
2872 "ld3r {v26.4s, v27.4s, v28.4s}, [x11], x18");
2873 COMPARE(Ld3r(v27.V2D(), v28.V2D(), v29.V2D(), MemOperand(x12, 24, PostIndex)),
2874 "ld3r {v27.2d, v28.2d, v29.2d}, [x12], #24");
2875
2876 COMPARE(Ld4r(v14.V8B(), v15.V8B(), v16.V8B(), v17.V8B(), MemOperand(x0)),
2877 "ld4r {v14.8b, v15.8b, v16.8b, v17.8b}, [x0]");
2878 COMPARE(Ld4r(v15.V16B(), v16.V16B(), v17.V16B(), v18.V16B(), MemOperand(x1)),
2879 "ld4r {v15.16b, v16.16b, v17.16b, v18.16b}, [x1]");
2880 COMPARE(Ld4r(v16.V4H(), v17.V4H(), v18.V4H(), v19.V4H(), MemOperand(x2)),
2881 "ld4r {v16.4h, v17.4h, v18.4h, v19.4h}, [x2]");
2882 COMPARE(Ld4r(v17.V8H(), v18.V8H(), v19.V8H(), v20.V8H(), MemOperand(x3)),
2883 "ld4r {v17.8h, v18.8h, v19.8h, v20.8h}, [x3]");
2884 COMPARE(Ld4r(v18.V2S(), v19.V2S(), v20.V2S(), v21.V2S(), MemOperand(x4)),
2885 "ld4r {v18.2s, v19.2s, v20.2s, v21.2s}, [x4]");
2886 COMPARE(Ld4r(v19.V4S(), v20.V4S(), v21.V4S(), v22.V4S(), MemOperand(x5)),
2887 "ld4r {v19.4s, v20.4s, v21.4s, v22.4s}, [x5]");
2888 COMPARE(Ld4r(v20.V2D(), v21.V2D(), v22.V2D(), v23.V2D(), MemOperand(csp)),
2889 "ld4r {v20.2d, v21.2d, v22.2d, v23.2d}, [csp]");
2890 COMPARE(Ld4r(v21.V8B(), v22.V8B(), v23.V8B(), v24.V8B(),
2891 MemOperand(x6, 4, PostIndex)),
2892 "ld4r {v21.8b, v22.8b, v23.8b, v24.8b}, [x6], #4");
2893 COMPARE(Ld4r(v22.V16B(), v23.V16B(), v24.V16B(), v25.V16B(),
2894 MemOperand(x7, x16, PostIndex)),
2895 "ld4r {v22.16b, v23.16b, v24.16b, v25.16b}, [x7], x16");
2896 COMPARE(Ld4r(v23.V4H(), v24.V4H(), v25.V4H(), v26.V4H(),
2897 MemOperand(x8, x17, PostIndex)),
2898 "ld4r {v23.4h, v24.4h, v25.4h, v26.4h}, [x8], x17");
2899 COMPARE(Ld4r(v24.V8H(), v25.V8H(), v26.V8H(), v27.V8H(),
2900 MemOperand(x9, 8, PostIndex)),
2901 "ld4r {v24.8h, v25.8h, v26.8h, v27.8h}, [x9], #8");
2902 COMPARE(Ld4r(v25.V2S(), v26.V2S(), v27.V2S(), v28.V2S(),
2903 MemOperand(x10, 16, PostIndex)),
2904 "ld4r {v25.2s, v26.2s, v27.2s, v28.2s}, [x10], #16");
2905 COMPARE(Ld4r(v26.V4S(), v27.V4S(), v28.V4S(), v29.V4S(),
2906 MemOperand(x11, x18, PostIndex)),
2907 "ld4r {v26.4s, v27.4s, v28.4s, v29.4s}, [x11], x18");
2908 COMPARE(Ld4r(v27.V2D(), v28.V2D(), v29.V2D(), v30.V2D(),
2909 MemOperand(x12, 32, PostIndex)),
2910 "ld4r {v27.2d, v28.2d, v29.2d, v30.2d}, [x12], #32");
2911
2912 CLEANUP();
2913 }
2914
2915 TEST(neon_load_all_lanes_unallocated) {
2916 SET_UP_MASM();
2917
2918 const char* expected = "unallocated (NEONLoadStoreSingleStruct)";
2919 // LD1R (single structure) (no offset)
2920 COMPARE(dci(0x0d00c000), expected); // L = 0
2921 COMPARE(dci(0x0d40d000), expected); // S = 1
2922 // LD2R (single structure) (no offset)
2923 COMPARE(dci(0x0d20c000), expected); // L = 0
2924 COMPARE(dci(0x0d60d000), expected); // S = 1
2925 // LD3R (single structure) (no offset)
2926 COMPARE(dci(0x0d00e000), expected); // L = 0
2927 COMPARE(dci(0x0d40f000), expected); // S = 1
2928 // LD4R (single structure) (no offset)
2929 COMPARE(dci(0x0d20e000), expected); // L = 0
2930 COMPARE(dci(0x0d60f000), expected); // S = 1
2931
2932 expected = "unallocated (NEONLoadStoreSingleStructPostIndex)";
2933 // LD1R (single structure) (post index)
2934 COMPARE(dci(0x0d80c000), expected); // L = 0
2935 COMPARE(dci(0x0dc0d000), expected); // S = 1
2936 // LD2R (single structure) (post index)
2937 COMPARE(dci(0x0da0c000), expected); // L = 0
2938 COMPARE(dci(0x0de0d000), expected); // S = 1
2939 // LD3R (single structure) (post index)
2940 COMPARE(dci(0x0d80e000), expected); // L = 0
2941 COMPARE(dci(0x0dc0f000), expected); // S = 1
2942 // LD4R (single structure) (post index)
2943 COMPARE(dci(0x0da0e000), expected); // L = 0
2944 COMPARE(dci(0x0de0f000), expected); // S = 1
2945
2946 CLEANUP();
2947 }
2948
2949 TEST(neon_3same) {
2950 SET_UP_MASM();
2951
2952 #define DISASM_INST(M, S) \
2953 COMPARE(Cmeq(v0.M, v1.M, v2.M), "cmeq v0." S ", v1." S ", v2." S);
2954 NEON_FORMAT_LIST(DISASM_INST)
2955 #undef DISASM_INST
2956
2957 #define DISASM_INST(M, S) \
2958 COMPARE(Cmge(v0.M, v1.M, v2.M), "cmge v0." S ", v1." S ", v2." S);
2959 NEON_FORMAT_LIST(DISASM_INST)
2960 #undef DISASM_INST
2961
2962 #define DISASM_INST(M, S) \
2963 COMPARE(Cmgt(v0.M, v1.M, v2.M), "cmgt v0." S ", v1." S ", v2." S);
2964 NEON_FORMAT_LIST(DISASM_INST)
2965 #undef DISASM_INST
2966
2967 #define DISASM_INST(M, S) \
2968 COMPARE(Cmhi(v0.M, v1.M, v2.M), "cmhi v0." S ", v1." S ", v2." S);
2969 NEON_FORMAT_LIST(DISASM_INST)
2970 #undef DISASM_INST
2971
2972 #define DISASM_INST(M, S) \
2973 COMPARE(Cmhs(v0.M, v1.M, v2.M), "cmhs v0." S ", v1." S ", v2." S);
2974 NEON_FORMAT_LIST(DISASM_INST)
2975 #undef DISASM_INST
2976
2977 #define DISASM_INST(M, S) \
2978 COMPARE(Cmtst(v0.M, v1.M, v2.M), "cmtst v0." S ", v1." S ", v2." S);
2979 NEON_FORMAT_LIST(DISASM_INST)
2980 #undef DISASM_INST
2981
2982 #define DISASM_INST(M, S) \
2983 COMPARE(Add(v0.M, v1.M, v2.M), "add v0." S ", v1." S ", v2." S);
2984 NEON_FORMAT_LIST(DISASM_INST)
2985 #undef DISASM_INST
2986
2987 #define DISASM_INST(M, S) \
2988 COMPARE(Sub(v3.M, v4.M, v5.M), "sub v3." S ", v4." S ", v5." S);
2989 NEON_FORMAT_LIST(DISASM_INST)
2990 #undef DISASM_INST
2991
2992 #define DISASM_INST(M, S) \
2993 COMPARE(Sabd(v3.M, v4.M, v5.M), "sabd v3." S ", v4." S ", v5." S);
2994 NEON_FORMAT_LIST_BHS(DISASM_INST)
2995 #undef DISASM_INST
2996
2997 #define DISASM_INST(M, S) \
2998 COMPARE(Uabd(v3.M, v4.M, v5.M), "uabd v3." S ", v4." S ", v5." S);
2999 NEON_FORMAT_LIST_BHS(DISASM_INST)
3000 #undef DISASM_INST
3001
3002 #define DISASM_INST(M, S) \
3003 COMPARE(Saba(v3.M, v4.M, v5.M), "saba v3." S ", v4." S ", v5." S);
3004 NEON_FORMAT_LIST_BHS(DISASM_INST)
3005 #undef DISASM_INST
3006
3007 #define DISASM_INST(M, S) \
3008 COMPARE(Uaba(v3.M, v4.M, v5.M), "uaba v3." S ", v4." S ", v5." S);
3009 NEON_FORMAT_LIST_BHS(DISASM_INST)
3010 #undef DISASM_INST
3011
3012 #define DISASM_INST(M, S) \
3013 COMPARE(Smax(v3.M, v4.M, v5.M), "smax v3." S ", v4." S ", v5." S);
3014 NEON_FORMAT_LIST_BHS(DISASM_INST)
3015 #undef DISASM_INST
3016
3017 #define DISASM_INST(M, S) \
3018 COMPARE(Smin(v3.M, v4.M, v5.M), "smin v3." S ", v4." S ", v5." S);
3019 NEON_FORMAT_LIST_BHS(DISASM_INST)
3020 #undef DISASM_INST
3021
3022 #define DISASM_INST(M, S) \
3023 COMPARE(Umax(v3.M, v4.M, v5.M), "umax v3." S ", v4." S ", v5." S);
3024 NEON_FORMAT_LIST_BHS(DISASM_INST)
3025 #undef DISASM_INST
3026
3027 #define DISASM_INST(M, S) \
3028 COMPARE(Umin(v3.M, v4.M, v5.M), "umin v3." S ", v4." S ", v5." S);
3029 NEON_FORMAT_LIST_BHS(DISASM_INST)
3030 #undef DISASM_INST
3031
3032 #define DISASM_INST(M, S) \
3033 COMPARE(Smaxp(v3.M, v4.M, v5.M), "smaxp v3." S ", v4." S ", v5." S);
3034 NEON_FORMAT_LIST_BHS(DISASM_INST)
3035 #undef DISASM_INST
3036
3037 #define DISASM_INST(M, S) \
3038 COMPARE(Sminp(v3.M, v4.M, v5.M), "sminp v3." S ", v4." S ", v5." S);
3039 NEON_FORMAT_LIST_BHS(DISASM_INST)
3040 #undef DISASM_INST
3041
3042 #define DISASM_INST(M, S) \
3043 COMPARE(Umaxp(v3.M, v4.M, v5.M), "umaxp v3." S ", v4." S ", v5." S);
3044 NEON_FORMAT_LIST_BHS(DISASM_INST)
3045 #undef DISASM_INST
3046
3047 #define DISASM_INST(M, S) \
3048 COMPARE(Uminp(v3.M, v4.M, v5.M), "uminp v3." S ", v4." S ", v5." S);
3049 NEON_FORMAT_LIST_BHS(DISASM_INST)
3050 #undef DISASM_INST
3051
3052 #define DISASM_INST(M, S) \
3053 COMPARE(Uqadd(v6.M, v7.M, v8_.M), "uqadd v6." S ", v7." S ", v8." S);
3054 NEON_FORMAT_LIST(DISASM_INST)
3055 #undef DISASM_INST
3056
3057 #define DISASM_INST(M, S) \
3058 COMPARE(Sqadd(v9.M, v10.M, v11.M), "sqadd v9." S ", v10." S ", v11." S);
3059 NEON_FORMAT_LIST(DISASM_INST)
3060 #undef DISASM_INST
3061
3062 #define DISASM_INST(M, S) \
3063 COMPARE(Uqsub(v6.M, v7.M, v8_.M), "uqsub v6." S ", v7." S ", v8." S);
3064 NEON_FORMAT_LIST(DISASM_INST)
3065 #undef DISASM_INST
3066
3067 #define DISASM_INST(M, S) \
3068 COMPARE(Sqsub(v9.M, v10.M, v11.M), "sqsub v9." S ", v10." S ", v11." S);
3069 NEON_FORMAT_LIST(DISASM_INST)
3070 #undef DISASM_INST
3071
3072 #define DISASM_INST(M, S) \
3073 COMPARE(Sshl(v12.M, v13.M, v14.M), "sshl v12." S ", v13." S ", v14." S);
3074 NEON_FORMAT_LIST(DISASM_INST)
3075 #undef DISASM_INST
3076
3077 #define DISASM_INST(M, S) \
3078 COMPARE(Ushl(v15.M, v16.M, v17.M), "ushl v15." S ", v16." S ", v17." S);
3079 NEON_FORMAT_LIST(DISASM_INST)
3080 #undef DISASM_INST
3081
3082 #define DISASM_INST(M, S) \
3083 COMPARE(Sqshl(v18.M, v19.M, v20.M), "sqshl v18." S ", v19." S ", v20." S);
3084 NEON_FORMAT_LIST(DISASM_INST)
3085 #undef DISASM_INST
3086
3087 #define DISASM_INST(M, S) \
3088 COMPARE(Uqshl(v21.M, v22.M, v23.M), "uqshl v21." S ", v22." S ", v23." S);
3089 NEON_FORMAT_LIST(DISASM_INST)
3090 #undef DISASM_INST
3091
3092 #define DISASM_INST(M, S) \
3093 COMPARE(Srshl(v24.M, v25.M, v26.M), "srshl v24." S ", v25." S ", v26." S);
3094 NEON_FORMAT_LIST(DISASM_INST)
3095 #undef DISASM_INST
3096
3097 #define DISASM_INST(M, S) \
3098 COMPARE(Urshl(v27.M, v28.M, v29.M), "urshl v27." S ", v28." S ", v29." S);
3099 NEON_FORMAT_LIST(DISASM_INST)
3100 #undef DISASM_INST
3101
3102 #define DISASM_INST(M, S) \
3103 COMPARE(Sqrshl(v30.M, v31.M, v0.M), "sqrshl v30." S ", v31." S ", v0." S);
3104 NEON_FORMAT_LIST(DISASM_INST)
3105 #undef DISASM_INST
3106
3107 #define DISASM_INST(M, S) \
3108 COMPARE(Uqrshl(v1.M, v2.M, v3.M), "uqrshl v1." S ", v2." S ", v3." S);
3109 NEON_FORMAT_LIST(DISASM_INST)
3110 #undef DISASM_INST
3111
3112 #define DISASM_INST(M, S) \
3113 COMPARE(Shadd(v4.M, v5.M, v6.M), "shadd v4." S ", v5." S ", v6." S);
3114 NEON_FORMAT_LIST_BHS(DISASM_INST)
3115 #undef DISASM_INST
3116
3117 #define DISASM_INST(M, S) \
3118 COMPARE(Uhadd(v7.M, v8_.M, v9.M), "uhadd v7." S ", v8." S ", v9." S);
3119 NEON_FORMAT_LIST_BHS(DISASM_INST)
3120 #undef DISASM_INST
3121
3122 #define DISASM_INST(M, S) \
3123 COMPARE(Srhadd(v10.M, v11.M, v12.M), "srhadd v10." S ", v11." S ", v12." S);
3124 NEON_FORMAT_LIST_BHS(DISASM_INST)
3125 #undef DISASM_INST
3126
3127 #define DISASM_INST(M, S) \
3128 COMPARE(Urhadd(v13.M, v14.M, v15.M), "urhadd v13." S ", v14." S ", v15." S);
3129 NEON_FORMAT_LIST_BHS(DISASM_INST)
3130 #undef DISASM_INST
3131
3132 #define DISASM_INST(M, S) \
3133 COMPARE(Shsub(v16.M, v17.M, v18.M), "shsub v16." S ", v17." S ", v18." S);
3134 NEON_FORMAT_LIST_BHS(DISASM_INST)
3135 #undef DISASM_INST
3136
3137 #define DISASM_INST(M, S) \
3138 COMPARE(Uhsub(v19.M, v20.M, v21.M), "uhsub v19." S ", v20." S ", v21." S);
3139 NEON_FORMAT_LIST_BHS(DISASM_INST)
3140 #undef DISASM_INST
3141
3142 #define DISASM_INST(M, S) \
3143 COMPARE(Addp(v19.M, v20.M, v21.M), "addp v19." S ", v20." S ", v21." S);
3144 NEON_FORMAT_LIST(DISASM_INST)
3145 #undef DISASM_INST
3146
3147 #define DISASM_INST(M, S) \
3148 COMPARE(Mla(v19.M, v20.M, v21.M), "mla v19." S ", v20." S ", v21." S);
3149 NEON_FORMAT_LIST_BHS(DISASM_INST)
3150 #undef DISASM_INST
3151
3152 #define DISASM_INST(M, S) \
3153 COMPARE(Mls(v19.M, v20.M, v21.M), "mls v19." S ", v20." S ", v21." S);
3154 NEON_FORMAT_LIST_BHS(DISASM_INST)
3155 #undef DISASM_INST
3156
3157 #define DISASM_INST(M, S) \
3158 COMPARE(Mul(v19.M, v20.M, v21.M), "mul v19." S ", v20." S ", v21." S);
3159 NEON_FORMAT_LIST_BHS(DISASM_INST)
3160 #undef DISASM_INST
3161
3162 #define DISASM_INST(M, S) \
3163 COMPARE(Sqdmulh(v1.M, v2.M, v3.M), "sqdmulh v1." S ", v2." S ", v3." S);
3164 NEON_FORMAT_LIST_HS(DISASM_INST)
3165 #undef DISASM_INST
3166
3167 #define DISASM_INST(M, S) \
3168 COMPARE(Sqrdmulh(v1.M, v2.M, v3.M), "sqrdmulh v1." S ", v2." S ", v3." S);
3169 NEON_FORMAT_LIST_HS(DISASM_INST)
3170 #undef DISASM_INST
3171
3172 COMPARE(And(v6.V8B(), v7.V8B(), v8_.V8B()), "and v6.8b, v7.8b, v8.8b");
3173 COMPARE(And(v6.V16B(), v7.V16B(), v8_.V16B()), "and v6.16b, v7.16b, v8.16b");
3174
3175 COMPARE(Bic(v6.V8B(), v7.V8B(), v8_.V8B()), "bic v6.8b, v7.8b, v8.8b");
3176 COMPARE(Bic(v6.V16B(), v7.V16B(), v8_.V16B()), "bic v6.16b, v7.16b, v8.16b");
3177
3178 COMPARE(Orr(v6.V8B(), v7.V8B(), v8_.V8B()), "orr v6.8b, v7.8b, v8.8b");
3179 COMPARE(Orr(v6.V16B(), v7.V16B(), v8_.V16B()), "orr v6.16b, v7.16b, v8.16b");
3180
3181 COMPARE(Orr(v6.V8B(), v7.V8B(), v7.V8B()), "mov v6.8b, v7.8b");
3182 COMPARE(Orr(v6.V16B(), v7.V16B(), v7.V16B()), "mov v6.16b, v7.16b");
3183
3184 COMPARE(Mov(v6.V8B(), v8_.V8B()), "mov v6.8b, v8.8b");
3185 COMPARE(Mov(v6.V16B(), v8_.V16B()), "mov v6.16b, v8.16b");
3186
3187 COMPARE(Orn(v6.V8B(), v7.V8B(), v8_.V8B()), "orn v6.8b, v7.8b, v8.8b");
3188 COMPARE(Orn(v6.V16B(), v7.V16B(), v8_.V16B()), "orn v6.16b, v7.16b, v8.16b");
3189
3190 COMPARE(Eor(v6.V8B(), v7.V8B(), v8_.V8B()), "eor v6.8b, v7.8b, v8.8b");
3191 COMPARE(Eor(v6.V16B(), v7.V16B(), v8_.V16B()), "eor v6.16b, v7.16b, v8.16b");
3192
3193 COMPARE(Bif(v6.V8B(), v7.V8B(), v8_.V8B()), "bif v6.8b, v7.8b, v8.8b");
3194 COMPARE(Bif(v6.V16B(), v7.V16B(), v8_.V16B()), "bif v6.16b, v7.16b, v8.16b");
3195
3196 COMPARE(Bit(v6.V8B(), v7.V8B(), v8_.V8B()), "bit v6.8b, v7.8b, v8.8b");
3197 COMPARE(Bit(v6.V16B(), v7.V16B(), v8_.V16B()), "bit v6.16b, v7.16b, v8.16b");
3198
3199 COMPARE(Bsl(v6.V8B(), v7.V8B(), v8_.V8B()), "bsl v6.8b, v7.8b, v8.8b");
3200 COMPARE(Bsl(v6.V16B(), v7.V16B(), v8_.V16B()), "bsl v6.16b, v7.16b, v8.16b");
3201
3202 COMPARE(Pmul(v6.V8B(), v7.V8B(), v8_.V8B()), "pmul v6.8b, v7.8b, v8.8b");
3203 COMPARE(Pmul(v6.V16B(), v7.V16B(), v8_.V16B()),
3204 "pmul v6.16b, v7.16b, v8.16b");
3205
3206 CLEANUP();
3207 }
3208
3209 TEST(neon_fp_3same) {
3210 SET_UP_MASM();
3211
3212 #define DISASM_INST(M, S) \
3213 COMPARE(Fadd(v0.M, v1.M, v2.M), "fadd v0." S ", v1." S ", v2." S);
3214 NEON_FORMAT_LIST_FP(DISASM_INST)
3215 #undef DISASM_INST
3216
3217 #define DISASM_INST(M, S) \
3218 COMPARE(Fsub(v3.M, v4.M, v5.M), "fsub v3." S ", v4." S ", v5." S);
3219 NEON_FORMAT_LIST_FP(DISASM_INST)
3220 #undef DISASM_INST
3221
3222 #define DISASM_INST(M, S) \
3223 COMPARE(Fmul(v6.M, v7.M, v8_.M), "fmul v6." S ", v7." S ", v8." S);
3224 NEON_FORMAT_LIST_FP(DISASM_INST)
3225 #undef DISASM_INST
3226
3227 #define DISASM_INST(M, S) \
3228 COMPARE(Fdiv(v9.M, v10.M, v11.M), "fdiv v9." S ", v10." S ", v11." S);
3229 NEON_FORMAT_LIST_FP(DISASM_INST)
3230 #undef DISASM_INST
3231
3232 #define DISASM_INST(M, S) \
3233 COMPARE(Fmin(v12.M, v13.M, v14.M), "fmin v12." S ", v13." S ", v14." S);
3234 NEON_FORMAT_LIST_FP(DISASM_INST)
3235 #undef DISASM_INST
3236
3237 #define DISASM_INST(M, S) \
3238 COMPARE(Fminnm(v15.M, v16.M, v17.M), "fminnm v15." S ", v16." S ", v17." S);
3239 NEON_FORMAT_LIST_FP(DISASM_INST)
3240 #undef DISASM_INST
3241
3242 #define DISASM_INST(M, S) \
3243 COMPARE(Fmax(v18.M, v19.M, v20.M), "fmax v18." S ", v19." S ", v20." S);
3244 NEON_FORMAT_LIST_FP(DISASM_INST)
3245 #undef DISASM_INST
3246
3247 #define DISASM_INST(M, S) \
3248 COMPARE(Fmaxnm(v21.M, v22.M, v23.M), "fmaxnm v21." S ", v22." S ", v23." S);
3249 NEON_FORMAT_LIST_FP(DISASM_INST)
3250 #undef DISASM_INST
3251
3252 #define DISASM_INST(M, S) \
3253 COMPARE(Frecps(v24.M, v25.M, v26.M), "frecps v24." S ", v25." S ", v26." S);
3254 NEON_FORMAT_LIST_FP(DISASM_INST)
3255 #undef DISASM_INST
3256
3257 #define DISASM_INST(M, S) \
3258 COMPARE(Frsqrts(v27.M, v28.M, v29.M), "frsqrts v27." S ", v28." S \
3259 ", " \
3260 "v29." S);
3261 NEON_FORMAT_LIST_FP(DISASM_INST)
3262 #undef DISASM_INST
3263
3264 #define DISASM_INST(M, S) \
3265 COMPARE(Fmulx(v30.M, v31.M, v0.M), "fmulx v30." S ", v31." S ", v0." S);
3266 NEON_FORMAT_LIST_FP(DISASM_INST)
3267 #undef DISASM_INST
3268
3269 #define DISASM_INST(M, S) \
3270 COMPARE(Fmla(v1.M, v2.M, v3.M), "fmla v1." S ", v2." S ", v3." S);
3271 NEON_FORMAT_LIST_FP(DISASM_INST)
3272 #undef DISASM_INST
3273
3274 #define DISASM_INST(M, S) \
3275 COMPARE(Fmls(v4.M, v5.M, v6.M), "fmls v4." S ", v5." S ", v6." S);
3276 NEON_FORMAT_LIST_FP(DISASM_INST)
3277 #undef DISASM_INST
3278
3279 #define DISASM_INST(M, S) \
3280 COMPARE(Fabd(v7.M, v8_.M, v9.M), "fabd v7." S ", v8." S ", v9." S);
3281 NEON_FORMAT_LIST_FP(DISASM_INST)
3282 #undef DISASM_INST
3283
3284 #define DISASM_INST(M, S) \
3285 COMPARE(Faddp(v10.M, v11.M, v12.M), "faddp v10." S ", v11." S ", v12." S);
3286 NEON_FORMAT_LIST_FP(DISASM_INST)
3287 #undef DISASM_INST
3288
3289 #define DISASM_INST(M, S) \
3290 COMPARE(Fmaxp(v13.M, v14.M, v15.M), "fmaxp v13." S ", v14." S ", v15." S);
3291 NEON_FORMAT_LIST_FP(DISASM_INST)
3292 #undef DISASM_INST
3293
3294 #define DISASM_INST(M, S) \
3295 COMPARE(Fminp(v16.M, v17.M, v18.M), "fminp v16." S ", v17." S ", v18." S);
3296 NEON_FORMAT_LIST_FP(DISASM_INST)
3297 #undef DISASM_INST
3298
3299 #define DISASM_INST(M, S) \
3300 COMPARE(Fmaxnmp(v19.M, v20.M, v21.M), "fmaxnmp v19." S ", v20." S \
3301 ", " \
3302 "v21." S);
3303 NEON_FORMAT_LIST_FP(DISASM_INST)
3304 #undef DISASM_INST
3305
3306 #define DISASM_INST(M, S) \
3307 COMPARE(Fminnmp(v22.M, v23.M, v24.M), "fminnmp v22." S ", v23." S \
3308 ", " \
3309 "v24." S);
3310 NEON_FORMAT_LIST_FP(DISASM_INST)
3311 #undef DISASM_INST
3312
3313 #define DISASM_INST(M, S) \
3314 COMPARE(Fcmeq(v25.M, v26.M, v27.M), "fcmeq v25." S ", v26." S ", v27." S);
3315 NEON_FORMAT_LIST_FP(DISASM_INST)
3316 #undef DISASM_INST
3317
3318 #define DISASM_INST(M, S) \
3319 COMPARE(Fcmge(v25.M, v26.M, v27.M), "fcmge v25." S ", v26." S ", v27." S);
3320 NEON_FORMAT_LIST_FP(DISASM_INST)
3321 #undef DISASM_INST
3322
3323 #define DISASM_INST(M, S) \
3324 COMPARE(Fcmgt(v25.M, v26.M, v27.M), "fcmgt v25." S ", v26." S ", v27." S);
3325 NEON_FORMAT_LIST_FP(DISASM_INST)
3326 #undef DISASM_INST
3327
3328 #define DISASM_INST(M, S) \
3329 COMPARE(Facge(v25.M, v26.M, v27.M), "facge v25." S ", v26." S ", v27." S);
3330 NEON_FORMAT_LIST_FP(DISASM_INST)
3331 #undef DISASM_INST
3332
3333 #define DISASM_INST(M, S) \
3334 COMPARE(Facgt(v25.M, v26.M, v27.M), "facgt v25." S ", v26." S ", v27." S);
3335 NEON_FORMAT_LIST_FP(DISASM_INST)
3336 #undef DISASM_INST
3337
3338 CLEANUP();
3339 }
3340
3341 #define NEON_SCALAR_FORMAT_LIST(V) \
3342 V(B(), "b") \
3343 V(H(), "h") \
3344 V(S(), "s") \
3345 V(D(), "d")
3346
3347 TEST(neon_scalar_3same) {
3348 SET_UP_MASM();
3349
3350 // Instructions that only support D-sized scalar operations.
3351 COMPARE(Add(v0.D(), v1.D(), v2.D()), "add d0, d1, d2");
3352 COMPARE(Sub(v3.D(), v4.D(), v5.D()), "sub d3, d4, d5");
3353 COMPARE(Cmeq(v0.D(), v1.D(), v2.D()), "cmeq d0, d1, d2");
3354 COMPARE(Cmge(v3.D(), v4.D(), v5.D()), "cmge d3, d4, d5");
3355 COMPARE(Cmgt(v6.D(), v7.D(), v8_.D()), "cmgt d6, d7, d8");
3356 COMPARE(Cmhi(v0.D(), v1.D(), v2.D()), "cmhi d0, d1, d2");
3357 COMPARE(Cmhs(v3.D(), v4.D(), v5.D()), "cmhs d3, d4, d5");
3358 COMPARE(Cmtst(v6.D(), v7.D(), v8_.D()), "cmtst d6, d7, d8");
3359 COMPARE(Ushl(v6.D(), v7.D(), v8_.D()), "ushl d6, d7, d8");
3360 COMPARE(Sshl(v6.D(), v7.D(), v8_.D()), "sshl d6, d7, d8");
3361 COMPARE(Urshl(v9.D(), v10.D(), v11.D()), "urshl d9, d10, d11");
3362 COMPARE(Srshl(v9.D(), v10.D(), v11.D()), "srshl d9, d10, d11");
3363
3364 // Instructions that support S and D-sized scalar operations.
3365 COMPARE(Frecps(v12.S(), v13.S(), v14.S()), "frecps s12, s13, s14");
3366 COMPARE(Frecps(v15.D(), v16.D(), v17.D()), "frecps d15, d16, d17");
3367 COMPARE(Frsqrts(v18.S(), v19.S(), v20.S()), "frsqrts s18, s19, s20");
3368 COMPARE(Frsqrts(v21.D(), v22.D(), v23.D()), "frsqrts d21, d22, d23");
3369 COMPARE(Fmulx(v12.S(), v13.S(), v14.S()), "fmulx s12, s13, s14");
3370 COMPARE(Fmulx(v15.D(), v16.D(), v17.D()), "fmulx d15, d16, d17");
3371 COMPARE(Fcmeq(v12.S(), v13.S(), v14.S()), "fcmeq s12, s13, s14");
3372 COMPARE(Fcmeq(v15.D(), v16.D(), v17.D()), "fcmeq d15, d16, d17");
3373 COMPARE(Fcmge(v12.S(), v13.S(), v14.S()), "fcmge s12, s13, s14");
3374 COMPARE(Fcmge(v15.D(), v16.D(), v17.D()), "fcmge d15, d16, d17");
3375 COMPARE(Fcmgt(v12.S(), v13.S(), v14.S()), "fcmgt s12, s13, s14");
3376 COMPARE(Fcmgt(v15.D(), v16.D(), v17.D()), "fcmgt d15, d16, d17");
3377 COMPARE(Fcmge(v12.S(), v13.S(), v14.S()), "fcmge s12, s13, s14");
3378 COMPARE(Fcmge(v15.D(), v16.D(), v17.D()), "fcmge d15, d16, d17");
3379 COMPARE(Facgt(v12.S(), v13.S(), v14.S()), "facgt s12, s13, s14");
3380 COMPARE(Facgt(v15.D(), v16.D(), v17.D()), "facgt d15, d16, d17");
3381
3382 // Instructions that support H and S-sized scalar operations.
3383 COMPARE(Sqdmulh(v12.S(), v13.S(), v14.S()), "sqdmulh s12, s13, s14");
3384 COMPARE(Sqdmulh(v15.H(), v16.H(), v17.H()), "sqdmulh h15, h16, h17");
3385 COMPARE(Sqrdmulh(v12.S(), v13.S(), v14.S()), "sqrdmulh s12, s13, s14");
3386 COMPARE(Sqrdmulh(v15.H(), v16.H(), v17.H()), "sqrdmulh h15, h16, h17");
3387
3388 #define DISASM_INST(M, R) \
3389 COMPARE(Uqadd(v6.M, v7.M, v8_.M), "uqadd " R "6, " R "7, " R "8");
3390 NEON_SCALAR_FORMAT_LIST(DISASM_INST)
3391 #undef DISASM_INST
3392
3393 #define DISASM_INST(M, R) \
3394 COMPARE(Uqsub(v9.M, v10.M, v11.M), "uqsub " R "9, " R "10, " R "11");
3395 NEON_SCALAR_FORMAT_LIST(DISASM_INST)
3396 #undef DISASM_INST
3397
3398 #define DISASM_INST(M, R) \
3399 COMPARE(Sqadd(v12.M, v13.M, v14.M), "sqadd " R "12, " R "13, " R "14");
3400 NEON_SCALAR_FORMAT_LIST(DISASM_INST)
3401 #undef DISASM_INST
3402
3403 #define DISASM_INST(M, R) \
3404 COMPARE(Sqsub(v15.M, v16.M, v17.M), "sqsub " R "15, " R "16, " R "17");
3405 NEON_SCALAR_FORMAT_LIST(DISASM_INST)
3406 #undef DISASM_INST
3407
3408 #define DISASM_INST(M, R) \
3409 COMPARE(Uqshl(v18.M, v19.M, v20.M), "uqshl " R "18, " R "19, " R "20");
3410 NEON_SCALAR_FORMAT_LIST(DISASM_INST)
3411 #undef DISASM_INST
3412
3413 #define DISASM_INST(M, R) \
3414 COMPARE(Sqshl(v21.M, v22.M, v23.M), "sqshl " R "21, " R "22, " R "23");
3415 NEON_SCALAR_FORMAT_LIST(DISASM_INST)
3416 #undef DISASM_INST
3417
3418 #define DISASM_INST(M, R) \
3419 COMPARE(Uqrshl(v30.M, v31.M, v0.M), "uqrshl " R "30, " R "31, " R "0");
3420 NEON_SCALAR_FORMAT_LIST(DISASM_INST)
3421 #undef DISASM_INST
3422
3423 #define DISASM_INST(M, R) \
3424 COMPARE(Sqrshl(v1.M, v2.M, v3.M), "sqrshl " R "1, " R "2, " R "3");
3425 NEON_SCALAR_FORMAT_LIST(DISASM_INST)
3426 #undef DISASM_INST
3427
3428 CLEANUP();
3429 }
3430
3431 TEST(neon_byelement) {
3432 SET_UP_MASM();
3433
3434 COMPARE(Mul(v0.V4H(), v1.V4H(), v2.H(), 0), "mul v0.4h, v1.4h, v2.h[0]");
3435 COMPARE(Mul(v2.V8H(), v3.V8H(), v15.H(), 7), "mul v2.8h, v3.8h, v15.h[7]");
3436 COMPARE(Mul(v0.V2S(), v1.V2S(), v2.S(), 0), "mul v0.2s, v1.2s, v2.s[0]");
3437 COMPARE(Mul(v2.V4S(), v3.V4S(), v15.S(), 3), "mul v2.4s, v3.4s, v15.s[3]");
3438
3439 COMPARE(Mla(v0.V4H(), v1.V4H(), v2.H(), 0), "mla v0.4h, v1.4h, v2.h[0]");
3440 COMPARE(Mla(v2.V8H(), v3.V8H(), v15.H(), 7), "mla v2.8h, v3.8h, v15.h[7]");
3441 COMPARE(Mla(v0.V2S(), v1.V2S(), v2.S(), 0), "mla v0.2s, v1.2s, v2.s[0]");
3442 COMPARE(Mla(v2.V4S(), v3.V4S(), v15.S(), 3), "mla v2.4s, v3.4s, v15.s[3]");
3443
3444 COMPARE(Mls(v0.V4H(), v1.V4H(), v2.H(), 0), "mls v0.4h, v1.4h, v2.h[0]");
3445 COMPARE(Mls(v2.V8H(), v3.V8H(), v15.H(), 7), "mls v2.8h, v3.8h, v15.h[7]");
3446 COMPARE(Mls(v0.V2S(), v1.V2S(), v2.S(), 0), "mls v0.2s, v1.2s, v2.s[0]");
3447 COMPARE(Mls(v2.V4S(), v3.V4S(), v15.S(), 3), "mls v2.4s, v3.4s, v15.s[3]");
3448
3449 COMPARE(Sqdmulh(v0.V4H(), v1.V4H(), v2.H(), 0),
3450 "sqdmulh v0.4h, v1.4h, v2.h[0]");
3451 COMPARE(Sqdmulh(v2.V8H(), v3.V8H(), v15.H(), 7),
3452 "sqdmulh v2.8h, v3.8h, v15.h[7]");
3453 COMPARE(Sqdmulh(v0.V2S(), v1.V2S(), v2.S(), 0),
3454 "sqdmulh v0.2s, v1.2s, v2.s[0]");
3455 COMPARE(Sqdmulh(v2.V4S(), v3.V4S(), v15.S(), 3),
3456 "sqdmulh v2.4s, v3.4s, v15.s[3]");
3457 COMPARE(Sqdmulh(h0, h1, v2.H(), 0), "sqdmulh h0, h1, v2.h[0]");
3458 COMPARE(Sqdmulh(s0, s1, v2.S(), 0), "sqdmulh s0, s1, v2.s[0]");
3459
3460 COMPARE(Sqrdmulh(v0.V4H(), v1.V4H(), v2.H(), 0),
3461 "sqrdmulh v0.4h, v1.4h, v2.h[0]");
3462 COMPARE(Sqrdmulh(v2.V8H(), v3.V8H(), v15.H(), 7),
3463 "sqrdmulh v2.8h, v3.8h, v15.h[7]");
3464 COMPARE(Sqrdmulh(v0.V2S(), v1.V2S(), v2.S(), 0),
3465 "sqrdmulh v0.2s, v1.2s, v2.s[0]");
3466 COMPARE(Sqrdmulh(v2.V4S(), v3.V4S(), v15.S(), 3),
3467 "sqrdmulh v2.4s, v3.4s, v15.s[3]");
3468 COMPARE(Sqrdmulh(h0, h1, v2.H(), 0), "sqrdmulh h0, h1, v2.h[0]");
3469 COMPARE(Sqrdmulh(s0, s1, v2.S(), 0), "sqrdmulh s0, s1, v2.s[0]");
3470
3471 COMPARE(Smull(v0.V4S(), v1.V4H(), v2.H(), 0), "smull v0.4s, v1.4h, v2.h[0]");
3472 COMPARE(Smull2(v2.V4S(), v3.V8H(), v4.H(), 7),
3473 "smull2 v2.4s, v3.8h, v4.h[7]");
3474 COMPARE(Smull(v0.V2D(), v1.V2S(), v2.S(), 0), "smull v0.2d, v1.2s, v2.s[0]");
3475 COMPARE(Smull2(v2.V2D(), v3.V4S(), v4.S(), 3),
3476 "smull2 v2.2d, v3.4s, v4.s[3]");
3477
3478 COMPARE(Umull(v0.V4S(), v1.V4H(), v2.H(), 0), "umull v0.4s, v1.4h, v2.h[0]");
3479 COMPARE(Umull2(v2.V4S(), v3.V8H(), v4.H(), 7),
3480 "umull2 v2.4s, v3.8h, v4.h[7]");
3481 COMPARE(Umull(v0.V2D(), v1.V2S(), v2.S(), 0), "umull v0.2d, v1.2s, v2.s[0]");
3482 COMPARE(Umull2(v2.V2D(), v3.V4S(), v4.S(), 3),
3483 "umull2 v2.2d, v3.4s, v4.s[3]");
3484
3485 COMPARE(Smlal(v0.V4S(), v1.V4H(), v2.H(), 0), "smlal v0.4s, v1.4h, v2.h[0]");
3486 COMPARE(Smlal2(v2.V4S(), v3.V8H(), v4.H(), 7),
3487 "smlal2 v2.4s, v3.8h, v4.h[7]");
3488 COMPARE(Smlal(v0.V2D(), v1.V2S(), v2.S(), 0), "smlal v0.2d, v1.2s, v2.s[0]");
3489 COMPARE(Smlal2(v2.V2D(), v3.V4S(), v4.S(), 3),
3490 "smlal2 v2.2d, v3.4s, v4.s[3]");
3491
3492 COMPARE(Umlal(v0.V4S(), v1.V4H(), v2.H(), 0), "umlal v0.4s, v1.4h, v2.h[0]");
3493 COMPARE(Umlal2(v2.V4S(), v3.V8H(), v4.H(), 7),
3494 "umlal2 v2.4s, v3.8h, v4.h[7]");
3495 COMPARE(Umlal(v0.V2D(), v1.V2S(), v2.S(), 0), "umlal v0.2d, v1.2s, v2.s[0]");
3496 COMPARE(Umlal2(v2.V2D(), v3.V4S(), v4.S(), 3),
3497 "umlal2 v2.2d, v3.4s, v4.s[3]");
3498
3499 COMPARE(Smlsl(v0.V4S(), v1.V4H(), v2.H(), 0), "smlsl v0.4s, v1.4h, v2.h[0]");
3500 COMPARE(Smlsl2(v2.V4S(), v3.V8H(), v4.H(), 7),
3501 "smlsl2 v2.4s, v3.8h, v4.h[7]");
3502 COMPARE(Smlsl(v0.V2D(), v1.V2S(), v2.S(), 0), "smlsl v0.2d, v1.2s, v2.s[0]");
3503 COMPARE(Smlsl2(v2.V2D(), v3.V4S(), v4.S(), 3),
3504 "smlsl2 v2.2d, v3.4s, v4.s[3]");
3505
3506 COMPARE(Umlsl(v0.V4S(), v1.V4H(), v2.H(), 0), "umlsl v0.4s, v1.4h, v2.h[0]");
3507 COMPARE(Umlsl2(v2.V4S(), v3.V8H(), v4.H(), 7),
3508 "umlsl2 v2.4s, v3.8h, v4.h[7]");
3509 COMPARE(Umlsl(v0.V2D(), v1.V2S(), v2.S(), 0), "umlsl v0.2d, v1.2s, v2.s[0]");
3510 COMPARE(Umlsl2(v2.V2D(), v3.V4S(), v4.S(), 3),
3511 "umlsl2 v2.2d, v3.4s, v4.s[3]");
3512
3513 COMPARE(Sqdmull(v0.V4S(), v1.V4H(), v2.H(), 0),
3514 "sqdmull v0.4s, v1.4h, v2.h[0]");
3515 COMPARE(Sqdmull2(v2.V4S(), v3.V8H(), v4.H(), 7),
3516 "sqdmull2 v2.4s, v3.8h, v4.h[7]");
3517 COMPARE(Sqdmull(v0.V2D(), v1.V2S(), v2.S(), 0),
3518 "sqdmull v0.2d, v1.2s, v2.s[0]");
3519 COMPARE(Sqdmull2(v2.V2D(), v3.V4S(), v4.S(), 3),
3520 "sqdmull2 v2.2d, v3.4s, v4.s[3]");
3521 COMPARE(Sqdmull(s0, h1, v2.H(), 0), "sqdmull s0, h1, v2.h[0]");
3522 COMPARE(Sqdmull(d0, s1, v2.S(), 0), "sqdmull d0, s1, v2.s[0]");
3523
3524 COMPARE(Sqdmlal(v0.V4S(), v1.V4H(), v2.H(), 0),
3525 "sqdmlal v0.4s, v1.4h, v2.h[0]");
3526 COMPARE(Sqdmlal2(v2.V4S(), v3.V8H(), v4.H(), 7),
3527 "sqdmlal2 v2.4s, v3.8h, v4.h[7]");
3528 COMPARE(Sqdmlal(v0.V2D(), v1.V2S(), v2.S(), 0),
3529 "sqdmlal v0.2d, v1.2s, v2.s[0]");
3530 COMPARE(Sqdmlal2(v2.V2D(), v3.V4S(), v4.S(), 3),
3531 "sqdmlal2 v2.2d, v3.4s, v4.s[3]");
3532 COMPARE(Sqdmlal(s0, h1, v2.H(), 0), "sqdmlal s0, h1, v2.h[0]");
3533 COMPARE(Sqdmlal(d0, s1, v2.S(), 0), "sqdmlal d0, s1, v2.s[0]");
3534
3535 COMPARE(Sqdmlsl(v0.V4S(), v1.V4H(), v2.H(), 0),
3536 "sqdmlsl v0.4s, v1.4h, v2.h[0]");
3537 COMPARE(Sqdmlsl2(v2.V4S(), v3.V8H(), v4.H(), 7),
3538 "sqdmlsl2 v2.4s, v3.8h, v4.h[7]");
3539 COMPARE(Sqdmlsl(v0.V2D(), v1.V2S(), v2.S(), 0),
3540 "sqdmlsl v0.2d, v1.2s, v2.s[0]");
3541 COMPARE(Sqdmlsl2(v2.V2D(), v3.V4S(), v4.S(), 3),
3542 "sqdmlsl2 v2.2d, v3.4s, v4.s[3]");
3543 COMPARE(Sqdmlsl(s0, h1, v2.H(), 0), "sqdmlsl s0, h1, v2.h[0]");
3544 COMPARE(Sqdmlsl(d0, s1, v2.S(), 0), "sqdmlsl d0, s1, v2.s[0]");
3545
3546 CLEANUP();
3547 }
3548
3549 TEST(neon_fp_byelement) {
3550 SET_UP_MASM();
3551
3552 COMPARE(Fmul(v0.V2S(), v1.V2S(), v2.S(), 0), "fmul v0.2s, v1.2s, v2.s[0]");
3553 COMPARE(Fmul(v2.V4S(), v3.V4S(), v15.S(), 3), "fmul v2.4s, v3.4s, v15.s[3]");
3554 COMPARE(Fmul(v0.V2D(), v1.V2D(), v2.D(), 0), "fmul v0.2d, v1.2d, v2.d[0]");
3555 COMPARE(Fmul(d0, d1, v2.D(), 0), "fmul d0, d1, v2.d[0]");
3556 COMPARE(Fmul(s0, s1, v2.S(), 0), "fmul s0, s1, v2.s[0]");
3557
3558 COMPARE(Fmla(v0.V2S(), v1.V2S(), v2.S(), 0), "fmla v0.2s, v1.2s, v2.s[0]");
3559 COMPARE(Fmla(v2.V4S(), v3.V4S(), v15.S(), 3), "fmla v2.4s, v3.4s, v15.s[3]");
3560 COMPARE(Fmla(v0.V2D(), v1.V2D(), v2.D(), 0), "fmla v0.2d, v1.2d, v2.d[0]");
3561 COMPARE(Fmla(d0, d1, v2.D(), 0), "fmla d0, d1, v2.d[0]");
3562 COMPARE(Fmla(s0, s1, v2.S(), 0), "fmla s0, s1, v2.s[0]");
3563
3564 COMPARE(Fmls(v0.V2S(), v1.V2S(), v2.S(), 0), "fmls v0.2s, v1.2s, v2.s[0]");
3565 COMPARE(Fmls(v2.V4S(), v3.V4S(), v15.S(), 3), "fmls v2.4s, v3.4s, v15.s[3]");
3566 COMPARE(Fmls(v0.V2D(), v1.V2D(), v2.D(), 0), "fmls v0.2d, v1.2d, v2.d[0]");
3567 COMPARE(Fmls(d0, d1, v2.D(), 0), "fmls d0, d1, v2.d[0]");
3568 COMPARE(Fmls(s0, s1, v2.S(), 0), "fmls s0, s1, v2.s[0]");
3569
3570 COMPARE(Fmulx(v0.V2S(), v1.V2S(), v2.S(), 0), "fmulx v0.2s, v1.2s, v2.s[0]");
3571 COMPARE(Fmulx(v2.V4S(), v3.V4S(), v8_.S(), 3), "fmulx v2.4s, v3.4s, v8.s[3]");
3572 COMPARE(Fmulx(v0.V2D(), v1.V2D(), v2.D(), 0), "fmulx v0.2d, v1.2d, v2.d[0]");
3573 COMPARE(Fmulx(d0, d1, v2.D(), 0), "fmulx d0, d1, v2.d[0]");
3574 COMPARE(Fmulx(s0, s1, v2.S(), 0), "fmulx s0, s1, v2.s[0]");
3575
3576 CLEANUP();
3577 }
3578
3579 TEST(neon_3different) {
3580 SET_UP_MASM();
3581
3582 #define DISASM_INST(TA, TAS, TB, TBS) \
3583 COMPARE(Uaddl(v0.TA, v1.TB, v2.TB), "uaddl v0." TAS ", v1." TBS \
3584 ", " \
3585 "v2." TBS);
3586 NEON_FORMAT_LIST_LW(DISASM_INST)
3587 #undef DISASM_INST
3588
3589 #define DISASM_INST(TA, TAS, TB, TBS) \
3590 COMPARE(Uaddl2(v0.TA, v1.TB, v2.TB), \
3591 "uaddl2 v0." TAS ", v1." TBS ", v2." TBS);
3592 NEON_FORMAT_LIST_LW2(DISASM_INST)
3593 #undef DISASM_INST
3594
3595 #define DISASM_INST(TA, TAS, TB, TBS) \
3596 COMPARE(Uaddw(v0.TA, v1.TA, v2.TB), "uaddw v0." TAS ", v1." TAS \
3597 ", " \
3598 "v2." TBS);
3599 NEON_FORMAT_LIST_LW(DISASM_INST)
3600 #undef DISASM_INST
3601
3602 #define DISASM_INST(TA, TAS, TB, TBS) \
3603 COMPARE(Uaddw2(v0.TA, v1.TA, v2.TB), \
3604 "uaddw2 v0." TAS ", v1." TAS ", v2." TBS);
3605 NEON_FORMAT_LIST_LW2(DISASM_INST)
3606 #undef DISASM_INST
3607
3608 #define DISASM_INST(TA, TAS, TB, TBS) \
3609 COMPARE(Saddl(v0.TA, v1.TB, v2.TB), "saddl v0." TAS ", v1." TBS \
3610 ", " \
3611 "v2." TBS);
3612 NEON_FORMAT_LIST_LW(DISASM_INST)
3613 #undef DISASM_INST
3614
3615 #define DISASM_INST(TA, TAS, TB, TBS) \
3616 COMPARE(Saddl2(v0.TA, v1.TB, v2.TB), \
3617 "saddl2 v0." TAS ", v1." TBS ", v2." TBS);
3618 NEON_FORMAT_LIST_LW2(DISASM_INST)
3619 #undef DISASM_INST
3620
3621 #define DISASM_INST(TA, TAS, TB, TBS) \
3622 COMPARE(Saddw(v0.TA, v1.TA, v2.TB), "saddw v0." TAS ", v1." TAS \
3623 ", " \
3624 "v2." TBS);
3625 NEON_FORMAT_LIST_LW(DISASM_INST)
3626 #undef DISASM_INST
3627
3628 #define DISASM_INST(TA, TAS, TB, TBS) \
3629 COMPARE(Saddw2(v0.TA, v1.TA, v2.TB), \
3630 "saddw2 v0." TAS ", v1." TAS ", v2." TBS);
3631 NEON_FORMAT_LIST_LW2(DISASM_INST)
3632 #undef DISASM_INST
3633
3634 #define DISASM_INST(TA, TAS, TB, TBS) \
3635 COMPARE(Usubl(v0.TA, v1.TB, v2.TB), "usubl v0." TAS ", v1." TBS \
3636 ", " \
3637 "v2." TBS);
3638 NEON_FORMAT_LIST_LW(DISASM_INST)
3639 #undef DISASM_INST
3640
3641 #define DISASM_INST(TA, TAS, TB, TBS) \
3642 COMPARE(Usubl2(v0.TA, v1.TB, v2.TB), \
3643 "usubl2 v0." TAS ", v1." TBS ", v2." TBS);
3644 NEON_FORMAT_LIST_LW2(DISASM_INST)
3645 #undef DISASM_INST
3646
3647 #define DISASM_INST(TA, TAS, TB, TBS) \
3648 COMPARE(Usubw(v0.TA, v1.TA, v2.TB), "usubw v0." TAS ", v1." TAS \
3649 ", " \
3650 "v2." TBS);
3651 NEON_FORMAT_LIST_LW(DISASM_INST)
3652 #undef DISASM_INST
3653
3654 #define DISASM_INST(TA, TAS, TB, TBS) \
3655 COMPARE(Usubw2(v0.TA, v1.TA, v2.TB), \
3656 "usubw2 v0." TAS ", v1." TAS ", v2." TBS);
3657 NEON_FORMAT_LIST_LW2(DISASM_INST)
3658 #undef DISASM_INST
3659
3660 #define DISASM_INST(TA, TAS, TB, TBS) \
3661 COMPARE(Ssubl(v0.TA, v1.TB, v2.TB), "ssubl v0." TAS ", v1." TBS \
3662 ", " \
3663 "v2." TBS);
3664 NEON_FORMAT_LIST_LW(DISASM_INST)
3665 #undef DISASM_INST
3666
3667 #define DISASM_INST(TA, TAS, TB, TBS) \
3668 COMPARE(Ssubl2(v0.TA, v1.TB, v2.TB), \
3669 "ssubl2 v0." TAS ", v1." TBS ", v2." TBS);
3670 NEON_FORMAT_LIST_LW2(DISASM_INST)
3671 #undef DISASM_INST
3672
3673 #define DISASM_INST(TA, TAS, TB, TBS) \
3674 COMPARE(Ssubw(v0.TA, v1.TA, v2.TB), "ssubw v0." TAS ", v1." TAS \
3675 ", " \
3676 "v2." TBS);
3677 NEON_FORMAT_LIST_LW(DISASM_INST)
3678 #undef DISASM_INST
3679
3680 #define DISASM_INST(TA, TAS, TB, TBS) \
3681 COMPARE(Ssubw2(v0.TA, v1.TA, v2.TB), \
3682 "ssubw2 v0." TAS ", v1." TAS ", v2." TBS);
3683 NEON_FORMAT_LIST_LW2(DISASM_INST)
3684 #undef DISASM_INST
3685
3686 #define DISASM_INST(TA, TAS, TB, TBS) \
3687 COMPARE(Sabal(v0.TA, v1.TB, v2.TB), "sabal v0." TAS ", v1." TBS \
3688 ", " \
3689 "v2." TBS);
3690 NEON_FORMAT_LIST_LW(DISASM_INST)
3691 #undef DISASM_INST
3692
3693 #define DISASM_INST(TA, TAS, TB, TBS) \
3694 COMPARE(Sabal2(v0.TA, v1.TB, v2.TB), \
3695 "sabal2 v0." TAS ", v1." TBS ", v2." TBS);
3696 NEON_FORMAT_LIST_LW2(DISASM_INST)
3697 #undef DISASM_INST
3698
3699 #define DISASM_INST(TA, TAS, TB, TBS) \
3700 COMPARE(Uabal(v0.TA, v1.TB, v2.TB), "uabal v0." TAS ", v1." TBS \
3701 ", " \
3702 "v2." TBS);
3703 NEON_FORMAT_LIST_LW(DISASM_INST)
3704 #undef DISASM_INST
3705
3706 #define DISASM_INST(TA, TAS, TB, TBS) \
3707 COMPARE(Uabal2(v0.TA, v1.TB, v2.TB), \
3708 "uabal2 v0." TAS ", v1." TBS ", v2." TBS);
3709 NEON_FORMAT_LIST_LW2(DISASM_INST)
3710 #undef DISASM_INST
3711
3712 #define DISASM_INST(TA, TAS, TB, TBS) \
3713 COMPARE(Sabdl(v0.TA, v1.TB, v2.TB), "sabdl v0." TAS ", v1." TBS \
3714 ", " \
3715 "v2." TBS);
3716 NEON_FORMAT_LIST_LW(DISASM_INST)
3717 #undef DISASM_INST
3718
3719 #define DISASM_INST(TA, TAS, TB, TBS) \
3720 COMPARE(Sabdl2(v0.TA, v1.TB, v2.TB), \
3721 "sabdl2 v0." TAS ", v1." TBS ", v2." TBS);
3722 NEON_FORMAT_LIST_LW2(DISASM_INST)
3723 #undef DISASM_INST
3724
3725 #define DISASM_INST(TA, TAS, TB, TBS) \
3726 COMPARE(Uabdl(v0.TA, v1.TB, v2.TB), "uabdl v0." TAS ", v1." TBS \
3727 ", " \
3728 "v2." TBS);
3729 NEON_FORMAT_LIST_LW(DISASM_INST)
3730 #undef DISASM_INST
3731
3732 #define DISASM_INST(TA, TAS, TB, TBS) \
3733 COMPARE(Uabdl2(v0.TA, v1.TB, v2.TB), \
3734 "uabdl2 v0." TAS ", v1." TBS ", v2." TBS);
3735 NEON_FORMAT_LIST_LW2(DISASM_INST)
3736 #undef DISASM_INST
3737
3738 #define DISASM_INST(TA, TAS, TB, TBS) \
3739 COMPARE(Smlal(v0.TA, v1.TB, v2.TB), "smlal v0." TAS ", v1." TBS \
3740 ", " \
3741 "v2." TBS);
3742 NEON_FORMAT_LIST_LW(DISASM_INST)
3743 #undef DISASM_INST
3744
3745 #define DISASM_INST(TA, TAS, TB, TBS) \
3746 COMPARE(Smlal2(v0.TA, v1.TB, v2.TB), \
3747 "smlal2 v0." TAS ", v1." TBS ", v2." TBS);
3748 NEON_FORMAT_LIST_LW2(DISASM_INST)
3749 #undef DISASM_INST
3750
3751 #define DISASM_INST(TA, TAS, TB, TBS) \
3752 COMPARE(Umlsl(v0.TA, v1.TB, v2.TB), "umlsl v0." TAS ", v1." TBS \
3753 ", " \
3754 "v2." TBS);
3755 NEON_FORMAT_LIST_LW(DISASM_INST)
3756 #undef DISASM_INST
3757
3758 #define DISASM_INST(TA, TAS, TB, TBS) \
3759 COMPARE(Umlsl2(v0.TA, v1.TB, v2.TB), \
3760 "umlsl2 v0." TAS ", v1." TBS ", v2." TBS);
3761 NEON_FORMAT_LIST_LW2(DISASM_INST)
3762 #undef DISASM_INST
3763
3764 #define DISASM_INST(TA, TAS, TB, TBS) \
3765 COMPARE(Smlsl(v0.TA, v1.TB, v2.TB), "smlsl v0." TAS ", v1." TBS \
3766 ", " \
3767 "v2." TBS);
3768 NEON_FORMAT_LIST_LW(DISASM_INST)
3769 #undef DISASM_INST
3770
3771 #define DISASM_INST(TA, TAS, TB, TBS) \
3772 COMPARE(Smlsl2(v0.TA, v1.TB, v2.TB), \
3773 "smlsl2 v0." TAS ", v1." TBS ", v2." TBS);
3774 NEON_FORMAT_LIST_LW2(DISASM_INST)
3775 #undef DISASM_INST
3776
3777 #define DISASM_INST(TA, TAS, TB, TBS) \
3778 COMPARE(Umlsl(v0.TA, v1.TB, v2.TB), "umlsl v0." TAS ", v1." TBS \
3779 ", " \
3780 "v2." TBS);
3781 NEON_FORMAT_LIST_LW(DISASM_INST)
3782 #undef DISASM_INST
3783
3784 #define DISASM_INST(TA, TAS, TB, TBS) \
3785 COMPARE(Umlsl2(v0.TA, v1.TB, v2.TB), \
3786 "umlsl2 v0." TAS ", v1." TBS ", v2." TBS);
3787 NEON_FORMAT_LIST_LW2(DISASM_INST)
3788 #undef DISASM_INST
3789
3790 #define DISASM_INST(TA, TAS, TB, TBS) \
3791 COMPARE(Smull(v0.TA, v1.TB, v2.TB), "smull v0." TAS ", v1." TBS \
3792 ", " \
3793 "v2." TBS);
3794 NEON_FORMAT_LIST_LW(DISASM_INST)
3795 #undef DISASM_INST
3796
3797 #define DISASM_INST(TA, TAS, TB, TBS) \
3798 COMPARE(Smull2(v0.TA, v1.TB, v2.TB), \
3799 "smull2 v0." TAS ", v1." TBS ", v2." TBS);
3800 NEON_FORMAT_LIST_LW2(DISASM_INST)
3801 #undef DISASM_INST
3802
3803 #define DISASM_INST(TA, TAS, TB, TBS) \
3804 COMPARE(Umull(v0.TA, v1.TB, v2.TB), "umull v0." TAS ", v1." TBS \
3805 ", " \
3806 "v2." TBS);
3807 NEON_FORMAT_LIST_LW(DISASM_INST)
3808 #undef DISASM_INST
3809
3810 #define DISASM_INST(TA, TAS, TB, TBS) \
3811 COMPARE(Umull2(v0.TA, v1.TB, v2.TB), \
3812 "umull2 v0." TAS ", v1." TBS ", v2." TBS);
3813 NEON_FORMAT_LIST_LW2(DISASM_INST)
3814 #undef DISASM_INST
3815
3816 COMPARE(Sqdmull(v0.V4S(), v1.V4H(), v2.V4H()), "sqdmull v0.4s, v1.4h, v2.4h");
3817 COMPARE(Sqdmull(v1.V2D(), v2.V2S(), v3.V2S()), "sqdmull v1.2d, v2.2s, v3.2s");
3818 COMPARE(Sqdmull2(v2.V4S(), v3.V8H(), v4.V8H()),
3819 "sqdmull2 v2.4s, v3.8h, v4.8h");
3820 COMPARE(Sqdmull2(v3.V2D(), v4.V4S(), v5.V4S()),
3821 "sqdmull2 v3.2d, v4.4s, v5.4s");
3822 COMPARE(Sqdmull(s0, h1, h2), "sqdmull s0, h1, h2");
3823 COMPARE(Sqdmull(d1, s2, s3), "sqdmull d1, s2, s3");
3824
3825 COMPARE(Sqdmlal(v0.V4S(), v1.V4H(), v2.V4H()), "sqdmlal v0.4s, v1.4h, v2.4h");
3826 COMPARE(Sqdmlal(v1.V2D(), v2.V2S(), v3.V2S()), "sqdmlal v1.2d, v2.2s, v3.2s");
3827 COMPARE(Sqdmlal2(v2.V4S(), v3.V8H(), v4.V8H()),
3828 "sqdmlal2 v2.4s, v3.8h, v4.8h");
3829 COMPARE(Sqdmlal2(v3.V2D(), v4.V4S(), v5.V4S()),
3830 "sqdmlal2 v3.2d, v4.4s, v5.4s");
3831 COMPARE(Sqdmlal(s0, h1, h2), "sqdmlal s0, h1, h2");
3832 COMPARE(Sqdmlal(d1, s2, s3), "sqdmlal d1, s2, s3");
3833
3834 COMPARE(Sqdmlsl(v0.V4S(), v1.V4H(), v2.V4H()), "sqdmlsl v0.4s, v1.4h, v2.4h");
3835 COMPARE(Sqdmlsl(v1.V2D(), v2.V2S(), v3.V2S()), "sqdmlsl v1.2d, v2.2s, v3.2s");
3836 COMPARE(Sqdmlsl2(v2.V4S(), v3.V8H(), v4.V8H()),
3837 "sqdmlsl2 v2.4s, v3.8h, v4.8h");
3838 COMPARE(Sqdmlsl2(v3.V2D(), v4.V4S(), v5.V4S()),
3839 "sqdmlsl2 v3.2d, v4.4s, v5.4s");
3840 COMPARE(Sqdmlsl(s0, h1, h2), "sqdmlsl s0, h1, h2");
3841 COMPARE(Sqdmlsl(d1, s2, s3), "sqdmlsl d1, s2, s3");
3842
3843 COMPARE(Addhn(v0.V8B(), v1.V8H(), v2.V8H()), "addhn v0.8b, v1.8h, v2.8h");
3844 COMPARE(Addhn(v1.V4H(), v2.V4S(), v3.V4S()), "addhn v1.4h, v2.4s, v3.4s");
3845 COMPARE(Addhn(v2.V2S(), v3.V2D(), v4.V2D()), "addhn v2.2s, v3.2d, v4.2d");
3846 COMPARE(Addhn2(v0.V16B(), v1.V8H(), v5.V8H()), "addhn2 v0.16b, v1.8h, v5.8h");
3847 COMPARE(Addhn2(v1.V8H(), v2.V4S(), v6.V4S()), "addhn2 v1.8h, v2.4s, v6.4s");
3848 COMPARE(Addhn2(v2.V4S(), v3.V2D(), v7.V2D()), "addhn2 v2.4s, v3.2d, v7.2d");
3849
3850 COMPARE(Raddhn(v0.V8B(), v1.V8H(), v2.V8H()), "raddhn v0.8b, v1.8h, v2.8h");
3851 COMPARE(Raddhn(v1.V4H(), v2.V4S(), v3.V4S()), "raddhn v1.4h, v2.4s, v3.4s");
3852 COMPARE(Raddhn(v2.V2S(), v3.V2D(), v4.V2D()), "raddhn v2.2s, v3.2d, v4.2d");
3853 COMPARE(Raddhn2(v0.V16B(), v1.V8H(), v5.V8H()),
3854 "raddhn2 v0.16b, v1.8h, v5.8h");
3855 COMPARE(Raddhn2(v1.V8H(), v2.V4S(), v6.V4S()), "raddhn2 v1.8h, v2.4s, v6.4s");
3856 COMPARE(Raddhn2(v2.V4S(), v3.V2D(), v7.V2D()), "raddhn2 v2.4s, v3.2d, v7.2d");
3857
3858 COMPARE(Subhn(v1.V4H(), v2.V4S(), v3.V4S()), "subhn v1.4h, v2.4s, v3.4s");
3859 COMPARE(Subhn(v2.V2S(), v3.V2D(), v4.V2D()), "subhn v2.2s, v3.2d, v4.2d");
3860 COMPARE(Subhn2(v0.V16B(), v1.V8H(), v5.V8H()), "subhn2 v0.16b, v1.8h, v5.8h");
3861 COMPARE(Subhn2(v1.V8H(), v2.V4S(), v6.V4S()), "subhn2 v1.8h, v2.4s, v6.4s");
3862 COMPARE(Subhn2(v2.V4S(), v3.V2D(), v7.V2D()), "subhn2 v2.4s, v3.2d, v7.2d");
3863
3864 COMPARE(Rsubhn(v0.V8B(), v1.V8H(), v2.V8H()), "rsubhn v0.8b, v1.8h, v2.8h");
3865 COMPARE(Rsubhn(v1.V4H(), v2.V4S(), v3.V4S()), "rsubhn v1.4h, v2.4s, v3.4s");
3866 COMPARE(Rsubhn(v2.V2S(), v3.V2D(), v4.V2D()), "rsubhn v2.2s, v3.2d, v4.2d");
3867 COMPARE(Rsubhn2(v0.V16B(), v1.V8H(), v5.V8H()),
3868 "rsubhn2 v0.16b, v1.8h, v5.8h");
3869 COMPARE(Rsubhn2(v1.V8H(), v2.V4S(), v6.V4S()), "rsubhn2 v1.8h, v2.4s, v6.4s");
3870 COMPARE(Rsubhn2(v2.V4S(), v3.V2D(), v7.V2D()), "rsubhn2 v2.4s, v3.2d, v7.2d");
3871
3872 COMPARE(Pmull(v0.V8H(), v1.V8B(), v2.V8B()), "pmull v0.8h, v1.8b, v2.8b");
3873 COMPARE(Pmull2(v2.V8H(), v3.V16B(), v4.V16B()),
3874 "pmull2 v2.8h, v3.16b, v4.16b");
3875
3876 CLEANUP();
3877 }
3878
3879 TEST(neon_perm) {
3880 SET_UP_MASM();
3881
3882 #define DISASM_INST(M, S) \
3883 COMPARE(Trn1(v0.M, v1.M, v2.M), "trn1 v0." S ", v1." S ", v2." S);
3884 NEON_FORMAT_LIST(DISASM_INST)
3885 #undef DISASM_INST
3886
3887 #define DISASM_INST(M, S) \
3888 COMPARE(Trn2(v0.M, v1.M, v2.M), "trn2 v0." S ", v1." S ", v2." S);
3889 NEON_FORMAT_LIST(DISASM_INST)
3890 #undef DISASM_INST
3891
3892 #define DISASM_INST(M, S) \
3893 COMPARE(Uzp1(v0.M, v1.M, v2.M), "uzp1 v0." S ", v1." S ", v2." S);
3894 NEON_FORMAT_LIST(DISASM_INST)
3895 #undef DISASM_INST
3896
3897 #define DISASM_INST(M, S) \
3898 COMPARE(Uzp2(v0.M, v1.M, v2.M), "uzp2 v0." S ", v1." S ", v2." S);
3899 NEON_FORMAT_LIST(DISASM_INST)
3900 #undef DISASM_INST
3901
3902 #define DISASM_INST(M, S) \
3903 COMPARE(Zip1(v0.M, v1.M, v2.M), "zip1 v0." S ", v1." S ", v2." S);
3904 NEON_FORMAT_LIST(DISASM_INST)
3905 #undef DISASM_INST
3906
3907 #define DISASM_INST(M, S) \
3908 COMPARE(Zip2(v0.M, v1.M, v2.M), "zip2 v0." S ", v1." S ", v2." S);
3909 NEON_FORMAT_LIST(DISASM_INST)
3910 #undef DISASM_INST
3911
3912 CLEANUP();
3913 }
3914
3915 TEST(neon_copy) {
3916 SET_UP_MASM();
3917
3918 COMPARE(Ins(v1.V16B(), 4, v5.V16B(), 0), "mov v1.b[4], v5.b[0]");
3919 COMPARE(Ins(v2.V8B(), 5, v6.V8B(), 1), "mov v2.b[5], v6.b[1]");
3920 COMPARE(Ins(v3.B(), 6, v7.B(), 2), "mov v3.b[6], v7.b[2]");
3921 COMPARE(Ins(v4.V8H(), 7, v8_.V8H(), 3), "mov v4.h[7], v8.h[3]");
3922 COMPARE(Ins(v5.V4H(), 3, v9.V4H(), 0), "mov v5.h[3], v9.h[0]");
3923 COMPARE(Ins(v6.H(), 6, v1.H(), 1), "mov v6.h[6], v1.h[1]");
3924 COMPARE(Ins(v7.V4S(), 2, v2.V4S(), 2), "mov v7.s[2], v2.s[2]");
3925 COMPARE(Ins(v8_.V2S(), 1, v3.V2S(), 0), "mov v8.s[1], v3.s[0]");
3926 COMPARE(Ins(v9.S(), 0, v4.S(), 1), "mov v9.s[0], v4.s[1]");
3927 COMPARE(Ins(v1.V2D(), 1, v5.V2D(), 0), "mov v1.d[1], v5.d[0]");
3928 COMPARE(Ins(v2.D(), 0, v6.D(), 1), "mov v2.d[0], v6.d[1]");
3929
3930 COMPARE(Mov(v3.V16B(), 4, v7.V16B(), 0), "mov v3.b[4], v7.b[0]");
3931 COMPARE(Mov(v4.V8B(), 5, v8_.V8B(), 1), "mov v4.b[5], v8.b[1]");
3932 COMPARE(Mov(v5.B(), 6, v9.B(), 2), "mov v5.b[6], v9.b[2]");
3933 COMPARE(Mov(v6.V8H(), 7, v1.V8H(), 3), "mov v6.h[7], v1.h[3]");
3934 COMPARE(Mov(v7.V4H(), 0, v2.V4H(), 0), "mov v7.h[0], v2.h[0]");
3935 COMPARE(Mov(v8_.H(), 1, v3.H(), 1), "mov v8.h[1], v3.h[1]");
3936 COMPARE(Mov(v9.V4S(), 2, v4.V4S(), 2), "mov v9.s[2], v4.s[2]");
3937 COMPARE(Mov(v1.V2S(), 3, v5.V2S(), 0), "mov v1.s[3], v5.s[0]");
3938 COMPARE(Mov(v2.S(), 0, v6.S(), 1), "mov v2.s[0], v6.s[1]");
3939 COMPARE(Mov(v3.V2D(), 1, v7.V2D(), 0), "mov v3.d[1], v7.d[0]");
3940 COMPARE(Mov(v4.D(), 0, v8_.D(), 1), "mov v4.d[0], v8.d[1]");
3941
3942 COMPARE(Ins(v1.V16B(), 4, w0), "mov v1.b[4], w0");
3943 COMPARE(Ins(v2.V8B(), 5, w1), "mov v2.b[5], w1");
3944 COMPARE(Ins(v3.B(), 6, w2), "mov v3.b[6], w2");
3945 COMPARE(Ins(v4.V8H(), 7, w3), "mov v4.h[7], w3");
3946 COMPARE(Ins(v5.V4H(), 3, w0), "mov v5.h[3], w0");
3947 COMPARE(Ins(v6.H(), 6, w1), "mov v6.h[6], w1");
3948 COMPARE(Ins(v7.V4S(), 2, w2), "mov v7.s[2], w2");
3949 COMPARE(Ins(v8_.V2S(), 1, w0), "mov v8.s[1], w0");
3950 COMPARE(Ins(v9.S(), 0, w1), "mov v9.s[0], w1");
3951 COMPARE(Ins(v1.V2D(), 1, x0), "mov v1.d[1], x0");
3952 COMPARE(Ins(v2.D(), 0, x1), "mov v2.d[0], x1");
3953
3954 COMPARE(Mov(v1.V16B(), 4, w0), "mov v1.b[4], w0");
3955 COMPARE(Mov(v2.V8B(), 5, w1), "mov v2.b[5], w1");
3956 COMPARE(Mov(v3.B(), 6, w2), "mov v3.b[6], w2");
3957 COMPARE(Mov(v4.V8H(), 7, w3), "mov v4.h[7], w3");
3958 COMPARE(Mov(v5.V4H(), 3, w0), "mov v5.h[3], w0");
3959 COMPARE(Mov(v6.H(), 6, w1), "mov v6.h[6], w1");
3960 COMPARE(Mov(v7.V4S(), 2, w2), "mov v7.s[2], w2");
3961 COMPARE(Mov(v8_.V2S(), 1, w0), "mov v8.s[1], w0");
3962 COMPARE(Mov(v9.S(), 0, w1), "mov v9.s[0], w1");
3963 COMPARE(Mov(v1.V2D(), 1, x0), "mov v1.d[1], x0");
3964 COMPARE(Mov(v2.D(), 0, x1), "mov v2.d[0], x1");
3965
3966 COMPARE(Dup(v5.V8B(), v9.V8B(), 6), "dup v5.8b, v9.b[6]");
3967 COMPARE(Dup(v6.V16B(), v1.V16B(), 5), "dup v6.16b, v1.b[5]");
3968 COMPARE(Dup(v7.V4H(), v2.V4H(), 4), "dup v7.4h, v2.h[4]");
3969 COMPARE(Dup(v8_.V8H(), v3.V8H(), 3), "dup v8.8h, v3.h[3]");
3970 COMPARE(Dup(v9.V2S(), v4.V2S(), 2), "dup v9.2s, v4.s[2]");
3971 COMPARE(Dup(v1.V4S(), v5.V4S(), 1), "dup v1.4s, v5.s[1]");
3972 COMPARE(Dup(v2.V2D(), v6.V2D(), 0), "dup v2.2d, v6.d[0]");
3973
3974 COMPARE(Dup(v5.B(), v9.B(), 6), "mov b5, v9.b[6]");
3975 COMPARE(Dup(v7.H(), v2.H(), 4), "mov h7, v2.h[4]");
3976 COMPARE(Dup(v9.S(), v4.S(), 2), "mov s9, v4.s[2]");
3977 COMPARE(Dup(v2.D(), v6.D(), 0), "mov d2, v6.d[0]");
3978
3979 COMPARE(Mov(v5.B(), v9.B(), 6), "mov b5, v9.b[6]");
3980 COMPARE(Mov(v7.H(), v2.H(), 4), "mov h7, v2.h[4]");
3981 COMPARE(Mov(v9.S(), v4.S(), 2), "mov s9, v4.s[2]");
3982 COMPARE(Mov(v2.D(), v6.D(), 0), "mov d2, v6.d[0]");
3983
3984 COMPARE(Mov(v0.B(), v1.V8B(), 7), "mov b0, v1.b[7]");
3985 COMPARE(Mov(b2, v3.V16B(), 15), "mov b2, v3.b[15]");
3986 COMPARE(Mov(v4.H(), v5.V4H(), 3), "mov h4, v5.h[3]");
3987 COMPARE(Mov(h6, v7.V8H(), 7), "mov h6, v7.h[7]");
3988 COMPARE(Mov(v8_.S(), v9.V2S(), 1), "mov s8, v9.s[1]");
3989 COMPARE(Mov(s10, v11.V4S(), 3), "mov s10, v11.s[3]");
3990 COMPARE(Mov(v12.D(), v13.V2D(), 1), "mov d12, v13.d[1]");
3991
3992 COMPARE(Dup(v5.V8B(), w0), "dup v5.8b, w0");
3993 COMPARE(Dup(v6.V16B(), w1), "dup v6.16b, w1");
3994 COMPARE(Dup(v7.V4H(), w2), "dup v7.4h, w2");
3995 COMPARE(Dup(v8_.V8H(), w3), "dup v8.8h, w3");
3996 COMPARE(Dup(v9.V2S(), w4), "dup v9.2s, w4");
3997 COMPARE(Dup(v1.V4S(), w5), "dup v1.4s, w5");
3998 COMPARE(Dup(v2.V2D(), x6), "dup v2.2d, x6");
3999
4000 COMPARE(Smov(w0, v1.V16B(), 4), "smov w0, v1.b[4]");
4001 COMPARE(Smov(w1, v2.V8B(), 5), "smov w1, v2.b[5]");
4002 COMPARE(Smov(w2, v3.B(), 6), "smov w2, v3.b[6]");
4003 COMPARE(Smov(w3, v4.V8H(), 7), "smov w3, v4.h[7]");
4004 COMPARE(Smov(w0, v5.V4H(), 3), "smov w0, v5.h[3]");
4005 COMPARE(Smov(w1, v6.H(), 6), "smov w1, v6.h[6]");
4006
4007 COMPARE(Smov(x0, v1.V16B(), 4), "smov x0, v1.b[4]");
4008 COMPARE(Smov(x1, v2.V8B(), 5), "smov x1, v2.b[5]");
4009 COMPARE(Smov(x2, v3.B(), 6), "smov x2, v3.b[6]");
4010 COMPARE(Smov(x3, v4.V8H(), 7), "smov x3, v4.h[7]");
4011 COMPARE(Smov(x0, v5.V4H(), 3), "smov x0, v5.h[3]");
4012 COMPARE(Smov(x1, v6.H(), 6), "smov x1, v6.h[6]");
4013 COMPARE(Smov(x2, v7.V4S(), 2), "smov x2, v7.s[2]");
4014 COMPARE(Smov(x0, v8_.V2S(), 1), "smov x0, v8.s[1]");
4015 COMPARE(Smov(x1, v9.S(), 0), "smov x1, v9.s[0]");
4016
4017 COMPARE(Umov(w0, v1.V16B(), 4), "umov w0, v1.b[4]");
4018 COMPARE(Umov(w1, v2.V8B(), 5), "umov w1, v2.b[5]");
4019 COMPARE(Umov(w2, v3.B(), 6), "umov w2, v3.b[6]");
4020 COMPARE(Umov(w3, v4.V8H(), 7), "umov w3, v4.h[7]");
4021 COMPARE(Umov(w0, v5.V4H(), 3), "umov w0, v5.h[3]");
4022 COMPARE(Umov(w1, v6.H(), 6), "umov w1, v6.h[6]");
4023 COMPARE(Umov(w2, v7.V4S(), 2), "mov w2, v7.s[2]");
4024 COMPARE(Umov(w0, v8_.V2S(), 1), "mov w0, v8.s[1]");
4025 COMPARE(Umov(w1, v9.S(), 0), "mov w1, v9.s[0]");
4026 COMPARE(Umov(x0, v1.V2D(), 1), "mov x0, v1.d[1]");
4027 COMPARE(Umov(x1, v2.D(), 0), "mov x1, v2.d[0]");
4028
4029 COMPARE(Mov(w2, v7.V4S(), 2), "mov w2, v7.s[2]");
4030 COMPARE(Mov(w0, v8_.V2S(), 1), "mov w0, v8.s[1]");
4031 COMPARE(Mov(w1, v9.S(), 0), "mov w1, v9.s[0]");
4032 COMPARE(Mov(x0, v1.V2D(), 1), "mov x0, v1.d[1]");
4033 COMPARE(Mov(x1, v2.D(), 0), "mov x1, v2.d[0]");
4034
4035 CLEANUP();
4036 }
4037
4038 TEST(neon_extract) {
4039 SET_UP_MASM();
4040
4041 COMPARE(Ext(v4.V8B(), v5.V8B(), v6.V8B(), 0), "ext v4.8b, v5.8b, v6.8b, #0");
4042 COMPARE(Ext(v1.V8B(), v2.V8B(), v3.V8B(), 7), "ext v1.8b, v2.8b, v3.8b, #7");
4043 COMPARE(Ext(v1.V16B(), v2.V16B(), v3.V16B(), 0),
4044 "ext v1.16b, v2.16b, v3.16b, #0");
4045 COMPARE(Ext(v1.V16B(), v2.V16B(), v3.V16B(), 15),
4046 "ext v1.16b, v2.16b, v3.16b, #15");
4047
4048 CLEANUP();
4049 }
4050
4051 TEST(neon_table) {
4052 SET_UP_MASM();
4053
4054 COMPARE(Tbl(v0.V8B(), v1.V16B(), v2.V8B()), "tbl v0.8b, {v1.16b}, v2.8b");
4055 COMPARE(Tbl(v3.V8B(), v4.V16B(), v5.V16B(), v6.V8B()),
4056 "tbl v3.8b, {v4.16b, v5.16b}, v6.8b");
4057 COMPARE(Tbl(v7.V8B(), v8_.V16B(), v9.V16B(), v10.V16B(), v11.V8B()),
4058 "tbl v7.8b, {v8.16b, v9.16b, v10.16b}, v11.8b");
4059 COMPARE(
4060 Tbl(v12.V8B(), v13.V16B(), v14.V16B(), v15.V16B(), v16.V16B(), v17.V8B()),
4061 "tbl v12.8b, {v13.16b, v14.16b, v15.16b, v16.16b}, v17.8b");
4062 COMPARE(Tbl(v18.V16B(), v19.V16B(), v20.V16B()),
4063 "tbl v18.16b, {v19.16b}, v20.16b");
4064 COMPARE(Tbl(v21.V16B(), v22.V16B(), v23.V16B(), v24.V16B()),
4065 "tbl v21.16b, {v22.16b, v23.16b}, v24.16b");
4066 COMPARE(Tbl(v25.V16B(), v26.V16B(), v27.V16B(), v28.V16B(), v29.V16B()),
4067 "tbl v25.16b, {v26.16b, v27.16b, v28.16b}, v29.16b");
4068 COMPARE(
4069 Tbl(v30.V16B(), v31.V16B(), v0.V16B(), v1.V16B(), v2.V16B(), v3.V16B()),
4070 "tbl v30.16b, {v31.16b, v0.16b, v1.16b, v2.16b}, v3.16b");
4071
4072 COMPARE(Tbx(v0.V8B(), v1.V16B(), v2.V8B()), "tbx v0.8b, {v1.16b}, v2.8b");
4073 COMPARE(Tbx(v3.V8B(), v4.V16B(), v5.V16B(), v6.V8B()),
4074 "tbx v3.8b, {v4.16b, v5.16b}, v6.8b");
4075 COMPARE(Tbx(v7.V8B(), v8_.V16B(), v9.V16B(), v10.V16B(), v11.V8B()),
4076 "tbx v7.8b, {v8.16b, v9.16b, v10.16b}, v11.8b");
4077 COMPARE(
4078 Tbx(v12.V8B(), v13.V16B(), v14.V16B(), v15.V16B(), v16.V16B(), v17.V8B()),
4079 "tbx v12.8b, {v13.16b, v14.16b, v15.16b, v16.16b}, v17.8b");
4080 COMPARE(Tbx(v18.V16B(), v19.V16B(), v20.V16B()),
4081 "tbx v18.16b, {v19.16b}, v20.16b");
4082 COMPARE(Tbx(v21.V16B(), v22.V16B(), v23.V16B(), v24.V16B()),
4083 "tbx v21.16b, {v22.16b, v23.16b}, v24.16b");
4084 COMPARE(Tbx(v25.V16B(), v26.V16B(), v27.V16B(), v28.V16B(), v29.V16B()),
4085 "tbx v25.16b, {v26.16b, v27.16b, v28.16b}, v29.16b");
4086 COMPARE(
4087 Tbx(v30.V16B(), v31.V16B(), v0.V16B(), v1.V16B(), v2.V16B(), v3.V16B()),
4088 "tbx v30.16b, {v31.16b, v0.16b, v1.16b, v2.16b}, v3.16b");
4089
4090 CLEANUP();
4091 }
4092
4093 TEST(neon_modimm) {
4094 SET_UP_MASM();
4095
4096 COMPARE(Orr(v4.V4H(), 0xaa, 0), "orr v4.4h, #0xaa, lsl #0");
4097 COMPARE(Orr(v1.V8H(), 0xcc, 8), "orr v1.8h, #0xcc, lsl #8");
4098 COMPARE(Orr(v4.V2S(), 0xaa, 0), "orr v4.2s, #0xaa, lsl #0");
4099 COMPARE(Orr(v1.V2S(), 0xcc, 8), "orr v1.2s, #0xcc, lsl #8");
4100 COMPARE(Orr(v4.V4S(), 0xaa, 16), "orr v4.4s, #0xaa, lsl #16");
4101 COMPARE(Orr(v1.V4S(), 0xcc, 24), "orr v1.4s, #0xcc, lsl #24");
4102
4103 COMPARE(Bic(v4.V4H(), 0xaa, 0), "bic v4.4h, #0xaa, lsl #0");
4104 COMPARE(Bic(v1.V8H(), 0xcc, 8), "bic v1.8h, #0xcc, lsl #8");
4105 COMPARE(Bic(v4.V2S(), 0xaa, 0), "bic v4.2s, #0xaa, lsl #0");
4106 COMPARE(Bic(v1.V2S(), 0xcc, 8), "bic v1.2s, #0xcc, lsl #8");
4107 COMPARE(Bic(v4.V4S(), 0xaa, 16), "bic v4.4s, #0xaa, lsl #16");
4108 COMPARE(Bic(v1.V4S(), 0xcc, 24), "bic v1.4s, #0xcc, lsl #24");
4109
4110 COMPARE(Mvni(v4.V4H(), 0xaa, LSL, 0), "mvni v4.4h, #0xaa, lsl #0");
4111 COMPARE(Mvni(v1.V8H(), 0xcc, LSL, 8), "mvni v1.8h, #0xcc, lsl #8");
4112 COMPARE(Mvni(v4.V2S(), 0xaa, LSL, 0), "mvni v4.2s, #0xaa, lsl #0");
4113 COMPARE(Mvni(v1.V2S(), 0xcc, LSL, 8), "mvni v1.2s, #0xcc, lsl #8");
4114 COMPARE(Mvni(v4.V4S(), 0xaa, LSL, 16), "mvni v4.4s, #0xaa, lsl #16");
4115 COMPARE(Mvni(v1.V4S(), 0xcc, LSL, 24), "mvni v1.4s, #0xcc, lsl #24");
4116
4117 COMPARE(Mvni(v4.V2S(), 0xaa, MSL, 8), "mvni v4.2s, #0xaa, msl #8");
4118 COMPARE(Mvni(v1.V2S(), 0xcc, MSL, 16), "mvni v1.2s, #0xcc, msl #16");
4119 COMPARE(Mvni(v4.V4S(), 0xaa, MSL, 8), "mvni v4.4s, #0xaa, msl #8");
4120 COMPARE(Mvni(v1.V4S(), 0xcc, MSL, 16), "mvni v1.4s, #0xcc, msl #16");
4121
4122 COMPARE(Movi(v4.V8B(), 0xaa), "movi v4.8b, #0xaa");
4123 COMPARE(Movi(v1.V16B(), 0xcc), "movi v1.16b, #0xcc");
4124
4125 COMPARE(Movi(v4.V4H(), 0xaa, LSL, 0), "movi v4.4h, #0xaa, lsl #0");
4126 COMPARE(Movi(v1.V8H(), 0xcc, LSL, 8), "movi v1.8h, #0xcc, lsl #8");
4127
4128 COMPARE(Movi(v4.V2S(), 0xaa, LSL, 0), "movi v4.2s, #0xaa, lsl #0");
4129 COMPARE(Movi(v1.V2S(), 0xcc, LSL, 8), "movi v1.2s, #0xcc, lsl #8");
4130 COMPARE(Movi(v4.V4S(), 0xaa, LSL, 16), "movi v4.4s, #0xaa, lsl #16");
4131 COMPARE(Movi(v1.V4S(), 0xcc, LSL, 24), "movi v1.4s, #0xcc, lsl #24");
4132
4133 COMPARE(Movi(v4.V2S(), 0xaa, MSL, 8), "movi v4.2s, #0xaa, msl #8");
4134 COMPARE(Movi(v1.V2S(), 0xcc, MSL, 16), "movi v1.2s, #0xcc, msl #16");
4135 COMPARE(Movi(v4.V4S(), 0xaa, MSL, 8), "movi v4.4s, #0xaa, msl #8");
4136 COMPARE(Movi(v1.V4S(), 0xcc, MSL, 16), "movi v1.4s, #0xcc, msl #16");
4137
4138 COMPARE(Movi(d2, 0xffff0000ffffff), "movi d2, #0xffff0000ffffff");
4139 COMPARE(Movi(v1.V2D(), 0xffff0000ffffff), "movi v1.2d, #0xffff0000ffffff");
4140
4141 COMPARE(Fmov(v0.V2S(), 1.0f), "fmov v0.2s, #0x70 (1.0000)");
4142 COMPARE(Fmov(v31.V2S(), -13.0f), "fmov v31.2s, #0xaa (-13.0000)");
4143 COMPARE(Fmov(v0.V4S(), 1.0f), "fmov v0.4s, #0x70 (1.0000)");
4144 COMPARE(Fmov(v31.V4S(), -13.0f), "fmov v31.4s, #0xaa (-13.0000)");
4145 COMPARE(Fmov(v1.V2D(), 1.0), "fmov v1.2d, #0x70 (1.0000)");
4146 COMPARE(Fmov(v29.V2D(), -13.0), "fmov v29.2d, #0xaa (-13.0000)");
4147
4148 // An unallocated form of fmov.
4149 COMPARE(dci(0x2f07ffff), "unallocated (NEONModifiedImmediate)");
4150
4151 CLEANUP();
4152 }
4153
4154 TEST(neon_2regmisc) {
4155 SET_UP_MASM();
4156
4157 COMPARE(Shll(v1.V8H(), v8_.V8B(), 8), "shll v1.8h, v8.8b, #8");
4158 COMPARE(Shll(v3.V4S(), v1.V4H(), 16), "shll v3.4s, v1.4h, #16");
4159 COMPARE(Shll(v5.V2D(), v3.V2S(), 32), "shll v5.2d, v3.2s, #32");
4160 COMPARE(Shll2(v2.V8H(), v9.V16B(), 8), "shll2 v2.8h, v9.16b, #8");
4161 COMPARE(Shll2(v4.V4S(), v2.V8H(), 16), "shll2 v4.4s, v2.8h, #16");
4162 COMPARE(Shll2(v6.V2D(), v4.V4S(), 32), "shll2 v6.2d, v4.4s, #32");
4163
4164 // An unallocated form of shll.
4165 COMPARE(dci(0x2ee13bff), "unallocated (NEON2RegMisc)");
4166 // An unallocated form of shll2.
4167 COMPARE(dci(0x6ee13bff), "unallocated (NEON2RegMisc)");
4168
4169 #define DISASM_INST(M, S) \
4170 COMPARE(Cmeq(v0.M, v1.M, 0), "cmeq v0." S ", v1." S ", #0");
4171 NEON_FORMAT_LIST(DISASM_INST)
4172 #undef DISASM_INST
4173
4174 #define DISASM_INST(M, S) \
4175 COMPARE(Cmge(v0.M, v1.M, 0), "cmge v0." S ", v1." S ", #0");
4176 NEON_FORMAT_LIST(DISASM_INST)
4177 #undef DISASM_INST
4178
4179 #define DISASM_INST(M, S) \
4180 COMPARE(Cmgt(v0.M, v1.M, 0), "cmgt v0." S ", v1." S ", #0");
4181 NEON_FORMAT_LIST(DISASM_INST)
4182 #undef DISASM_INST
4183
4184 #define DISASM_INST(M, S) \
4185 COMPARE(Cmle(v0.M, v1.M, 0), "cmle v0." S ", v1." S ", #0");
4186 NEON_FORMAT_LIST(DISASM_INST)
4187 #undef DISASM_INST
4188
4189 #define DISASM_INST(M, S) \
4190 COMPARE(Cmlt(v0.M, v1.M, 0), "cmlt v0." S ", v1." S ", #0");
4191 NEON_FORMAT_LIST(DISASM_INST)
4192 #undef DISASM_INST
4193
4194 COMPARE(Cmeq(v0.D(), v1.D(), 0), "cmeq d0, d1, #0");
4195 COMPARE(Cmge(v3.D(), v4.D(), 0), "cmge d3, d4, #0");
4196 COMPARE(Cmgt(v6.D(), v7.D(), 0), "cmgt d6, d7, #0");
4197 COMPARE(Cmle(v0.D(), v1.D(), 0), "cmle d0, d1, #0");
4198 COMPARE(Cmlt(v3.D(), v4.D(), 0), "cmlt d3, d4, #0");
4199
4200 #define DISASM_INST(M, S) \
4201 COMPARE(Fcmeq(v0.M, v1.M, 0), "fcmeq v0." S ", v1." S ", #0.0");
4202 NEON_FORMAT_LIST_FP(DISASM_INST)
4203 #undef DISASM_INST
4204
4205 COMPARE(Fcmeq(v0.S(), v1.S(), 0), "fcmeq s0, s1, #0.0");
4206 COMPARE(Fcmeq(v0.D(), v1.D(), 0), "fcmeq d0, d1, #0.0");
4207
4208 #define DISASM_INST(M, S) \
4209 COMPARE(Fcmge(v0.M, v1.M, 0), "fcmge v0." S ", v1." S ", #0.0");
4210 NEON_FORMAT_LIST_FP(DISASM_INST)
4211 #undef DISASM_INST
4212
4213 COMPARE(Fcmge(v0.S(), v1.S(), 0), "fcmge s0, s1, #0.0");
4214 COMPARE(Fcmge(v0.D(), v1.D(), 0), "fcmge d0, d1, #0.0");
4215
4216 #define DISASM_INST(M, S) \
4217 COMPARE(Fcmgt(v0.M, v1.M, 0), "fcmgt v0." S ", v1." S ", #0.0");
4218 NEON_FORMAT_LIST_FP(DISASM_INST)
4219 #undef DISASM_INST
4220
4221 COMPARE(Fcmgt(v0.S(), v1.S(), 0), "fcmgt s0, s1, #0.0");
4222 COMPARE(Fcmgt(v0.D(), v1.D(), 0), "fcmgt d0, d1, #0.0");
4223
4224 #define DISASM_INST(M, S) \
4225 COMPARE(Fcmle(v0.M, v1.M, 0), "fcmle v0." S ", v1." S ", #0.0");
4226 NEON_FORMAT_LIST_FP(DISASM_INST)
4227 #undef DISASM_INST
4228
4229 COMPARE(Fcmle(v0.S(), v1.S(), 0), "fcmle s0, s1, #0.0");
4230 COMPARE(Fcmle(v0.D(), v1.D(), 0), "fcmle d0, d1, #0.0");
4231
4232 #define DISASM_INST(M, S) \
4233 COMPARE(Fcmlt(v0.M, v1.M, 0), "fcmlt v0." S ", v1." S ", #0.0");
4234 NEON_FORMAT_LIST_FP(DISASM_INST)
4235 #undef DISASM_INST
4236
4237 COMPARE(Fcmlt(v0.S(), v1.S(), 0), "fcmlt s0, s1, #0.0");
4238 COMPARE(Fcmlt(v0.D(), v1.D(), 0), "fcmlt d0, d1, #0.0");
4239
4240 #define DISASM_INST(M, S) COMPARE(Neg(v0.M, v1.M), "neg v0." S ", v1." S);
4241 NEON_FORMAT_LIST(DISASM_INST)
4242 #undef DISASM_INST
4243
4244 COMPARE(Neg(v0.D(), v1.D()), "neg d0, d1");
4245
4246 #define DISASM_INST(M, S) COMPARE(Sqneg(v0.M, v1.M), "sqneg v0." S ", v1." S);
4247 NEON_FORMAT_LIST(DISASM_INST)
4248 #undef DISASM_INST
4249
4250 COMPARE(Sqneg(b0, b1), "sqneg b0, b1");
4251 COMPARE(Sqneg(h1, h2), "sqneg h1, h2");
4252 COMPARE(Sqneg(s2, s3), "sqneg s2, s3");
4253 COMPARE(Sqneg(d3, d4), "sqneg d3, d4");
4254
4255 #define DISASM_INST(M, S) COMPARE(Abs(v0.M, v1.M), "abs v0." S ", v1." S);
4256 NEON_FORMAT_LIST(DISASM_INST)
4257 #undef DISASM_INST
4258
4259 COMPARE(Abs(v0.D(), v1.D()), "abs d0, d1");
4260
4261 #define DISASM_INST(M, S) COMPARE(Sqabs(v0.M, v1.M), "sqabs v0." S ", v1." S);
4262 NEON_FORMAT_LIST(DISASM_INST)
4263 #undef DISASM_INST
4264
4265 COMPARE(Sqabs(b0, b1), "sqabs b0, b1");
4266 COMPARE(Sqabs(h1, h2), "sqabs h1, h2");
4267 COMPARE(Sqabs(s2, s3), "sqabs s2, s3");
4268 COMPARE(Sqabs(d3, d4), "sqabs d3, d4");
4269
4270 #define DISASM_INST(M, S) COMPARE(Suqadd(v0.M, v1.M), "suqadd v0." S ", v1." S);
4271 NEON_FORMAT_LIST(DISASM_INST)
4272 #undef DISASM_INST
4273
4274 COMPARE(Suqadd(b0, b1), "suqadd b0, b1");
4275 COMPARE(Suqadd(h1, h2), "suqadd h1, h2");
4276 COMPARE(Suqadd(s2, s3), "suqadd s2, s3");
4277 COMPARE(Suqadd(d3, d4), "suqadd d3, d4");
4278
4279 #define DISASM_INST(M, S) COMPARE(Usqadd(v0.M, v1.M), "usqadd v0." S ", v1." S);
4280 NEON_FORMAT_LIST(DISASM_INST)
4281 #undef DISASM_INST
4282
4283 COMPARE(Usqadd(b0, b1), "usqadd b0, b1");
4284 COMPARE(Usqadd(h1, h2), "usqadd h1, h2");
4285 COMPARE(Usqadd(s2, s3), "usqadd s2, s3");
4286 COMPARE(Usqadd(d3, d4), "usqadd d3, d4");
4287
4288 COMPARE(Xtn(v0.V8B(), v1.V8H()), "xtn v0.8b, v1.8h");
4289 COMPARE(Xtn(v1.V4H(), v2.V4S()), "xtn v1.4h, v2.4s");
4290 COMPARE(Xtn(v2.V2S(), v3.V2D()), "xtn v2.2s, v3.2d");
4291 COMPARE(Xtn2(v0.V16B(), v1.V8H()), "xtn2 v0.16b, v1.8h");
4292 COMPARE(Xtn2(v1.V8H(), v2.V4S()), "xtn2 v1.8h, v2.4s");
4293 COMPARE(Xtn2(v2.V4S(), v3.V2D()), "xtn2 v2.4s, v3.2d");
4294
4295 COMPARE(Sqxtn(v0.V8B(), v1.V8H()), "sqxtn v0.8b, v1.8h");
4296 COMPARE(Sqxtn(v1.V4H(), v2.V4S()), "sqxtn v1.4h, v2.4s");
4297 COMPARE(Sqxtn(v2.V2S(), v3.V2D()), "sqxtn v2.2s, v3.2d");
4298 COMPARE(Sqxtn2(v0.V16B(), v1.V8H()), "sqxtn2 v0.16b, v1.8h");
4299 COMPARE(Sqxtn2(v1.V8H(), v2.V4S()), "sqxtn2 v1.8h, v2.4s");
4300 COMPARE(Sqxtn2(v2.V4S(), v3.V2D()), "sqxtn2 v2.4s, v3.2d");
4301 COMPARE(Sqxtn(b19, h0), "sqxtn b19, h0");
4302 COMPARE(Sqxtn(h20, s0), "sqxtn h20, s0");
4303 COMPARE(Sqxtn(s21, d0), "sqxtn s21, d0");
4304
4305 COMPARE(Uqxtn(v0.V8B(), v1.V8H()), "uqxtn v0.8b, v1.8h");
4306 COMPARE(Uqxtn(v1.V4H(), v2.V4S()), "uqxtn v1.4h, v2.4s");
4307 COMPARE(Uqxtn(v2.V2S(), v3.V2D()), "uqxtn v2.2s, v3.2d");
4308 COMPARE(Uqxtn2(v0.V16B(), v1.V8H()), "uqxtn2 v0.16b, v1.8h");
4309 COMPARE(Uqxtn2(v1.V8H(), v2.V4S()), "uqxtn2 v1.8h, v2.4s");
4310 COMPARE(Uqxtn2(v2.V4S(), v3.V2D()), "uqxtn2 v2.4s, v3.2d");
4311 COMPARE(Uqxtn(b19, h0), "uqxtn b19, h0");
4312 COMPARE(Uqxtn(h20, s0), "uqxtn h20, s0");
4313 COMPARE(Uqxtn(s21, d0), "uqxtn s21, d0");
4314
4315 COMPARE(Sqxtun(v0.V8B(), v1.V8H()), "sqxtun v0.8b, v1.8h");
4316 COMPARE(Sqxtun(v1.V4H(), v2.V4S()), "sqxtun v1.4h, v2.4s");
4317 COMPARE(Sqxtun(v2.V2S(), v3.V2D()), "sqxtun v2.2s, v3.2d");
4318 COMPARE(Sqxtun2(v0.V16B(), v1.V8H()), "sqxtun2 v0.16b, v1.8h");
4319 COMPARE(Sqxtun2(v1.V8H(), v2.V4S()), "sqxtun2 v1.8h, v2.4s");
4320 COMPARE(Sqxtun2(v2.V4S(), v3.V2D()), "sqxtun2 v2.4s, v3.2d");
4321 COMPARE(Sqxtun(b19, h0), "sqxtun b19, h0");
4322 COMPARE(Sqxtun(h20, s0), "sqxtun h20, s0");
4323 COMPARE(Sqxtun(s21, d0), "sqxtun s21, d0");
4324
4325 COMPARE(Cls(v1.V8B(), v8_.V8B()), "cls v1.8b, v8.8b");
4326 COMPARE(Cls(v2.V16B(), v9.V16B()), "cls v2.16b, v9.16b");
4327 COMPARE(Cls(v3.V4H(), v1.V4H()), "cls v3.4h, v1.4h");
4328 COMPARE(Cls(v4.V8H(), v2.V8H()), "cls v4.8h, v2.8h");
4329 COMPARE(Cls(v5.V2S(), v3.V2S()), "cls v5.2s, v3.2s");
4330 COMPARE(Cls(v6.V4S(), v4.V4S()), "cls v6.4s, v4.4s");
4331
4332 COMPARE(Clz(v1.V8B(), v8_.V8B()), "clz v1.8b, v8.8b");
4333 COMPARE(Clz(v2.V16B(), v9.V16B()), "clz v2.16b, v9.16b");
4334 COMPARE(Clz(v3.V4H(), v1.V4H()), "clz v3.4h, v1.4h");
4335 COMPARE(Clz(v4.V8H(), v2.V8H()), "clz v4.8h, v2.8h");
4336 COMPARE(Clz(v5.V2S(), v3.V2S()), "clz v5.2s, v3.2s");
4337 COMPARE(Clz(v6.V4S(), v4.V4S()), "clz v6.4s, v4.4s");
4338
4339 COMPARE(Cnt(v1.V8B(), v8_.V8B()), "cnt v1.8b, v8.8b");
4340 COMPARE(Cnt(v2.V16B(), v9.V16B()), "cnt v2.16b, v9.16b");
4341
4342 COMPARE(Mvn(v4.V8B(), v5.V8B()), "mvn v4.8b, v5.8b");
4343 COMPARE(Mvn(v4.V16B(), v5.V16B()), "mvn v4.16b, v5.16b");
4344
4345 COMPARE(Not(v4.V8B(), v5.V8B()), "mvn v4.8b, v5.8b");
4346 COMPARE(Not(v4.V16B(), v5.V16B()), "mvn v4.16b, v5.16b");
4347
4348 COMPARE(Rev64(v1.V8B(), v8_.V8B()), "rev64 v1.8b, v8.8b");
4349 COMPARE(Rev64(v2.V16B(), v9.V16B()), "rev64 v2.16b, v9.16b");
4350 COMPARE(Rev64(v3.V4H(), v1.V4H()), "rev64 v3.4h, v1.4h");
4351 COMPARE(Rev64(v4.V8H(), v2.V8H()), "rev64 v4.8h, v2.8h");
4352 COMPARE(Rev64(v5.V2S(), v3.V2S()), "rev64 v5.2s, v3.2s");
4353 COMPARE(Rev64(v6.V4S(), v4.V4S()), "rev64 v6.4s, v4.4s");
4354
4355 COMPARE(Rev32(v1.V8B(), v8_.V8B()), "rev32 v1.8b, v8.8b");
4356 COMPARE(Rev32(v2.V16B(), v9.V16B()), "rev32 v2.16b, v9.16b");
4357 COMPARE(Rev32(v3.V4H(), v1.V4H()), "rev32 v3.4h, v1.4h");
4358 COMPARE(Rev32(v4.V8H(), v2.V8H()), "rev32 v4.8h, v2.8h");
4359
4360 COMPARE(Rev16(v1.V8B(), v8_.V8B()), "rev16 v1.8b, v8.8b");
4361 COMPARE(Rev16(v2.V16B(), v9.V16B()), "rev16 v2.16b, v9.16b");
4362
4363 COMPARE(Rbit(v1.V8B(), v8_.V8B()), "rbit v1.8b, v8.8b");
4364 COMPARE(Rbit(v2.V16B(), v9.V16B()), "rbit v2.16b, v9.16b");
4365
4366 COMPARE(Ursqrte(v2.V2S(), v9.V2S()), "ursqrte v2.2s, v9.2s");
4367 COMPARE(Ursqrte(v16.V4S(), v23.V4S()), "ursqrte v16.4s, v23.4s");
4368
4369 COMPARE(Urecpe(v2.V2S(), v9.V2S()), "urecpe v2.2s, v9.2s");
4370 COMPARE(Urecpe(v16.V4S(), v23.V4S()), "urecpe v16.4s, v23.4s");
4371
4372 COMPARE(Frsqrte(v2.V2S(), v9.V2S()), "frsqrte v2.2s, v9.2s");
4373 COMPARE(Frsqrte(v16.V4S(), v23.V4S()), "frsqrte v16.4s, v23.4s");
4374 COMPARE(Frsqrte(v2.V2D(), v9.V2D()), "frsqrte v2.2d, v9.2d");
4375 COMPARE(Frsqrte(v0.S(), v1.S()), "frsqrte s0, s1");
4376 COMPARE(Frsqrte(v0.D(), v1.D()), "frsqrte d0, d1");
4377
4378 COMPARE(Frecpe(v2.V2S(), v9.V2S()), "frecpe v2.2s, v9.2s");
4379 COMPARE(Frecpe(v16.V4S(), v23.V4S()), "frecpe v16.4s, v23.4s");
4380 COMPARE(Frecpe(v2.V2D(), v9.V2D()), "frecpe v2.2d, v9.2d");
4381 COMPARE(Frecpe(v0.S(), v1.S()), "frecpe s0, s1");
4382 COMPARE(Frecpe(v0.D(), v1.D()), "frecpe d0, d1");
4383
4384 COMPARE(Fabs(v2.V2S(), v9.V2S()), "fabs v2.2s, v9.2s");
4385 COMPARE(Fabs(v16.V4S(), v23.V4S()), "fabs v16.4s, v23.4s");
4386 COMPARE(Fabs(v31.V2D(), v30.V2D()), "fabs v31.2d, v30.2d");
4387
4388 COMPARE(Fneg(v2.V2S(), v9.V2S()), "fneg v2.2s, v9.2s");
4389 COMPARE(Fneg(v16.V4S(), v23.V4S()), "fneg v16.4s, v23.4s");
4390 COMPARE(Fneg(v31.V2D(), v30.V2D()), "fneg v31.2d, v30.2d");
4391
4392 COMPARE(Frintn(v2.V2S(), v9.V2S()), "frintn v2.2s, v9.2s");
4393 COMPARE(Frintn(v16.V4S(), v23.V4S()), "frintn v16.4s, v23.4s");
4394 COMPARE(Frintn(v31.V2D(), v30.V2D()), "frintn v31.2d, v30.2d");
4395
4396 COMPARE(Frinta(v2.V2S(), v9.V2S()), "frinta v2.2s, v9.2s");
4397 COMPARE(Frinta(v16.V4S(), v23.V4S()), "frinta v16.4s, v23.4s");
4398 COMPARE(Frinta(v31.V2D(), v30.V2D()), "frinta v31.2d, v30.2d");
4399
4400 COMPARE(Frintp(v2.V2S(), v9.V2S()), "frintp v2.2s, v9.2s");
4401 COMPARE(Frintp(v16.V4S(), v23.V4S()), "frintp v16.4s, v23.4s");
4402 COMPARE(Frintp(v31.V2D(), v30.V2D()), "frintp v31.2d, v30.2d");
4403
4404 COMPARE(Frintm(v2.V2S(), v9.V2S()), "frintm v2.2s, v9.2s");
4405 COMPARE(Frintm(v16.V4S(), v23.V4S()), "frintm v16.4s, v23.4s");
4406 COMPARE(Frintm(v31.V2D(), v30.V2D()), "frintm v31.2d, v30.2d");
4407
4408 COMPARE(Frintx(v2.V2S(), v9.V2S()), "frintx v2.2s, v9.2s");
4409 COMPARE(Frintx(v16.V4S(), v23.V4S()), "frintx v16.4s, v23.4s");
4410 COMPARE(Frintx(v31.V2D(), v30.V2D()), "frintx v31.2d, v30.2d");
4411
4412 COMPARE(Frintz(v2.V2S(), v9.V2S()), "frintz v2.2s, v9.2s");
4413 COMPARE(Frintz(v16.V4S(), v23.V4S()), "frintz v16.4s, v23.4s");
4414 COMPARE(Frintz(v31.V2D(), v30.V2D()), "frintz v31.2d, v30.2d");
4415
4416 COMPARE(Frinti(v2.V2S(), v9.V2S()), "frinti v2.2s, v9.2s");
4417 COMPARE(Frinti(v16.V4S(), v23.V4S()), "frinti v16.4s, v23.4s");
4418 COMPARE(Frinti(v31.V2D(), v30.V2D()), "frinti v31.2d, v30.2d");
4419
4420 COMPARE(Fsqrt(v3.V2S(), v10.V2S()), "fsqrt v3.2s, v10.2s");
4421 COMPARE(Fsqrt(v22.V4S(), v11.V4S()), "fsqrt v22.4s, v11.4s");
4422 COMPARE(Fsqrt(v31.V2D(), v0.V2D()), "fsqrt v31.2d, v0.2d");
4423
4424 COMPARE(Fcvtns(v4.V2S(), v11.V2S()), "fcvtns v4.2s, v11.2s");
4425 COMPARE(Fcvtns(v23.V4S(), v12.V4S()), "fcvtns v23.4s, v12.4s");
4426 COMPARE(Fcvtns(v30.V2D(), v1.V2D()), "fcvtns v30.2d, v1.2d");
4427 COMPARE(Fcvtnu(v4.V2S(), v11.V2S()), "fcvtnu v4.2s, v11.2s");
4428 COMPARE(Fcvtnu(v23.V4S(), v12.V4S()), "fcvtnu v23.4s, v12.4s");
4429 COMPARE(Fcvtnu(v30.V2D(), v1.V2D()), "fcvtnu v30.2d, v1.2d");
4430
4431 COMPARE(Fcvtps(v4.V2S(), v11.V2S()), "fcvtps v4.2s, v11.2s");
4432 COMPARE(Fcvtps(v23.V4S(), v12.V4S()), "fcvtps v23.4s, v12.4s");
4433 COMPARE(Fcvtps(v30.V2D(), v1.V2D()), "fcvtps v30.2d, v1.2d");
4434 COMPARE(Fcvtpu(v4.V2S(), v11.V2S()), "fcvtpu v4.2s, v11.2s");
4435 COMPARE(Fcvtpu(v23.V4S(), v12.V4S()), "fcvtpu v23.4s, v12.4s");
4436 COMPARE(Fcvtpu(v30.V2D(), v1.V2D()), "fcvtpu v30.2d, v1.2d");
4437
4438 COMPARE(Fcvtms(v4.V2S(), v11.V2S()), "fcvtms v4.2s, v11.2s");
4439 COMPARE(Fcvtms(v23.V4S(), v12.V4S()), "fcvtms v23.4s, v12.4s");
4440 COMPARE(Fcvtms(v30.V2D(), v1.V2D()), "fcvtms v30.2d, v1.2d");
4441 COMPARE(Fcvtmu(v4.V2S(), v11.V2S()), "fcvtmu v4.2s, v11.2s");
4442 COMPARE(Fcvtmu(v23.V4S(), v12.V4S()), "fcvtmu v23.4s, v12.4s");
4443 COMPARE(Fcvtmu(v30.V2D(), v1.V2D()), "fcvtmu v30.2d, v1.2d");
4444
4445 COMPARE(Fcvtzs(v4.V2S(), v11.V2S()), "fcvtzs v4.2s, v11.2s");
4446 COMPARE(Fcvtzs(v23.V4S(), v12.V4S()), "fcvtzs v23.4s, v12.4s");
4447 COMPARE(Fcvtzs(v30.V2D(), v1.V2D()), "fcvtzs v30.2d, v1.2d");
4448 COMPARE(Fcvtzu(v4.V2S(), v11.V2S()), "fcvtzu v4.2s, v11.2s");
4449 COMPARE(Fcvtzu(v23.V4S(), v12.V4S()), "fcvtzu v23.4s, v12.4s");
4450 COMPARE(Fcvtzu(v30.V2D(), v1.V2D()), "fcvtzu v30.2d, v1.2d");
4451
4452 COMPARE(Fcvtas(v4.V2S(), v11.V2S()), "fcvtas v4.2s, v11.2s");
4453 COMPARE(Fcvtas(v23.V4S(), v12.V4S()), "fcvtas v23.4s, v12.4s");
4454 COMPARE(Fcvtas(v30.V2D(), v1.V2D()), "fcvtas v30.2d, v1.2d");
4455 COMPARE(Fcvtau(v4.V2S(), v11.V2S()), "fcvtau v4.2s, v11.2s");
4456 COMPARE(Fcvtau(v23.V4S(), v12.V4S()), "fcvtau v23.4s, v12.4s");
4457 COMPARE(Fcvtau(v30.V2D(), v1.V2D()), "fcvtau v30.2d, v1.2d");
4458
4459 COMPARE(Fcvtns(s0, s1), "fcvtns s0, s1");
4460 COMPARE(Fcvtns(d2, d3), "fcvtns d2, d3");
4461 COMPARE(Fcvtnu(s4, s5), "fcvtnu s4, s5");
4462 COMPARE(Fcvtnu(d6, d7), "fcvtnu d6, d7");
4463 COMPARE(Fcvtps(s8, s9), "fcvtps s8, s9");
4464 COMPARE(Fcvtps(d10, d11), "fcvtps d10, d11");
4465 COMPARE(Fcvtpu(s12, s13), "fcvtpu s12, s13");
4466 COMPARE(Fcvtpu(d14, d15), "fcvtpu d14, d15");
4467 COMPARE(Fcvtms(s16, s17), "fcvtms s16, s17");
4468 COMPARE(Fcvtms(d18, d19), "fcvtms d18, d19");
4469 COMPARE(Fcvtmu(s20, s21), "fcvtmu s20, s21");
4470 COMPARE(Fcvtmu(d22, d23), "fcvtmu d22, d23");
4471 COMPARE(Fcvtzs(s24, s25), "fcvtzs s24, s25");
4472 COMPARE(Fcvtzs(d26, d27), "fcvtzs d26, d27");
4473 COMPARE(Fcvtzu(s28, s29), "fcvtzu s28, s29");
4474 COMPARE(Fcvtzu(d30, d31), "fcvtzu d30, d31");
4475 COMPARE(Fcvtas(s0, s1), "fcvtas s0, s1");
4476 COMPARE(Fcvtas(d2, d3), "fcvtas d2, d3");
4477 COMPARE(Fcvtau(s4, s5), "fcvtau s4, s5");
4478 COMPARE(Fcvtau(d6, d7), "fcvtau d6, d7");
4479
4480 COMPARE(Fcvtl(v3.V4S(), v5.V4H()), "fcvtl v3.4s, v5.4h");
4481 COMPARE(Fcvtl(v7.V2D(), v11.V2S()), "fcvtl v7.2d, v11.2s");
4482 COMPARE(Fcvtl2(v13.V4S(), v17.V8H()), "fcvtl2 v13.4s, v17.8h");
4483 COMPARE(Fcvtl2(v23.V2D(), v29.V4S()), "fcvtl2 v23.2d, v29.4s");
4484
4485 COMPARE(Fcvtn(v3.V4H(), v5.V4S()), "fcvtn v3.4h, v5.4s");
4486 COMPARE(Fcvtn(v7.V2S(), v11.V2D()), "fcvtn v7.2s, v11.2d");
4487 COMPARE(Fcvtn2(v13.V8H(), v17.V4S()), "fcvtn2 v13.8h, v17.4s");
4488 COMPARE(Fcvtn2(v23.V4S(), v29.V2D()), "fcvtn2 v23.4s, v29.2d");
4489
4490 COMPARE(Fcvtxn(v5.V2S(), v7.V2D()), "fcvtxn v5.2s, v7.2d");
4491 COMPARE(Fcvtxn2(v8_.V4S(), v13.V2D()), "fcvtxn2 v8.4s, v13.2d");
4492 COMPARE(Fcvtxn(s17, d31), "fcvtxn s17, d31");
4493
4494 COMPARE(Frecpx(s0, s1), "frecpx s0, s1");
4495 COMPARE(Frecpx(s31, s30), "frecpx s31, s30");
4496 COMPARE(Frecpx(d2, d3), "frecpx d2, d3");
4497 COMPARE(Frecpx(d31, d30), "frecpx d31, d30");
4498
4499 COMPARE(Scvtf(v5.V2S(), v3.V2S()), "scvtf v5.2s, v3.2s");
4500 COMPARE(Scvtf(v6.V4S(), v4.V4S()), "scvtf v6.4s, v4.4s");
4501 COMPARE(Scvtf(v7.V2D(), v5.V2D()), "scvtf v7.2d, v5.2d");
4502 COMPARE(Scvtf(s8, s6), "scvtf s8, s6");
4503 COMPARE(Scvtf(d8, d6), "scvtf d8, d6");
4504
4505 COMPARE(Ucvtf(v5.V2S(), v3.V2S()), "ucvtf v5.2s, v3.2s");
4506 COMPARE(Ucvtf(v6.V4S(), v4.V4S()), "ucvtf v6.4s, v4.4s");
4507 COMPARE(Ucvtf(v7.V2D(), v5.V2D()), "ucvtf v7.2d, v5.2d");
4508 COMPARE(Ucvtf(s8, s6), "ucvtf s8, s6");
4509 COMPARE(Ucvtf(d8, d6), "ucvtf d8, d6");
4510
4511 #define DISASM_INST(TA, TAS, TB, TBS) \
4512 COMPARE(Saddlp(v0.TA, v1.TB), "saddlp v0." TAS ", v1." TBS);
4513 NEON_FORMAT_LIST_LP(DISASM_INST)
4514 #undef DISASM_INST
4515
4516 #define DISASM_INST(TA, TAS, TB, TBS) \
4517 COMPARE(Uaddlp(v0.TA, v1.TB), "uaddlp v0." TAS ", v1." TBS);
4518 NEON_FORMAT_LIST_LP(DISASM_INST)
4519 #undef DISASM_INST
4520
4521 #define DISASM_INST(TA, TAS, TB, TBS) \
4522 COMPARE(Sadalp(v0.TA, v1.TB), "sadalp v0." TAS ", v1." TBS);
4523 NEON_FORMAT_LIST_LP(DISASM_INST)
4524 #undef DISASM_INST
4525
4526 #define DISASM_INST(TA, TAS, TB, TBS) \
4527 COMPARE(Uadalp(v0.TA, v1.TB), "uadalp v0." TAS ", v1." TBS);
4528 NEON_FORMAT_LIST_LP(DISASM_INST)
4529 #undef DISASM_INST
4530
4531 CLEANUP();
4532 }
4533
4534 TEST(neon_acrosslanes) {
4535 SET_UP_MASM();
4536
4537 COMPARE(Smaxv(b4, v5.V8B()), "smaxv b4, v5.8b");
4538 COMPARE(Smaxv(b4, v5.V16B()), "smaxv b4, v5.16b");
4539 COMPARE(Smaxv(h4, v5.V4H()), "smaxv h4, v5.4h");
4540 COMPARE(Smaxv(h4, v5.V8H()), "smaxv h4, v5.8h");
4541 COMPARE(Smaxv(s4, v5.V4S()), "smaxv s4, v5.4s");
4542
4543 COMPARE(Sminv(b4, v5.V8B()), "sminv b4, v5.8b");
4544 COMPARE(Sminv(b4, v5.V16B()), "sminv b4, v5.16b");
4545 COMPARE(Sminv(h4, v5.V4H()), "sminv h4, v5.4h");
4546 COMPARE(Sminv(h4, v5.V8H()), "sminv h4, v5.8h");
4547 COMPARE(Sminv(s4, v5.V4S()), "sminv s4, v5.4s");
4548
4549 COMPARE(Umaxv(b4, v5.V8B()), "umaxv b4, v5.8b");
4550 COMPARE(Umaxv(b4, v5.V16B()), "umaxv b4, v5.16b");
4551 COMPARE(Umaxv(h4, v5.V4H()), "umaxv h4, v5.4h");
4552 COMPARE(Umaxv(h4, v5.V8H()), "umaxv h4, v5.8h");
4553 COMPARE(Umaxv(s4, v5.V4S()), "umaxv s4, v5.4s");
4554
4555 COMPARE(Uminv(b4, v5.V8B()), "uminv b4, v5.8b");
4556 COMPARE(Uminv(b4, v5.V16B()), "uminv b4, v5.16b");
4557 COMPARE(Uminv(h4, v5.V4H()), "uminv h4, v5.4h");
4558 COMPARE(Uminv(h4, v5.V8H()), "uminv h4, v5.8h");
4559 COMPARE(Uminv(s4, v5.V4S()), "uminv s4, v5.4s");
4560
4561 COMPARE(Addv(b4, v5.V8B()), "addv b4, v5.8b");
4562 COMPARE(Addv(b4, v5.V16B()), "addv b4, v5.16b");
4563 COMPARE(Addv(h4, v5.V4H()), "addv h4, v5.4h");
4564 COMPARE(Addv(h4, v5.V8H()), "addv h4, v5.8h");
4565 COMPARE(Addv(s4, v5.V4S()), "addv s4, v5.4s");
4566
4567 COMPARE(Saddlv(h4, v5.V8B()), "saddlv h4, v5.8b");
4568 COMPARE(Saddlv(h4, v5.V16B()), "saddlv h4, v5.16b");
4569 COMPARE(Saddlv(s4, v5.V4H()), "saddlv s4, v5.4h");
4570 COMPARE(Saddlv(s4, v5.V8H()), "saddlv s4, v5.8h");
4571 COMPARE(Saddlv(d4, v5.V4S()), "saddlv d4, v5.4s");
4572
4573 COMPARE(Uaddlv(h4, v5.V8B()), "uaddlv h4, v5.8b");
4574 COMPARE(Uaddlv(h4, v5.V16B()), "uaddlv h4, v5.16b");
4575 COMPARE(Uaddlv(s4, v5.V4H()), "uaddlv s4, v5.4h");
4576 COMPARE(Uaddlv(s4, v5.V8H()), "uaddlv s4, v5.8h");
4577 COMPARE(Uaddlv(d4, v5.V4S()), "uaddlv d4, v5.4s");
4578
4579 COMPARE(Fmaxv(s4, v5.V4S()), "fmaxv s4, v5.4s");
4580 COMPARE(Fminv(s4, v5.V4S()), "fminv s4, v5.4s");
4581 COMPARE(Fmaxnmv(s4, v5.V4S()), "fmaxnmv s4, v5.4s");
4582 COMPARE(Fminnmv(s4, v5.V4S()), "fminnmv s4, v5.4s");
4583
4584 CLEANUP();
4585 }
4586
4587 TEST(neon_scalar_pairwise) {
4588 SET_UP_MASM();
4589
4590 COMPARE(Addp(d0, v1.V2D()), "addp d0, v1.2d");
4591 COMPARE(Faddp(s0, v1.V2S()), "faddp s0, v1.2s");
4592 COMPARE(Faddp(d2, v3.V2D()), "faddp d2, v3.2d");
4593 COMPARE(Fmaxp(s4, v5.V2S()), "fmaxp s4, v5.2s");
4594 COMPARE(Fmaxp(d6, v7.V2D()), "fmaxp d6, v7.2d");
4595 COMPARE(Fmaxnmp(s8, v9.V2S()), "fmaxnmp s8, v9.2s");
4596 COMPARE(Fmaxnmp(d10, v11.V2D()), "fmaxnmp d10, v11.2d");
4597 COMPARE(Fminp(s12, v13.V2S()), "fminp s12, v13.2s");
4598 COMPARE(Fminp(d14, v15.V2D()), "fminp d14, v15.2d");
4599 COMPARE(Fminnmp(s16, v17.V2S()), "fminnmp s16, v17.2s");
4600 COMPARE(Fminnmp(d18, v19.V2D()), "fminnmp d18, v19.2d");
4601 CLEANUP();
4602 }
4603
4604 TEST(neon_shift_immediate) {
4605 SET_UP_MASM();
4606
4607 COMPARE(Sshr(v0.V8B(), v1.V8B(), 1), "sshr v0.8b, v1.8b, #1");
4608 COMPARE(Sshr(v2.V8B(), v3.V8B(), 8), "sshr v2.8b, v3.8b, #8");
4609 COMPARE(Sshr(v4.V16B(), v5.V16B(), 1), "sshr v4.16b, v5.16b, #1");
4610 COMPARE(Sshr(v6.V16B(), v7.V16B(), 8), "sshr v6.16b, v7.16b, #8");
4611 COMPARE(Sshr(v8_.V4H(), v9.V4H(), 1), "sshr v8.4h, v9.4h, #1");
4612 COMPARE(Sshr(v10.V4H(), v11.V4H(), 16), "sshr v10.4h, v11.4h, #16");
4613 COMPARE(Sshr(v12.V8H(), v13.V8H(), 1), "sshr v12.8h, v13.8h, #1");
4614 COMPARE(Sshr(v14.V8H(), v15.V8H(), 16), "sshr v14.8h, v15.8h, #16");
4615 COMPARE(Sshr(v16.V2S(), v17.V2S(), 1), "sshr v16.2s, v17.2s, #1");
4616 COMPARE(Sshr(v18.V2S(), v19.V2S(), 32), "sshr v18.2s, v19.2s, #32");
4617 COMPARE(Sshr(v20.V4S(), v21.V4S(), 1), "sshr v20.4s, v21.4s, #1");
4618 COMPARE(Sshr(v22.V4S(), v23.V4S(), 32), "sshr v22.4s, v23.4s, #32");
4619 COMPARE(Sshr(v28.V2D(), v29.V2D(), 1), "sshr v28.2d, v29.2d, #1");
4620 COMPARE(Sshr(v30.V2D(), v31.V2D(), 64), "sshr v30.2d, v31.2d, #64");
4621 COMPARE(Sshr(d0, d1, 7), "sshr d0, d1, #7");
4622
4623 COMPARE(Ushr(v0.V8B(), v1.V8B(), 1), "ushr v0.8b, v1.8b, #1");
4624 COMPARE(Ushr(v2.V8B(), v3.V8B(), 8), "ushr v2.8b, v3.8b, #8");
4625 COMPARE(Ushr(v4.V16B(), v5.V16B(), 1), "ushr v4.16b, v5.16b, #1");
4626 COMPARE(Ushr(v6.V16B(), v7.V16B(), 8), "ushr v6.16b, v7.16b, #8");
4627 COMPARE(Ushr(v8_.V4H(), v9.V4H(), 1), "ushr v8.4h, v9.4h, #1");
4628 COMPARE(Ushr(v10.V4H(), v11.V4H(), 16), "ushr v10.4h, v11.4h, #16");
4629 COMPARE(Ushr(v12.V8H(), v13.V8H(), 1), "ushr v12.8h, v13.8h, #1");
4630 COMPARE(Ushr(v14.V8H(), v15.V8H(), 16), "ushr v14.8h, v15.8h, #16");
4631 COMPARE(Ushr(v16.V2S(), v17.V2S(), 1), "ushr v16.2s, v17.2s, #1");
4632 COMPARE(Ushr(v18.V2S(), v19.V2S(), 32), "ushr v18.2s, v19.2s, #32");
4633 COMPARE(Ushr(v20.V4S(), v21.V4S(), 1), "ushr v20.4s, v21.4s, #1");
4634 COMPARE(Ushr(v22.V4S(), v23.V4S(), 32), "ushr v22.4s, v23.4s, #32");
4635 COMPARE(Ushr(v28.V2D(), v29.V2D(), 1), "ushr v28.2d, v29.2d, #1");
4636 COMPARE(Ushr(v30.V2D(), v31.V2D(), 64), "ushr v30.2d, v31.2d, #64");
4637 COMPARE(Ushr(d0, d1, 7), "ushr d0, d1, #7");
4638
4639 COMPARE(Srshr(v0.V8B(), v1.V8B(), 1), "srshr v0.8b, v1.8b, #1");
4640 COMPARE(Srshr(v2.V8B(), v3.V8B(), 8), "srshr v2.8b, v3.8b, #8");
4641 COMPARE(Srshr(v4.V16B(), v5.V16B(), 1), "srshr v4.16b, v5.16b, #1");
4642 COMPARE(Srshr(v6.V16B(), v7.V16B(), 8), "srshr v6.16b, v7.16b, #8");
4643 COMPARE(Srshr(v8_.V4H(), v9.V4H(), 1), "srshr v8.4h, v9.4h, #1");
4644 COMPARE(Srshr(v10.V4H(), v11.V4H(), 16), "srshr v10.4h, v11.4h, #16");
4645 COMPARE(Srshr(v12.V8H(), v13.V8H(), 1), "srshr v12.8h, v13.8h, #1");
4646 COMPARE(Srshr(v14.V8H(), v15.V8H(), 16), "srshr v14.8h, v15.8h, #16");
4647 COMPARE(Srshr(v16.V2S(), v17.V2S(), 1), "srshr v16.2s, v17.2s, #1");
4648 COMPARE(Srshr(v18.V2S(), v19.V2S(), 32), "srshr v18.2s, v19.2s, #32");
4649 COMPARE(Srshr(v20.V4S(), v21.V4S(), 1), "srshr v20.4s, v21.4s, #1");
4650 COMPARE(Srshr(v22.V4S(), v23.V4S(), 32), "srshr v22.4s, v23.4s, #32");
4651 COMPARE(Srshr(v28.V2D(), v29.V2D(), 1), "srshr v28.2d, v29.2d, #1");
4652 COMPARE(Srshr(v30.V2D(), v31.V2D(), 64), "srshr v30.2d, v31.2d, #64");
4653 COMPARE(Srshr(d0, d1, 7), "srshr d0, d1, #7");
4654
4655 COMPARE(Urshr(v0.V8B(), v1.V8B(), 1), "urshr v0.8b, v1.8b, #1");
4656 COMPARE(Urshr(v2.V8B(), v3.V8B(), 8), "urshr v2.8b, v3.8b, #8");
4657 COMPARE(Urshr(v4.V16B(), v5.V16B(), 1), "urshr v4.16b, v5.16b, #1");
4658 COMPARE(Urshr(v6.V16B(), v7.V16B(), 8), "urshr v6.16b, v7.16b, #8");
4659 COMPARE(Urshr(v8_.V4H(), v9.V4H(), 1), "urshr v8.4h, v9.4h, #1");
4660 COMPARE(Urshr(v10.V4H(), v11.V4H(), 16), "urshr v10.4h, v11.4h, #16");
4661 COMPARE(Urshr(v12.V8H(), v13.V8H(), 1), "urshr v12.8h, v13.8h, #1");
4662 COMPARE(Urshr(v14.V8H(), v15.V8H(), 16), "urshr v14.8h, v15.8h, #16");
4663 COMPARE(Urshr(v16.V2S(), v17.V2S(), 1), "urshr v16.2s, v17.2s, #1");
4664 COMPARE(Urshr(v18.V2S(), v19.V2S(), 32), "urshr v18.2s, v19.2s, #32");
4665 COMPARE(Urshr(v20.V4S(), v21.V4S(), 1), "urshr v20.4s, v21.4s, #1");
4666 COMPARE(Urshr(v22.V4S(), v23.V4S(), 32), "urshr v22.4s, v23.4s, #32");
4667 COMPARE(Urshr(v28.V2D(), v29.V2D(), 1), "urshr v28.2d, v29.2d, #1");
4668 COMPARE(Urshr(v30.V2D(), v31.V2D(), 64), "urshr v30.2d, v31.2d, #64");
4669 COMPARE(Urshr(d0, d1, 7), "urshr d0, d1, #7");
4670
4671 COMPARE(Srsra(v0.V8B(), v1.V8B(), 1), "srsra v0.8b, v1.8b, #1");
4672 COMPARE(Srsra(v2.V8B(), v3.V8B(), 8), "srsra v2.8b, v3.8b, #8");
4673 COMPARE(Srsra(v4.V16B(), v5.V16B(), 1), "srsra v4.16b, v5.16b, #1");
4674 COMPARE(Srsra(v6.V16B(), v7.V16B(), 8), "srsra v6.16b, v7.16b, #8");
4675 COMPARE(Srsra(v8_.V4H(), v9.V4H(), 1), "srsra v8.4h, v9.4h, #1");
4676 COMPARE(Srsra(v10.V4H(), v11.V4H(), 16), "srsra v10.4h, v11.4h, #16");
4677 COMPARE(Srsra(v12.V8H(), v13.V8H(), 1), "srsra v12.8h, v13.8h, #1");
4678 COMPARE(Srsra(v14.V8H(), v15.V8H(), 16), "srsra v14.8h, v15.8h, #16");
4679 COMPARE(Srsra(v16.V2S(), v17.V2S(), 1), "srsra v16.2s, v17.2s, #1");
4680 COMPARE(Srsra(v18.V2S(), v19.V2S(), 32), "srsra v18.2s, v19.2s, #32");
4681 COMPARE(Srsra(v20.V4S(), v21.V4S(), 1), "srsra v20.4s, v21.4s, #1");
4682 COMPARE(Srsra(v22.V4S(), v23.V4S(), 32), "srsra v22.4s, v23.4s, #32");
4683 COMPARE(Srsra(v28.V2D(), v29.V2D(), 1), "srsra v28.2d, v29.2d, #1");
4684 COMPARE(Srsra(v30.V2D(), v31.V2D(), 64), "srsra v30.2d, v31.2d, #64");
4685 COMPARE(Srsra(d0, d1, 7), "srsra d0, d1, #7");
4686
4687 COMPARE(Ssra(v0.V8B(), v1.V8B(), 1), "ssra v0.8b, v1.8b, #1");
4688 COMPARE(Ssra(v2.V8B(), v3.V8B(), 8), "ssra v2.8b, v3.8b, #8");
4689 COMPARE(Ssra(v4.V16B(), v5.V16B(), 1), "ssra v4.16b, v5.16b, #1");
4690 COMPARE(Ssra(v6.V16B(), v7.V16B(), 8), "ssra v6.16b, v7.16b, #8");
4691 COMPARE(Ssra(v8_.V4H(), v9.V4H(), 1), "ssra v8.4h, v9.4h, #1");
4692 COMPARE(Ssra(v10.V4H(), v11.V4H(), 16), "ssra v10.4h, v11.4h, #16");
4693 COMPARE(Ssra(v12.V8H(), v13.V8H(), 1), "ssra v12.8h, v13.8h, #1");
4694 COMPARE(Ssra(v14.V8H(), v15.V8H(), 16), "ssra v14.8h, v15.8h, #16");
4695 COMPARE(Ssra(v16.V2S(), v17.V2S(), 1), "ssra v16.2s, v17.2s, #1");
4696 COMPARE(Ssra(v18.V2S(), v19.V2S(), 32), "ssra v18.2s, v19.2s, #32");
4697 COMPARE(Ssra(v20.V4S(), v21.V4S(), 1), "ssra v20.4s, v21.4s, #1");
4698 COMPARE(Ssra(v22.V4S(), v23.V4S(), 32), "ssra v22.4s, v23.4s, #32");
4699 COMPARE(Ssra(v28.V2D(), v29.V2D(), 1), "ssra v28.2d, v29.2d, #1");
4700 COMPARE(Ssra(v30.V2D(), v31.V2D(), 64), "ssra v30.2d, v31.2d, #64");
4701 COMPARE(Ssra(d0, d1, 7), "ssra d0, d1, #7");
4702
4703 COMPARE(Ursra(v0.V8B(), v1.V8B(), 1), "ursra v0.8b, v1.8b, #1");
4704 COMPARE(Ursra(v2.V8B(), v3.V8B(), 8), "ursra v2.8b, v3.8b, #8");
4705 COMPARE(Ursra(v4.V16B(), v5.V16B(), 1), "ursra v4.16b, v5.16b, #1");
4706 COMPARE(Ursra(v6.V16B(), v7.V16B(), 8), "ursra v6.16b, v7.16b, #8");
4707 COMPARE(Ursra(v8_.V4H(), v9.V4H(), 1), "ursra v8.4h, v9.4h, #1");
4708 COMPARE(Ursra(v10.V4H(), v11.V4H(), 16), "ursra v10.4h, v11.4h, #16");
4709 COMPARE(Ursra(v12.V8H(), v13.V8H(), 1), "ursra v12.8h, v13.8h, #1");
4710 COMPARE(Ursra(v14.V8H(), v15.V8H(), 16), "ursra v14.8h, v15.8h, #16");
4711 COMPARE(Ursra(v16.V2S(), v17.V2S(), 1), "ursra v16.2s, v17.2s, #1");
4712 COMPARE(Ursra(v18.V2S(), v19.V2S(), 32), "ursra v18.2s, v19.2s, #32");
4713 COMPARE(Ursra(v20.V4S(), v21.V4S(), 1), "ursra v20.4s, v21.4s, #1");
4714 COMPARE(Ursra(v22.V4S(), v23.V4S(), 32), "ursra v22.4s, v23.4s, #32");
4715 COMPARE(Ursra(v28.V2D(), v29.V2D(), 1), "ursra v28.2d, v29.2d, #1");
4716 COMPARE(Ursra(v30.V2D(), v31.V2D(), 64), "ursra v30.2d, v31.2d, #64");
4717 COMPARE(Ursra(d0, d1, 7), "ursra d0, d1, #7");
4718
4719 COMPARE(Usra(v0.V8B(), v1.V8B(), 1), "usra v0.8b, v1.8b, #1");
4720 COMPARE(Usra(v2.V8B(), v3.V8B(), 8), "usra v2.8b, v3.8b, #8");
4721 COMPARE(Usra(v4.V16B(), v5.V16B(), 1), "usra v4.16b, v5.16b, #1");
4722 COMPARE(Usra(v6.V16B(), v7.V16B(), 8), "usra v6.16b, v7.16b, #8");
4723 COMPARE(Usra(v8_.V4H(), v9.V4H(), 1), "usra v8.4h, v9.4h, #1");
4724 COMPARE(Usra(v10.V4H(), v11.V4H(), 16), "usra v10.4h, v11.4h, #16");
4725 COMPARE(Usra(v12.V8H(), v13.V8H(), 1), "usra v12.8h, v13.8h, #1");
4726 COMPARE(Usra(v14.V8H(), v15.V8H(), 16), "usra v14.8h, v15.8h, #16");
4727 COMPARE(Usra(v16.V2S(), v17.V2S(), 1), "usra v16.2s, v17.2s, #1");
4728 COMPARE(Usra(v18.V2S(), v19.V2S(), 32), "usra v18.2s, v19.2s, #32");
4729 COMPARE(Usra(v20.V4S(), v21.V4S(), 1), "usra v20.4s, v21.4s, #1");
4730 COMPARE(Usra(v22.V4S(), v23.V4S(), 32), "usra v22.4s, v23.4s, #32");
4731 COMPARE(Usra(v28.V2D(), v29.V2D(), 1), "usra v28.2d, v29.2d, #1");
4732 COMPARE(Usra(v30.V2D(), v31.V2D(), 64), "usra v30.2d, v31.2d, #64");
4733 COMPARE(Usra(d0, d1, 7), "usra d0, d1, #7");
4734
4735 COMPARE(Sli(v1.V8B(), v8_.V8B(), 1), "sli v1.8b, v8.8b, #1");
4736 COMPARE(Sli(v2.V16B(), v9.V16B(), 2), "sli v2.16b, v9.16b, #2");
4737 COMPARE(Sli(v3.V4H(), v1.V4H(), 3), "sli v3.4h, v1.4h, #3");
4738 COMPARE(Sli(v4.V8H(), v2.V8H(), 4), "sli v4.8h, v2.8h, #4");
4739 COMPARE(Sli(v5.V2S(), v3.V2S(), 5), "sli v5.2s, v3.2s, #5");
4740 COMPARE(Sli(v6.V4S(), v4.V4S(), 6), "sli v6.4s, v4.4s, #6");
4741 COMPARE(Sli(v7.V2D(), v5.V2D(), 7), "sli v7.2d, v5.2d, #7");
4742 COMPARE(Sli(d8, d6, 8), "sli d8, d6, #8");
4743
4744 COMPARE(Shl(v1.V8B(), v8_.V8B(), 1), "shl v1.8b, v8.8b, #1");
4745 COMPARE(Shl(v2.V16B(), v9.V16B(), 2), "shl v2.16b, v9.16b, #2");
4746 COMPARE(Shl(v3.V4H(), v1.V4H(), 3), "shl v3.4h, v1.4h, #3");
4747 COMPARE(Shl(v4.V8H(), v2.V8H(), 4), "shl v4.8h, v2.8h, #4");
4748 COMPARE(Shl(v5.V2S(), v3.V2S(), 5), "shl v5.2s, v3.2s, #5");
4749 COMPARE(Shl(v6.V4S(), v4.V4S(), 6), "shl v6.4s, v4.4s, #6");
4750 COMPARE(Shl(v7.V2D(), v5.V2D(), 7), "shl v7.2d, v5.2d, #7");
4751 COMPARE(Shl(d8, d6, 8), "shl d8, d6, #8");
4752
4753 COMPARE(Sqshl(v1.V8B(), v8_.V8B(), 1), "sqshl v1.8b, v8.8b, #1");
4754 COMPARE(Sqshl(v2.V16B(), v9.V16B(), 2), "sqshl v2.16b, v9.16b, #2");
4755 COMPARE(Sqshl(v3.V4H(), v1.V4H(), 3), "sqshl v3.4h, v1.4h, #3");
4756 COMPARE(Sqshl(v4.V8H(), v2.V8H(), 4), "sqshl v4.8h, v2.8h, #4");
4757 COMPARE(Sqshl(v5.V2S(), v3.V2S(), 5), "sqshl v5.2s, v3.2s, #5");
4758 COMPARE(Sqshl(v6.V4S(), v4.V4S(), 6), "sqshl v6.4s, v4.4s, #6");
4759 COMPARE(Sqshl(v7.V2D(), v5.V2D(), 7), "sqshl v7.2d, v5.2d, #7");
4760 COMPARE(Sqshl(b8, b7, 1), "sqshl b8, b7, #1");
4761 COMPARE(Sqshl(h9, h8, 2), "sqshl h9, h8, #2");
4762 COMPARE(Sqshl(s10, s9, 3), "sqshl s10, s9, #3");
4763 COMPARE(Sqshl(d11, d10, 4), "sqshl d11, d10, #4");
4764
4765 COMPARE(Sqshlu(v1.V8B(), v8_.V8B(), 1), "sqshlu v1.8b, v8.8b, #1");
4766 COMPARE(Sqshlu(v2.V16B(), v9.V16B(), 2), "sqshlu v2.16b, v9.16b, #2");
4767 COMPARE(Sqshlu(v3.V4H(), v1.V4H(), 3), "sqshlu v3.4h, v1.4h, #3");
4768 COMPARE(Sqshlu(v4.V8H(), v2.V8H(), 4), "sqshlu v4.8h, v2.8h, #4");
4769 COMPARE(Sqshlu(v5.V2S(), v3.V2S(), 5), "sqshlu v5.2s, v3.2s, #5");
4770 COMPARE(Sqshlu(v6.V4S(), v4.V4S(), 6), "sqshlu v6.4s, v4.4s, #6");
4771 COMPARE(Sqshlu(v7.V2D(), v5.V2D(), 7), "sqshlu v7.2d, v5.2d, #7");
4772 COMPARE(Sqshlu(b8, b7, 1), "sqshlu b8, b7, #1");
4773 COMPARE(Sqshlu(h9, h8, 2), "sqshlu h9, h8, #2");
4774 COMPARE(Sqshlu(s10, s9, 3), "sqshlu s10, s9, #3");
4775 COMPARE(Sqshlu(d11, d10, 4), "sqshlu d11, d10, #4");
4776
4777 COMPARE(Uqshl(v1.V8B(), v8_.V8B(), 1), "uqshl v1.8b, v8.8b, #1");
4778 COMPARE(Uqshl(v2.V16B(), v9.V16B(), 2), "uqshl v2.16b, v9.16b, #2");
4779 COMPARE(Uqshl(v3.V4H(), v1.V4H(), 3), "uqshl v3.4h, v1.4h, #3");
4780 COMPARE(Uqshl(v4.V8H(), v2.V8H(), 4), "uqshl v4.8h, v2.8h, #4");
4781 COMPARE(Uqshl(v5.V2S(), v3.V2S(), 5), "uqshl v5.2s, v3.2s, #5");
4782 COMPARE(Uqshl(v6.V4S(), v4.V4S(), 6), "uqshl v6.4s, v4.4s, #6");
4783 COMPARE(Uqshl(v7.V2D(), v5.V2D(), 7), "uqshl v7.2d, v5.2d, #7");
4784 COMPARE(Uqshl(b8, b7, 1), "uqshl b8, b7, #1");
4785 COMPARE(Uqshl(h9, h8, 2), "uqshl h9, h8, #2");
4786 COMPARE(Uqshl(s10, s9, 3), "uqshl s10, s9, #3");
4787 COMPARE(Uqshl(d11, d10, 4), "uqshl d11, d10, #4");
4788
4789 COMPARE(Sshll(v1.V8H(), v8_.V8B(), 1), "sshll v1.8h, v8.8b, #1");
4790 COMPARE(Sshll(v3.V4S(), v1.V4H(), 3), "sshll v3.4s, v1.4h, #3");
4791 COMPARE(Sshll(v5.V2D(), v3.V2S(), 5), "sshll v5.2d, v3.2s, #5");
4792 COMPARE(Sshll2(v2.V8H(), v9.V16B(), 2), "sshll2 v2.8h, v9.16b, #2");
4793 COMPARE(Sshll2(v4.V4S(), v2.V8H(), 4), "sshll2 v4.4s, v2.8h, #4");
4794 COMPARE(Sshll2(v6.V2D(), v4.V4S(), 6), "sshll2 v6.2d, v4.4s, #6");
4795
4796 COMPARE(Sshll(v1.V8H(), v8_.V8B(), 0), "sxtl v1.8h, v8.8b");
4797 COMPARE(Sshll(v3.V4S(), v1.V4H(), 0), "sxtl v3.4s, v1.4h");
4798 COMPARE(Sshll(v5.V2D(), v3.V2S(), 0), "sxtl v5.2d, v3.2s");
4799 COMPARE(Sshll2(v2.V8H(), v9.V16B(), 0), "sxtl2 v2.8h, v9.16b");
4800 COMPARE(Sshll2(v4.V4S(), v2.V8H(), 0), "sxtl2 v4.4s, v2.8h");
4801 COMPARE(Sshll2(v6.V2D(), v4.V4S(), 0), "sxtl2 v6.2d, v4.4s");
4802
4803 COMPARE(Sxtl(v1.V8H(), v8_.V8B()), "sxtl v1.8h, v8.8b");
4804 COMPARE(Sxtl(v3.V4S(), v1.V4H()), "sxtl v3.4s, v1.4h");
4805 COMPARE(Sxtl(v5.V2D(), v3.V2S()), "sxtl v5.2d, v3.2s");
4806 COMPARE(Sxtl2(v2.V8H(), v9.V16B()), "sxtl2 v2.8h, v9.16b");
4807 COMPARE(Sxtl2(v4.V4S(), v2.V8H()), "sxtl2 v4.4s, v2.8h");
4808 COMPARE(Sxtl2(v6.V2D(), v4.V4S()), "sxtl2 v6.2d, v4.4s");
4809
4810 COMPARE(Ushll(v1.V8H(), v8_.V8B(), 1), "ushll v1.8h, v8.8b, #1");
4811 COMPARE(Ushll(v3.V4S(), v1.V4H(), 3), "ushll v3.4s, v1.4h, #3");
4812 COMPARE(Ushll(v5.V2D(), v3.V2S(), 5), "ushll v5.2d, v3.2s, #5");
4813 COMPARE(Ushll2(v2.V8H(), v9.V16B(), 2), "ushll2 v2.8h, v9.16b, #2");
4814 COMPARE(Ushll2(v4.V4S(), v2.V8H(), 4), "ushll2 v4.4s, v2.8h, #4");
4815 COMPARE(Ushll2(v6.V2D(), v4.V4S(), 6), "ushll2 v6.2d, v4.4s, #6");
4816
4817 COMPARE(Ushll(v1.V8H(), v8_.V8B(), 0), "uxtl v1.8h, v8.8b");
4818 COMPARE(Ushll(v3.V4S(), v1.V4H(), 0), "uxtl v3.4s, v1.4h");
4819 COMPARE(Ushll(v5.V2D(), v3.V2S(), 0), "uxtl v5.2d, v3.2s");
4820 COMPARE(Ushll2(v2.V8H(), v9.V16B(), 0), "uxtl2 v2.8h, v9.16b");
4821 COMPARE(Ushll2(v4.V4S(), v2.V8H(), 0), "uxtl2 v4.4s, v2.8h");
4822 COMPARE(Ushll2(v6.V2D(), v4.V4S(), 0), "uxtl2 v6.2d, v4.4s");
4823
4824 COMPARE(Uxtl(v1.V8H(), v8_.V8B()), "uxtl v1.8h, v8.8b");
4825 COMPARE(Uxtl(v3.V4S(), v1.V4H()), "uxtl v3.4s, v1.4h");
4826 COMPARE(Uxtl(v5.V2D(), v3.V2S()), "uxtl v5.2d, v3.2s");
4827 COMPARE(Uxtl2(v2.V8H(), v9.V16B()), "uxtl2 v2.8h, v9.16b");
4828 COMPARE(Uxtl2(v4.V4S(), v2.V8H()), "uxtl2 v4.4s, v2.8h");
4829 COMPARE(Uxtl2(v6.V2D(), v4.V4S()), "uxtl2 v6.2d, v4.4s");
4830
4831 COMPARE(Sri(v1.V8B(), v8_.V8B(), 1), "sri v1.8b, v8.8b, #1");
4832 COMPARE(Sri(v2.V16B(), v9.V16B(), 2), "sri v2.16b, v9.16b, #2");
4833 COMPARE(Sri(v3.V4H(), v1.V4H(), 3), "sri v3.4h, v1.4h, #3");
4834 COMPARE(Sri(v4.V8H(), v2.V8H(), 4), "sri v4.8h, v2.8h, #4");
4835 COMPARE(Sri(v5.V2S(), v3.V2S(), 5), "sri v5.2s, v3.2s, #5");
4836 COMPARE(Sri(v6.V4S(), v4.V4S(), 6), "sri v6.4s, v4.4s, #6");
4837 COMPARE(Sri(v7.V2D(), v5.V2D(), 7), "sri v7.2d, v5.2d, #7");
4838 COMPARE(Sri(d8, d6, 8), "sri d8, d6, #8");
4839
4840 COMPARE(Shrn(v0.V8B(), v1.V8H(), 1), "shrn v0.8b, v1.8h, #1");
4841 COMPARE(Shrn(v1.V4H(), v2.V4S(), 2), "shrn v1.4h, v2.4s, #2");
4842 COMPARE(Shrn(v2.V2S(), v3.V2D(), 3), "shrn v2.2s, v3.2d, #3");
4843 COMPARE(Shrn2(v0.V16B(), v1.V8H(), 4), "shrn2 v0.16b, v1.8h, #4");
4844 COMPARE(Shrn2(v1.V8H(), v2.V4S(), 5), "shrn2 v1.8h, v2.4s, #5");
4845 COMPARE(Shrn2(v2.V4S(), v3.V2D(), 6), "shrn2 v2.4s, v3.2d, #6");
4846
4847 COMPARE(Rshrn(v0.V8B(), v1.V8H(), 1), "rshrn v0.8b, v1.8h, #1");
4848 COMPARE(Rshrn(v1.V4H(), v2.V4S(), 2), "rshrn v1.4h, v2.4s, #2");
4849 COMPARE(Rshrn(v2.V2S(), v3.V2D(), 3), "rshrn v2.2s, v3.2d, #3");
4850 COMPARE(Rshrn2(v0.V16B(), v1.V8H(), 4), "rshrn2 v0.16b, v1.8h, #4");
4851 COMPARE(Rshrn2(v1.V8H(), v2.V4S(), 5), "rshrn2 v1.8h, v2.4s, #5");
4852 COMPARE(Rshrn2(v2.V4S(), v3.V2D(), 6), "rshrn2 v2.4s, v3.2d, #6");
4853
4854 COMPARE(Uqshrn(v0.V8B(), v1.V8H(), 1), "uqshrn v0.8b, v1.8h, #1");
4855 COMPARE(Uqshrn(v1.V4H(), v2.V4S(), 2), "uqshrn v1.4h, v2.4s, #2");
4856 COMPARE(Uqshrn(v2.V2S(), v3.V2D(), 3), "uqshrn v2.2s, v3.2d, #3");
4857 COMPARE(Uqshrn2(v0.V16B(), v1.V8H(), 4), "uqshrn2 v0.16b, v1.8h, #4");
4858 COMPARE(Uqshrn2(v1.V8H(), v2.V4S(), 5), "uqshrn2 v1.8h, v2.4s, #5");
4859 COMPARE(Uqshrn2(v2.V4S(), v3.V2D(), 6), "uqshrn2 v2.4s, v3.2d, #6");
4860 COMPARE(Uqshrn(b0, h1, 1), "uqshrn b0, h1, #1");
4861 COMPARE(Uqshrn(h1, s2, 2), "uqshrn h1, s2, #2");
4862 COMPARE(Uqshrn(s2, d3, 3), "uqshrn s2, d3, #3");
4863
4864 COMPARE(Uqrshrn(v0.V8B(), v1.V8H(), 1), "uqrshrn v0.8b, v1.8h, #1");
4865 COMPARE(Uqrshrn(v1.V4H(), v2.V4S(), 2), "uqrshrn v1.4h, v2.4s, #2");
4866 COMPARE(Uqrshrn(v2.V2S(), v3.V2D(), 3), "uqrshrn v2.2s, v3.2d, #3");
4867 COMPARE(Uqrshrn2(v0.V16B(), v1.V8H(), 4), "uqrshrn2 v0.16b, v1.8h, #4");
4868 COMPARE(Uqrshrn2(v1.V8H(), v2.V4S(), 5), "uqrshrn2 v1.8h, v2.4s, #5");
4869 COMPARE(Uqrshrn2(v2.V4S(), v3.V2D(), 6), "uqrshrn2 v2.4s, v3.2d, #6");
4870 COMPARE(Uqrshrn(b0, h1, 1), "uqrshrn b0, h1, #1");
4871 COMPARE(Uqrshrn(h1, s2, 2), "uqrshrn h1, s2, #2");
4872 COMPARE(Uqrshrn(s2, d3, 3), "uqrshrn s2, d3, #3");
4873
4874 COMPARE(Sqshrn(v0.V8B(), v1.V8H(), 1), "sqshrn v0.8b, v1.8h, #1");
4875 COMPARE(Sqshrn(v1.V4H(), v2.V4S(), 2), "sqshrn v1.4h, v2.4s, #2");
4876 COMPARE(Sqshrn(v2.V2S(), v3.V2D(), 3), "sqshrn v2.2s, v3.2d, #3");
4877 COMPARE(Sqshrn2(v0.V16B(), v1.V8H(), 4), "sqshrn2 v0.16b, v1.8h, #4");
4878 COMPARE(Sqshrn2(v1.V8H(), v2.V4S(), 5), "sqshrn2 v1.8h, v2.4s, #5");
4879 COMPARE(Sqshrn2(v2.V4S(), v3.V2D(), 6), "sqshrn2 v2.4s, v3.2d, #6");
4880 COMPARE(Sqshrn(b0, h1, 1), "sqshrn b0, h1, #1");
4881 COMPARE(Sqshrn(h1, s2, 2), "sqshrn h1, s2, #2");
4882 COMPARE(Sqshrn(s2, d3, 3), "sqshrn s2, d3, #3");
4883
4884 COMPARE(Sqrshrn(v0.V8B(), v1.V8H(), 1), "sqrshrn v0.8b, v1.8h, #1");
4885 COMPARE(Sqrshrn(v1.V4H(), v2.V4S(), 2), "sqrshrn v1.4h, v2.4s, #2");
4886 COMPARE(Sqrshrn(v2.V2S(), v3.V2D(), 3), "sqrshrn v2.2s, v3.2d, #3");
4887 COMPARE(Sqrshrn2(v0.V16B(), v1.V8H(), 4), "sqrshrn2 v0.16b, v1.8h, #4");
4888 COMPARE(Sqrshrn2(v1.V8H(), v2.V4S(), 5), "sqrshrn2 v1.8h, v2.4s, #5");
4889 COMPARE(Sqrshrn2(v2.V4S(), v3.V2D(), 6), "sqrshrn2 v2.4s, v3.2d, #6");
4890 COMPARE(Sqrshrn(b0, h1, 1), "sqrshrn b0, h1, #1");
4891 COMPARE(Sqrshrn(h1, s2, 2), "sqrshrn h1, s2, #2");
4892 COMPARE(Sqrshrn(s2, d3, 3), "sqrshrn s2, d3, #3");
4893
4894 COMPARE(Sqshrun(v0.V8B(), v1.V8H(), 1), "sqshrun v0.8b, v1.8h, #1");
4895 COMPARE(Sqshrun(v1.V4H(), v2.V4S(), 2), "sqshrun v1.4h, v2.4s, #2");
4896 COMPARE(Sqshrun(v2.V2S(), v3.V2D(), 3), "sqshrun v2.2s, v3.2d, #3");
4897 COMPARE(Sqshrun2(v0.V16B(), v1.V8H(), 4), "sqshrun2 v0.16b, v1.8h, #4");
4898 COMPARE(Sqshrun2(v1.V8H(), v2.V4S(), 5), "sqshrun2 v1.8h, v2.4s, #5");
4899 COMPARE(Sqshrun2(v2.V4S(), v3.V2D(), 6), "sqshrun2 v2.4s, v3.2d, #6");
4900 COMPARE(Sqshrun(b0, h1, 1), "sqshrun b0, h1, #1");
4901 COMPARE(Sqshrun(h1, s2, 2), "sqshrun h1, s2, #2");
4902 COMPARE(Sqshrun(s2, d3, 3), "sqshrun s2, d3, #3");
4903
4904 COMPARE(Sqrshrun(v0.V8B(), v1.V8H(), 1), "sqrshrun v0.8b, v1.8h, #1");
4905 COMPARE(Sqrshrun(v1.V4H(), v2.V4S(), 2), "sqrshrun v1.4h, v2.4s, #2");
4906 COMPARE(Sqrshrun(v2.V2S(), v3.V2D(), 3), "sqrshrun v2.2s, v3.2d, #3");
4907 COMPARE(Sqrshrun2(v0.V16B(), v1.V8H(), 4), "sqrshrun2 v0.16b, v1.8h, #4");
4908 COMPARE(Sqrshrun2(v1.V8H(), v2.V4S(), 5), "sqrshrun2 v1.8h, v2.4s, #5");
4909 COMPARE(Sqrshrun2(v2.V4S(), v3.V2D(), 6), "sqrshrun2 v2.4s, v3.2d, #6");
4910 COMPARE(Sqrshrun(b0, h1, 1), "sqrshrun b0, h1, #1");
4911 COMPARE(Sqrshrun(h1, s2, 2), "sqrshrun h1, s2, #2");
4912 COMPARE(Sqrshrun(s2, d3, 3), "sqrshrun s2, d3, #3");
4913
4914 COMPARE(Scvtf(v5.V2S(), v3.V2S(), 11), "scvtf v5.2s, v3.2s, #11");
4915 COMPARE(Scvtf(v6.V4S(), v4.V4S(), 12), "scvtf v6.4s, v4.4s, #12");
4916 COMPARE(Scvtf(v7.V2D(), v5.V2D(), 33), "scvtf v7.2d, v5.2d, #33");
4917 COMPARE(Scvtf(s8, s6, 13), "scvtf s8, s6, #13");
4918 COMPARE(Scvtf(d8, d6, 34), "scvtf d8, d6, #34");
4919
4920 COMPARE(Ucvtf(v5.V2S(), v3.V2S(), 11), "ucvtf v5.2s, v3.2s, #11");
4921 COMPARE(Ucvtf(v6.V4S(), v4.V4S(), 12), "ucvtf v6.4s, v4.4s, #12");
4922 COMPARE(Ucvtf(v7.V2D(), v5.V2D(), 33), "ucvtf v7.2d, v5.2d, #33");
4923 COMPARE(Ucvtf(s8, s6, 13), "ucvtf s8, s6, #13");
4924 COMPARE(Ucvtf(d8, d6, 34), "ucvtf d8, d6, #34");
4925
4926 COMPARE(Fcvtzs(v5.V2S(), v3.V2S(), 11), "fcvtzs v5.2s, v3.2s, #11");
4927 COMPARE(Fcvtzs(v6.V4S(), v4.V4S(), 12), "fcvtzs v6.4s, v4.4s, #12");
4928 COMPARE(Fcvtzs(v7.V2D(), v5.V2D(), 33), "fcvtzs v7.2d, v5.2d, #33");
4929 COMPARE(Fcvtzs(s8, s6, 13), "fcvtzs s8, s6, #13");
4930 COMPARE(Fcvtzs(d8, d6, 34), "fcvtzs d8, d6, #34");
4931
4932 COMPARE(Fcvtzu(v5.V2S(), v3.V2S(), 11), "fcvtzu v5.2s, v3.2s, #11");
4933 COMPARE(Fcvtzu(v6.V4S(), v4.V4S(), 12), "fcvtzu v6.4s, v4.4s, #12");
4934 COMPARE(Fcvtzu(v7.V2D(), v5.V2D(), 33), "fcvtzu v7.2d, v5.2d, #33");
4935 COMPARE(Fcvtzu(s8, s6, 13), "fcvtzu s8, s6, #13");
4936 COMPARE(Fcvtzu(d8, d6, 34), "fcvtzu d8, d6, #34");
4937
4938 CLEANUP();
4939 }
OLDNEW
« no previous file with comments | « test/cctest/test-assembler-arm64.cc ('k') | test/cctest/test-simulator-neon-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698