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

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

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

Powered by Google App Engine
This is Rietveld 408576698