summaryrefslogtreecommitdiff
path: root/test/MC/AArch64/basic-a64-diagnostics.s
blob: b33891cc3d731828a4978de7b97467352acada5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
// RUN: not llvm-mc -triple aarch64-none-linux-gnu < %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-ERROR --check-prefix=CHECK-ERROR-ARM64 < %t %s

//------------------------------------------------------------------------------
// Add/sub (extended register)
//------------------------------------------------------------------------------

        // Mismatched final register and extend
        add x2, x3, x5, sxtb
        add x2, x4, w2, uxtx
        add w5, w7, x9, sxtx
// CHECK-ERROR: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR:         add x2, x3, x5, sxtb
// CHECK-ERROR:                         ^
// CHECK-ERROR: error: expected '[su]xt[bhw]' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR:         add x2, x4, w2, uxtx
// CHECK-ERROR:                         ^
// CHECK-ERROR: error: expected compatible register, symbol or integer in range [0, 4095]
// CHECK-ERROR:         add w5, w7, x9, sxtx
// CHECK-ERROR:                     ^

        // Out of range extends
        add x9, x10, w11, uxtb #-1
        add x3, x5, w7, uxtb #5
        sub x9, x15, x2, uxth #5
// CHECK-ERROR: error: expected integer shift amount
// CHECK-ERROR:         add x9, x10, w11, uxtb #-1
// CHECK-ERROR:                                 ^
// CHECK-ERROR: error: expected '[su]xt[bhw]' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR:         add x3, x5, w7, uxtb #5
// CHECK-ERROR:                         ^
// CHECK-ERROR: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR:         sub x9, x15, x2, uxth #5
// CHECK-ERROR:                          ^

        // Wrong registers on normal variants
        add xzr, x3, x5, uxtx
        sub x3, xzr, w9, sxth #1
        add x1, x2, sp, uxtx
// CHECK-ERROR: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 63]
// CHECK-ERROR:         add xzr, x3, x5, uxtx
// CHECK-ERROR:                          ^
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR:         sub x3, xzr, w9, sxth #1
// CHECK-ERROR:                 ^
// CHECK-ERROR: error: expected compatible register, symbol or integer in range [0, 4095]
// CHECK-ERROR:         add x1, x2, sp, uxtx
// CHECK-ERROR:                     ^

        // Wrong registers on flag-setting variants
        adds sp, x3, w2, uxtb
        adds x3, xzr, x9, uxtx
        subs x2, x1, sp, uxtx
        adds x2, x1, sp, uxtb #2
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR:         adds sp, x3, w2, uxtb
// CHECK-ERROR:              ^
// CHECK-ERROR: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 63]
// CHECK-ERROR:         adds x3, xzr, x9, uxtx
// CHECK-ERROR:                           ^
// CHECK-ERROR: error: expected compatible register, symbol or integer in range [0, 4095]
// CHECK-ERROR:         subs x2, x1, sp, uxtx
// CHECK-ERROR:                      ^
// CHECK-ERROR: error: expected compatible register, symbol or integer in range [0, 4095]
// CHECK-ERROR:         adds x2, x1, sp, uxtb #2
// CHECK-ERROR:                      ^

        // Amount not optional if lsl valid and used
        add sp, x5, x7, lsl
// CHECK-ERROR: error: expected #imm after shift specifier
// CHECK-ERROR:         add sp, x5, x7, lsl
// CHECK-ERROR:                             ^

//------------------------------------------------------------------------------
// Add/sub (immediate)
//------------------------------------------------------------------------------

// Out of range immediates: < 0 or more than 12 bits
        add w4, w5, #-1
        add w5, w6, #0x1000
        add w4, w5, #-1, lsl #12
        add w5, w6, #0x1000, lsl #12
// CHECK-ERROR: error: expected compatible register, symbol or integer in range [0, 4095]
// CHECK-ERROR-NEXT:         add w4, w5, #-1
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-AARCH64-NEXT: error: expected compatible register, symbol or integer in range [0, 4095]
// CHECK-ERROR-AARCH64-NEXT:         add w5, w6, #0x1000
// CHECK-ERROR-AARCH64-NEXT:                     ^
// CHECK-ERROR-NEXT: error: expected compatible register, symbol or integer in range [0, 4095]
// CHECK-ERROR-NEXT:         add w4, w5, #-1, lsl #12
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-NEXT: error: expected compatible register, symbol or integer in range [0, 4095]
// CHECK-ERROR-NEXT:         add w5, w6, #0x1000, lsl #12
// CHECK-ERROR-NEXT:                     ^

// Only lsl #0 and lsl #12 are allowed
        add w2, w3, #0x1, lsl #1
        add w5, w17, #0xfff, lsl #13
        add w17, w20, #0x1000, lsl #12
        sub xsp, x34, #0x100, lsl #-1
// CHECK-ERROR: error: expected compatible register, symbol or integer in range [0, 4095]
// CHECK-ERROR-NEXT:         add w2, w3, #0x1, lsl #1
// CHECK-ERROR-NEXT:                                ^
// CHECK-ERROR-NEXT: error: expected compatible register, symbol or integer in range [0, 4095]
// CHECK-ERROR-NEXT:         add w5, w17, #0xfff, lsl #13
// CHECK-ERROR-NEXT:                                   ^
// CHECK-ERROR-NEXT: error: expected compatible register, symbol or integer in range [0, 4095]
// CHECK-ERROR-NEXT:         add w17, w20, #0x1000, lsl #12
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: only 'lsl #+N' valid after immediate
// CHECK-ERROR-NEXT:         sub xsp, x34, #0x100, lsl #-1
// CHECK-ERROR-NEXT:                                    ^

// Incorrect registers (w31 doesn't exist at all, and 31 decodes to sp for these).
        add w31, w20, #1234
        add wzr, w20, #0x123
        add w20, wzr, #0x321
        add wzr, wzr, #0xfff
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         add w31, w20, #1234
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         add wzr, w20, #0x123
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         add w20, wzr, #0x321
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         add wzr, wzr, #0xfff
// CHECK-ERROR-NEXT:             ^

// Mixed register classes
        add xsp, w2, #123
        sub w2, x30, #32
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         add xsp, w2, #123
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         sub w2, x30, #32
// CHECK-ERROR-NEXT:                 ^

// Out of range immediate
        adds w0, w5, #0x10000
// CHECK-ERROR-AARCH64: error: expected compatible register, symbol or integer in range [0, 4095]
// CHECK-ERROR-AARCH64-NEXT:         adds w0, w5, #0x10000
// CHECK-ERROR-AARCH64-NEXT:                      ^

// Wn|WSP should be in second place
        adds w4, wzr, #0x123
// ...but wzr is the 31 destination
        subs wsp, w5, #123
        subs x5, xzr, #0x456, lsl #12
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         adds w4, wzr, #0x123
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         subs wsp, w5, #123
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         subs x5, xzr, #0x456, lsl #12
// CHECK-ERROR-NEXT:                  ^

        // MOV alias should not accept any fiddling
        mov x2, xsp, #123
        mov wsp, w27, #0xfff, lsl #12
// CHECK-ERROR: error: expected compatible register or logical immediate
// CHECK-ERROR-NEXT:         mov x2, xsp, #123
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         mov wsp, w27, #0xfff, lsl #12
// CHECK-ERROR-NEXT:                       ^

        // A relocation should be provided for symbols
        add x3, x9, #variable
// CHECK-ERROR: error: expected compatible register, symbol or integer in range [0, 4095]
// CHECK-ERROR-NEXT:         add x3, x9, #variable
// CHECK-ERROR-NEXT:                      ^


//------------------------------------------------------------------------------
// Add-subtract (shifted register)
//------------------------------------------------------------------------------

        add wsp, w1, w2, lsr #3
        add x4, sp, x9, asr #5
        add x9, x10, x5, ror #3
// CHECK-ERROR: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         add wsp, w1, w2, lsr #3
// CHECK-ERROR-NEXT:                          ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         add x4, sp, x9, asr #5
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         add x9, x10, x5, ror #3
// CHECK-ERROR-NEXT:                          ^

        add w1, w2, w3, lsl #-1
        add w1, w2, w3, lsl #32
        add w1, w2, w3, lsr #-1
        add w1, w2, w3, lsr #32
        add w1, w2, w3, asr #-1
        add w1, w2, w3, asr #32
        add x1, x2, x3, lsl #-1
        add x1, x2, x3, lsl #64
        add x1, x2, x3, lsr #-1
        add x1, x2, x3, lsr #64
        add x1, x2, x3, asr #-1
        add x1, x2, x3, asr #64
// CHECK-ERROR: error: expected integer shift amount
// CHECK-ERROR-NEXT:         add w1, w2, w3, lsl #-1
// CHECK-ERROR-NEXT:                              ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         add w1, w2, w3, lsl #32
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         add w1, w2, w3, lsr #-1
// CHECK-ERROR-NEXT:                              ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         add w1, w2, w3, lsr #32
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         add w1, w2, w3, asr #-1
// CHECK-ERROR-NEXT:                              ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         add w1, w2, w3, asr #32
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         add x1, x2, x3, lsl #-1
// CHECK-ERROR-NEXT:                              ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         add x1, x2, x3, lsl #64
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         add x1, x2, x3, lsr #-1
// CHECK-ERROR-NEXT:                              ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         add x1, x2, x3, lsr #64
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         add x1, x2, x3, asr #-1
// CHECK-ERROR-NEXT:                              ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         add x1, x2, x3, asr #64
// CHECK-ERROR-NEXT:                         ^

        adds w1, w2, w3, lsl #-1
        adds w1, w2, w3, lsl #32
        adds w1, w2, w3, lsr #-1
        adds w1, w2, w3, lsr #32
        adds w1, w2, w3, asr #-1
        adds w1, w2, w3, asr #32
        adds x1, x2, x3, lsl #-1
        adds x1, x2, x3, lsl #64
        adds x1, x2, x3, lsr #-1
        adds x1, x2, x3, lsr #64
        adds x1, x2, x3, asr #-1
        adds x1, x2, x3, asr #64
// CHECK-ERROR: error: expected integer shift amount
// CHECK-ERROR-NEXT:         adds w1, w2, w3, lsl #-1
// CHECK-ERROR-NEXT:                               ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         adds w1, w2, w3, lsl #32
// CHECK-ERROR-NEXT:                          ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         adds w1, w2, w3, lsr #-1
// CHECK-ERROR-NEXT:                               ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         adds w1, w2, w3, lsr #32
// CHECK-ERROR-NEXT:                          ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         adds w1, w2, w3, asr #-1
// CHECK-ERROR-NEXT:                               ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         adds w1, w2, w3, asr #32
// CHECK-ERROR-NEXT:                          ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         adds x1, x2, x3, lsl #-1
// CHECK-ERROR-NEXT:                               ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         adds x1, x2, x3, lsl #64
// CHECK-ERROR-NEXT:                          ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         adds x1, x2, x3, lsr #-1
// CHECK-ERROR-NEXT:                               ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         adds x1, x2, x3, lsr #64
// CHECK-ERROR-NEXT:                          ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         adds x1, x2, x3, asr #-1
// CHECK-ERROR-NEXT:                               ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         adds x1, x2, x3, asr #64
// CHECK-ERROR-NEXT:                          ^

        sub w1, w2, w3, lsl #-1
        sub w1, w2, w3, lsl #32
        sub w1, w2, w3, lsr #-1
        sub w1, w2, w3, lsr #32
        sub w1, w2, w3, asr #-1
        sub w1, w2, w3, asr #32
        sub x1, x2, x3, lsl #-1
        sub x1, x2, x3, lsl #64
        sub x1, x2, x3, lsr #-1
        sub x1, x2, x3, lsr #64
        sub x1, x2, x3, asr #-1
        sub x1, x2, x3, asr #64
// CHECK-ERROR: error: expected integer shift amount
// CHECK-ERROR-NEXT:         sub w1, w2, w3, lsl #-1
// CHECK-ERROR-NEXT:                              ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         sub w1, w2, w3, lsl #32
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         sub w1, w2, w3, lsr #-1
// CHECK-ERROR-NEXT:                              ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         sub w1, w2, w3, lsr #32
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         sub w1, w2, w3, asr #-1
// CHECK-ERROR-NEXT:                              ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         sub w1, w2, w3, asr #32
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         sub x1, x2, x3, lsl #-1
// CHECK-ERROR-NEXT:                              ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         sub x1, x2, x3, lsl #64
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         sub x1, x2, x3, lsr #-1
// CHECK-ERROR-NEXT:                              ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         sub x1, x2, x3, lsr #64
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         sub x1, x2, x3, asr #-1
// CHECK-ERROR-NEXT:                              ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         sub x1, x2, x3, asr #64
// CHECK-ERROR-NEXT:                         ^

        subs w1, w2, w3, lsl #-1
        subs w1, w2, w3, lsl #32
        subs w1, w2, w3, lsr #-1
        subs w1, w2, w3, lsr #32
        subs w1, w2, w3, asr #-1
        subs w1, w2, w3, asr #32
        subs x1, x2, x3, lsl #-1
        subs x1, x2, x3, lsl #64
        subs x1, x2, x3, lsr #-1
        subs x1, x2, x3, lsr #64
        subs x1, x2, x3, asr #-1
        subs x1, x2, x3, asr #64
// CHECK-ERROR: error: expected integer shift amount
// CHECK-ERROR-NEXT:         subs w1, w2, w3, lsl #-1
// CHECK-ERROR-NEXT:                               ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         subs w1, w2, w3, lsl #32
// CHECK-ERROR-NEXT:                          ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         subs w1, w2, w3, lsr #-1
// CHECK-ERROR-NEXT:                               ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         subs w1, w2, w3, lsr #32
// CHECK-ERROR-NEXT:                          ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         subs w1, w2, w3, asr #-1
// CHECK-ERROR-NEXT:                               ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         subs w1, w2, w3, asr #32
// CHECK-ERROR-NEXT:                          ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         subs x1, x2, x3, lsl #-1
// CHECK-ERROR-NEXT:                               ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         subs x1, x2, x3, lsl #64
// CHECK-ERROR-NEXT:                          ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         subs x1, x2, x3, lsr #-1
// CHECK-ERROR-NEXT:                               ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         subs x1, x2, x3, lsr #64
// CHECK-ERROR-NEXT:                          ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         subs x1, x2, x3, asr #-1
// CHECK-ERROR-NEXT:                               ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         subs x1, x2, x3, asr #64
// CHECK-ERROR-NEXT:                          ^

        cmn w9, w10, lsl #-1
        cmn w9, w10, lsl #32
        cmn w11, w12, lsr #-1
        cmn w11, w12, lsr #32
        cmn w19, wzr, asr #-1
        cmn wzr, wzr, asr #32
        cmn x9, x10, lsl #-1
        cmn x9, x10, lsl #64
        cmn x11, x12, lsr #-1
        cmn x11, x12, lsr #64
        cmn x19, xzr, asr #-1
        cmn xzr, xzr, asr #64
// CHECK-ERROR: error: expected integer shift amount
// CHECK-ERROR-NEXT:         cmn w9, w10, lsl #-1
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         cmn w9, w10, lsl #32
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         cmn w11, w12, lsr #-1
// CHECK-ERROR-NEXT:                            ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         cmn w11, w12, lsr #32
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         cmn w19, wzr, asr #-1
// CHECK-ERROR-NEXT:                            ^
// CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 31]
// CHECK-ERROR-NEXT:         cmn wzr, wzr, asr #32
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         cmn x9, x10, lsl #-1
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         cmn x9, x10, lsl #64
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         cmn x11, x12, lsr #-1
// CHECK-ERROR-NEXT:                            ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         cmn x11, x12, lsr #64
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         cmn x19, xzr, asr #-1
// CHECK-ERROR-NEXT:                            ^
// CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 63]
// CHECK-ERROR-NEXT:         cmn xzr, xzr, asr #64
// CHECK-ERROR-NEXT:                       ^

        cmp w9, w10, lsl #-1
        cmp w9, w10, lsl #32
        cmp w11, w12, lsr #-1
        cmp w11, w12, lsr #32
        cmp w19, wzr, asr #-1
        cmp wzr, wzr, asr #32
        cmp x9, x10, lsl #-1
        cmp x9, x10, lsl #64
        cmp x11, x12, lsr #-1
        cmp x11, x12, lsr #64
        cmp x19, xzr, asr #-1
        cmp xzr, xzr, asr #64
// CHECK-ERROR: error: expected integer shift amount
// CHECK-ERROR-NEXT:         cmp w9, w10, lsl #-1
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         cmp w9, w10, lsl #32
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         cmp w11, w12, lsr #-1
// CHECK-ERROR-NEXT:                            ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         cmp w11, w12, lsr #32
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         cmp w19, wzr, asr #-1
// CHECK-ERROR-NEXT:                            ^
// CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 31]
// CHECK-ERROR-NEXT:         cmp wzr, wzr, asr #32
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         cmp x9, x10, lsl #-1
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         cmp x9, x10, lsl #64
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         cmp x11, x12, lsr #-1
// CHECK-ERROR-NEXT:                            ^
// CHECK-ERROR-NEXT: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
// CHECK-ERROR-NEXT:         cmp x11, x12, lsr #64
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         cmp x19, xzr, asr #-1
// CHECK-ERROR-NEXT:                            ^
// CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 63]
// CHECK-ERROR-NEXT:         cmp xzr, xzr, asr #64
// CHECK-ERROR-NEXT:                       ^

        neg w9, w10, lsl #-1
        neg w9, w10, lsl #32
        neg w11, w12, lsr #-1
        neg w11, w12, lsr #32
        neg w19, wzr, asr #-1
        neg wzr, wzr, asr #32
        neg x9, x10, lsl #-1
        neg x9, x10, lsl #64
        neg x11, x12, lsr #-1
        neg x11, x12, lsr #64
        neg x19, xzr, asr #-1
        neg xzr, xzr, asr #64
// CHECK-ERROR: error: expected integer shift amount
// CHECK-ERROR-NEXT:         neg w9, w10, lsl #-1
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 31]
// CHECK-ERROR-NEXT:         neg w9, w10, lsl #32
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         neg w11, w12, lsr #-1
// CHECK-ERROR-NEXT:                            ^
// CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 31]
// CHECK-ERROR-NEXT:         neg w11, w12, lsr #32
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         neg w19, wzr, asr #-1
// CHECK-ERROR-NEXT:                            ^
// CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 31]
// CHECK-ERROR-NEXT:         neg wzr, wzr, asr #32
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         neg x9, x10, lsl #-1
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 63]
// CHECK-ERROR-NEXT:         neg x9, x10, lsl #64
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         neg x11, x12, lsr #-1
// CHECK-ERROR-NEXT:                            ^
// CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 63]
// CHECK-ERROR-NEXT:         neg x11, x12, lsr #64
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         neg x19, xzr, asr #-1
// CHECK-ERROR-NEXT:                            ^
// CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 63]
// CHECK-ERROR-NEXT:         neg xzr, xzr, asr #64
// CHECK-ERROR-NEXT:                       ^

        negs w9, w10, lsl #-1
        negs w9, w10, lsl #32
        negs w11, w12, lsr #-1
        negs w11, w12, lsr #32
        negs w19, wzr, asr #-1
        negs wzr, wzr, asr #32
        negs x9, x10, lsl #-1
        negs x9, x10, lsl #64
        negs x11, x12, lsr #-1
        negs x11, x12, lsr #64
        negs x19, xzr, asr #-1
        negs xzr, xzr, asr #64
// CHECK-ERROR: error: expected integer shift amount
// CHECK-ERROR-NEXT:         negs w9, w10, lsl #-1
// CHECK-ERROR-NEXT:                            ^
// CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 31]
// CHECK-ERROR-NEXT:         negs w9, w10, lsl #32
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         negs w11, w12, lsr #-1
// CHECK-ERROR-NEXT:                             ^
// CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 31]
// CHECK-ERROR-NEXT:         negs w11, w12, lsr #32
// CHECK-ERROR-NEXT:                        ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         negs w19, wzr, asr #-1
// CHECK-ERROR-NEXT:                             ^
// CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 31]
// CHECK-ERROR-NEXT:         negs wzr, wzr, asr #32
// CHECK-ERROR-NEXT:                        ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         negs x9, x10, lsl #-1
// CHECK-ERROR-NEXT:                            ^
// CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 63]
// CHECK-ERROR-NEXT:         negs x9, x10, lsl #64
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         negs x11, x12, lsr #-1
// CHECK-ERROR-NEXT:                             ^
// CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 63]
// CHECK-ERROR-NEXT:         negs x11, x12, lsr #64
// CHECK-ERROR-NEXT:                        ^
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         negs x19, xzr, asr #-1
// CHECK-ERROR-NEXT:                             ^
// CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 63]
// CHECK-ERROR-NEXT:         negs xzr, xzr, asr #64
// CHECK-ERROR-NEXT:                        ^

//------------------------------------------------------------------------------
// Add-subtract (shifted register)
//------------------------------------------------------------------------------

        adc wsp, w3, w5
        adc w1, wsp, w2
        adc w0, w10, wsp
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        adc wsp, w3, w5
// CHECK-ERROR-NEXT:            ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         adc w1, wsp, w2
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         adc w0, w10, wsp
// CHECK-ERROR-NEXT:                      ^

        adc sp, x3, x5
        adc x1, sp, x2
        adc x0, x10, sp
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         adc sp, x3, x5
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         adc x1, sp, x2
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         adc x0, x10, sp
// CHECK-ERROR-NEXT:                      ^

        adcs wsp, w3, w5
        adcs w1, wsp, w2
        adcs w0, w10, wsp
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         adcs wsp, w3, w5
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         adcs w1, wsp, w2
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         adcs w0, w10, wsp
// CHECK-ERROR-NEXT:                       ^

        adcs sp, x3, x5
        adcs x1, sp, x2
        adcs x0, x10, sp
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         adcs sp, x3, x5
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         adcs x1, sp, x2
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         adcs x0, x10, sp
// CHECK-ERROR-NEXT:                       ^

        sbc wsp, w3, w5
        sbc w1, wsp, w2
        sbc w0, w10, wsp
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         sbc wsp, w3, w5
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         sbc w1, wsp, w2
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         sbc w0, w10, wsp
// CHECK-ERROR-NEXT:                      ^

        sbc sp, x3, x5
        sbc x1, sp, x2
        sbc x0, x10, sp
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         sbc sp, x3, x5
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         sbc x1, sp, x2
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         sbc x0, x10, sp
// CHECK-ERROR-NEXT:                      ^

        sbcs wsp, w3, w5
        sbcs w1, wsp, w2
        sbcs w0, w10, wsp
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         sbcs wsp, w3, w5
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         sbcs w1, wsp, w2
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         sbcs w0, w10, wsp
// CHECK-ERROR-NEXT:                       ^

        sbcs sp, x3, x5
        sbcs x1, sp, x2
        sbcs x0, x10, sp
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         sbcs sp, x3, x5
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         sbcs x1, sp, x2
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         sbcs x0, x10, sp
// CHECK-ERROR-NEXT:                       ^

        ngc wsp, w3
        ngc w9, wsp
        ngc sp, x9
        ngc x2, sp
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ngc wsp, w3
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ngc w9, wsp
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ngc sp, x9
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ngc x2, sp
// CHECK-ERROR-NEXT:                 ^

        ngcs wsp, w3
        ngcs w9, wsp
        ngcs sp, x9
        ngcs x2, sp
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ngcs wsp, w3
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ngcs w9, wsp
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ngcs sp, x9
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ngcs x2, sp
// CHECK-ERROR-NEXT:                  ^

//------------------------------------------------------------------------------
// Bitfield
//------------------------------------------------------------------------------

        sbfm x3, w13, #0, #0
        sbfm w12, x9, #0, #0
        sbfm sp, x3, #3, #5
        sbfm w3, wsp, #1, #9
        sbfm x9, x5, #-1, #0
        sbfm x9, x5, #0, #-1
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         sbfm x3, w13, #0, #0
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         sbfm w12, x9, #0, #0
// CHECK-ERROR-NEXT:                   ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         sbfm sp, x3, #3, #5
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         sbfm w3, wsp, #1, #9
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 63]
// CHECK-ERROR-NEXT:         sbfm x9, x5, #-1, #0
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 63]
// CHECK-ERROR-NEXT:         sbfm x9, x5, #0, #-1
// CHECK-ERROR-NEXT:                          ^

        sbfm w3, w5, #32, #1
        sbfm w7, w11, #19, #32
        sbfm x29, x30, #64, #0
        sbfm x10, x20, #63, #64
// CHECK-ERROR: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:         sbfm w3, w5, #32, #1
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:         sbfm w7, w11, #19, #32
// CHECK-ERROR-NEXT:                            ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 63]
// CHECK-ERROR-NEXT:         sbfm x29, x30, #64, #0
// CHECK-ERROR-NEXT:                        ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 63]
// CHECK-ERROR-NEXT:         sbfm x10, x20, #63, #64
// CHECK-ERROR-NEXT:                             ^

        ubfm w3, w5, #32, #1
        ubfm w7, w11, #19, #32
        ubfm x29, x30, #64, #0
        ubfm x10, x20, #63, #64
// CHECK-ERROR: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:         ubfm w3, w5, #32, #1
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:         ubfm w7, w11, #19, #32
// CHECK-ERROR-NEXT:                            ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 63]
// CHECK-ERROR-NEXT:         ubfm x29, x30, #64, #0
// CHECK-ERROR-NEXT:                        ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 63]
// CHECK-ERROR-NEXT:         ubfm x10, x20, #63, #64
// CHECK-ERROR-NEXT:                             ^

        bfm w3, w5, #32, #1
        bfm w7, w11, #19, #32
        bfm x29, x30, #64, #0
        bfm x10, x20, #63, #64
// CHECK-ERROR: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:         bfm w3, w5, #32, #1
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:         bfm w7, w11, #19, #32
// CHECK-ERROR-NEXT:                            ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 63]
// CHECK-ERROR-NEXT:         bfm x29, x30, #64, #0
// CHECK-ERROR-NEXT:                        ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 63]
// CHECK-ERROR-NEXT:         bfm x10, x20, #63, #64
// CHECK-ERROR-NEXT:                             ^

        sxtb x3, x2
        sxth xzr, xzr
        sxtw x3, x5
// CHECK-ERROR-AARCH64: error: invalid operand for instruction
// CHECK-ERROR-AARCH64-NEXT:         sxtb x3, x2
// CHECK-ERROR-AARCH64-NEXT:                  ^
// CHECK-ERROR-AARCH64-NEXT: error: invalid operand for instruction
// CHECK-ERROR-AARCH64-NEXT:         sxth xzr, xzr
// CHECK-ERROR-AARCH64-NEXT:                   ^
// CHECK-ERROR-AARCH64-NEXT: error: invalid operand for instruction
// CHECK-ERROR-AARCH64-NEXT:         sxtw x3, x5
// CHECK-ERROR-AARCH64-NEXT:                  ^

        uxtb x3, x12
        uxth x5, x9
        uxtw x3, x5
        uxtb x2, sp
        uxtb sp, xzr
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         uxtb x3, x12
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         uxth x5, x9
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-AARCH64-NEXT: error: invalid instruction
// CHECK-ERROR-AARCH64-NEXT:         uxtw x3, x5
// CHECK-ERROR-AARCH64-NEXT:         ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         uxtb x2, sp
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         uxtb sp, xzr
// CHECK-ERROR-NEXT:              ^

        asr x3, w2, #1
        asr sp, x2, #1
        asr x25, x26, #-1
        asr x25, x26, #64
        asr w9, w8, #32
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         asr x3, w2, #1
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         asr sp, x2, #1
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 63]
// CHECK-ERROR-NEXT:         asr x25, x26, #-1
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 63]
// CHECK-ERROR-NEXT:         asr x25, x26, #64
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:         asr w9, w8, #32
// CHECK-ERROR-NEXT:                     ^

        sbfiz w1, w2, #0, #0
        sbfiz wsp, w9, #0, #1
        sbfiz w9, w10, #32, #1
        sbfiz w11, w12, #32, #0
        sbfiz w9, w10, #10, #23
        sbfiz x3, x5, #12, #53
        sbfiz sp, x3, #7, #6
        sbfiz w3, wsp, #10, #8
// CHECK-ERROR-AARCH64: error: expected integer in range [<lsb>, 31]
// CHECK-ERROR-ARM64: error: expected integer in range [1, 32]
// CHECK-ERROR-NEXT:         sbfiz w1, w2, #0, #0
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         sbfiz wsp, w9, #0, #1
// CHECK-ERROR-NEXT:               ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:         sbfiz w9, w10, #32, #1
// CHECK-ERROR-NEXT:                        ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:         sbfiz w11, w12, #32, #0
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: requested insert overflows register
// CHECK-ERROR-NEXT:         sbfiz w9, w10, #10, #23
// CHECK-ERROR-NEXT:                             ^
// CHECK-ERROR-NEXT: error: requested insert overflows register
// CHECK-ERROR-NEXT:         sbfiz x3, x5, #12, #53
// CHECK-ERROR-NEXT:                            ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         sbfiz sp, x3, #7, #6
// CHECK-ERROR-NEXT:               ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         sbfiz w3, wsp, #10, #8
// CHECK-ERROR-NEXT:                   ^

        sbfx w1, w2, #0, #0
        sbfx wsp, w9, #0, #1
        sbfx w9, w10, #32, #1
        sbfx w11, w12, #32, #0
        sbfx w9, w10, #10, #23
        sbfx x3, x5, #12, #53
        sbfx sp, x3, #7, #6
        sbfx w3, wsp, #10, #8
// CHECK-ERROR-AARCH64: error: expected integer in range [<lsb>, 31]
// CHECK-ERROR-ARM64: error: expected integer in range [1, 32]
// CHECK-ERROR-NEXT:         sbfx w1, w2, #0, #0
// CHECK-ERROR-NEXT:                          ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         sbfx wsp, w9, #0, #1
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:         sbfx w9, w10, #32, #1
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:         sbfx w11, w12, #32, #0
// CHECK-ERROR-NEXT:                        ^
// CHECK-ERROR-NEXT: error: requested extract overflows register
// CHECK-ERROR-NEXT:         sbfx w9, w10, #10, #23
// CHECK-ERROR-NEXT:                            ^
// CHECK-ERROR-NEXT: error: requested extract overflows register
// CHECK-ERROR-NEXT:         sbfx x3, x5, #12, #53
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         sbfx sp, x3, #7, #6
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         sbfx w3, wsp, #10, #8
// CHECK-ERROR-NEXT:                  ^

        bfi w1, w2, #0, #0
        bfi wsp, w9, #0, #1
        bfi w9, w10, #32, #1
        bfi w11, w12, #32, #0
        bfi w9, w10, #10, #23
        bfi x3, x5, #12, #53
        bfi sp, x3, #7, #6
        bfi w3, wsp, #10, #8
// CHECK-ERROR-AARCH64: error: expected integer in range [<lsb>, 31]
// CHECK-ERROR-ARM64: error: expected integer in range [1, 32]
// CHECK-ERROR-NEXT:         bfi w1, w2, #0, #0
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         bfi wsp, w9, #0, #1
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:         bfi w9, w10, #32, #1
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:         bfi w11, w12, #32, #0
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: requested insert overflows register
// CHECK-ERROR-NEXT:         bfi w9, w10, #10, #23
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: requested insert overflows register
// CHECK-ERROR-NEXT:         bfi x3, x5, #12, #53
// CHECK-ERROR-NEXT:                          ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         bfi sp, x3, #7, #6
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         bfi w3, wsp, #10, #8
// CHECK-ERROR-NEXT:                 ^

        bfxil w1, w2, #0, #0
        bfxil wsp, w9, #0, #1
        bfxil w9, w10, #32, #1
        bfxil w11, w12, #32, #0
        bfxil w9, w10, #10, #23
        bfxil x3, x5, #12, #53
        bfxil sp, x3, #7, #6
        bfxil w3, wsp, #10, #8
// CHECK-ERROR-AARCH64: error: expected integer in range [<lsb>, 31]
// CHECK-ERROR-ARM64: error: expected integer in range [1, 32]
// CHECK-ERROR-NEXT:         bfxil w1, w2, #0, #0
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         bfxil wsp, w9, #0, #1
// CHECK-ERROR-NEXT:               ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:         bfxil w9, w10, #32, #1
// CHECK-ERROR-NEXT:                        ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:         bfxil w11, w12, #32, #0
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: requested extract overflows register
// CHECK-ERROR-NEXT:         bfxil w9, w10, #10, #23
// CHECK-ERROR-NEXT:                             ^
// CHECK-ERROR-NEXT: error: requested extract overflows register
// CHECK-ERROR-NEXT:         bfxil x3, x5, #12, #53
// CHECK-ERROR-NEXT:                            ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         bfxil sp, x3, #7, #6
// CHECK-ERROR-NEXT:               ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         bfxil w3, wsp, #10, #8
// CHECK-ERROR-NEXT:                   ^

        ubfiz w1, w2, #0, #0
        ubfiz wsp, w9, #0, #1
        ubfiz w9, w10, #32, #1
        ubfiz w11, w12, #32, #0
        ubfiz w9, w10, #10, #23
        ubfiz x3, x5, #12, #53
        ubfiz sp, x3, #7, #6
        ubfiz w3, wsp, #10, #8
// CHECK-ERROR-AARCH64: error: expected integer in range [<lsb>, 31]
// CHECK-ERROR-ARM64: error: expected integer in range [1, 32]
// CHECK-ERROR-NEXT:         ubfiz w1, w2, #0, #0
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ubfiz wsp, w9, #0, #1
// CHECK-ERROR-NEXT:               ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:         ubfiz w9, w10, #32, #1
// CHECK-ERROR-NEXT:                        ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:         ubfiz w11, w12, #32, #0
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: requested insert overflows register
// CHECK-ERROR-NEXT:         ubfiz w9, w10, #10, #23
// CHECK-ERROR-NEXT:                             ^
// CHECK-ERROR-NEXT: error: requested insert overflows register
// CHECK-ERROR-NEXT:         ubfiz x3, x5, #12, #53
// CHECK-ERROR-NEXT:                            ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ubfiz sp, x3, #7, #6
// CHECK-ERROR-NEXT:               ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ubfiz w3, wsp, #10, #8
// CHECK-ERROR-NEXT:                   ^

        ubfx w1, w2, #0, #0
        ubfx wsp, w9, #0, #1
        ubfx w9, w10, #32, #1
        ubfx w11, w12, #32, #0
        ubfx w9, w10, #10, #23
        ubfx x3, x5, #12, #53
        ubfx sp, x3, #7, #6
        ubfx w3, wsp, #10, #8
// CHECK-ERROR-AARCH64: error: expected integer in range [<lsb>, 31]
// CHECK-ERROR-ARM64: error: expected integer in range [1, 32]
// CHECK-ERROR-NEXT:         ubfx w1, w2, #0, #0
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ubfx wsp, w9, #0, #1
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:         ubfx w9, w10, #32, #1
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:         ubfx w11, w12, #32, #0
// CHECK-ERROR-NEXT:                        ^
// CHECK-ERROR-NEXT: error: requested extract overflows register
// CHECK-ERROR-NEXT:         ubfx w9, w10, #10, #23
// CHECK-ERROR-NEXT:                            ^
// CHECK-ERROR-NEXT: error: requested extract overflows register
// CHECK-ERROR-NEXT:         ubfx x3, x5, #12, #53
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ubfx sp, x3, #7, #6
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ubfx w3, wsp, #10, #8
// CHECK-ERROR-NEXT:                  ^

//------------------------------------------------------------------------------
// Compare & branch (immediate)
//------------------------------------------------------------------------------

        cbnz wsp, lbl
        cbz  sp, lbl
        cbz  x3, x5
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:           cbnz wsp, lbl
// CHECK-ERROR-NEXT:                ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:           cbz sp, lbl
// CHECK-ERROR-NEXT:               ^
// CHECK-ERROR-NEXT: error: expected label or encodable integer pc offset
// CHECK-ERROR-NEXT:           cbz x3, x5
// CHECK-ERROR-NEXT:                   ^

        cbz w20, #1048576
        cbnz xzr, #-1048580
        cbz x29, #1
// CHECK-ERROR: error: expected label or encodable integer pc offset
// CHECK-ERROR-NEXT:           cbz w20, #1048576
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-NEXT: error: expected label or encodable integer pc offset
// CHECK-ERROR-NEXT:           cbnz xzr, #-1048580
// CHECK-ERROR-NEXT:                    ^
// CHECK-ERROR-NEXT: error: expected label or encodable integer pc offset
// CHECK-ERROR-NEXT:           cbz x29, #1
// CHECK-ERROR-NEXT:                    ^

//------------------------------------------------------------------------------
// Conditional branch (immediate)
//------------------------------------------------------------------------------

        b.zf lbl
// CHECK-ERROR: error: invalid condition code
// CHECK-ERROR-NEXT:           b.zf lbl
// CHECK-ERROR-NEXT:             ^

        b.eq #1048576
        b.ge #-1048580
        b.cc #1
// CHECK-ERROR: error: expected label or encodable integer pc offset
// CHECK-ERROR-NEXT:           b.eq #1048576
// CHECK-ERROR-NEXT:                ^
// CHECK-ERROR-NEXT: error: expected label or encodable integer pc offset
// CHECK-ERROR-NEXT:           b.ge #-1048580
// CHECK-ERROR-NEXT:                ^
// CHECK-ERROR-NEXT: error: expected label or encodable integer pc offset
// CHECK-ERROR-NEXT:           b.cc #1
// CHECK-ERROR-NEXT:                ^

//------------------------------------------------------------------------------
// Conditional compare (immediate)
//------------------------------------------------------------------------------

        ccmp wsp, #4, #2, ne
        ccmp w25, #-1, #15, hs
        ccmp w3, #32, #0, ge
        ccmp w19, #5, #-1, lt
        ccmp w20, #7, #16, hs
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        ccmp wsp, #4, #2, ne
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:        ccmp w25, #-1, #15, hs
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:        ccmp w3, #32, #0, ge
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 15]
// CHECK-ERROR-NEXT:        ccmp w19, #5, #-1, lt
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 15]
// CHECK-ERROR-NEXT:        ccmp w20, #7, #16, hs
// CHECK-ERROR-NEXT:                      ^

        ccmp sp, #4, #2, ne
        ccmp x25, #-1, #15, hs
        ccmp x3, #32, #0, ge
        ccmp x19, #5, #-1, lt
        ccmp x20, #7, #16, hs
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        ccmp sp, #4, #2, ne
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:        ccmp x25, #-1, #15, hs
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:        ccmp x3, #32, #0, ge
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 15]
// CHECK-ERROR-NEXT:        ccmp x19, #5, #-1, lt
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 15]
// CHECK-ERROR-NEXT:        ccmp x20, #7, #16, hs
// CHECK-ERROR-NEXT:                      ^

        ccmn wsp, #4, #2, ne
        ccmn w25, #-1, #15, hs
        ccmn w3, #32, #0, ge
        ccmn w19, #5, #-1, lt
        ccmn w20, #7, #16, hs
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        ccmn wsp, #4, #2, ne
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:        ccmn w25, #-1, #15, hs
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:        ccmn w3, #32, #0, ge
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 15]
// CHECK-ERROR-NEXT:        ccmn w19, #5, #-1, lt
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 15]
// CHECK-ERROR-NEXT:        ccmn w20, #7, #16, hs
// CHECK-ERROR-NEXT:                      ^

        ccmn sp, #4, #2, ne
        ccmn x25, #-1, #15, hs
        ccmn x3, #32, #0, ge
        ccmn x19, #5, #-1, lt
        ccmn x20, #7, #16, hs
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        ccmn sp, #4, #2, ne
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:        ccmn x25, #-1, #15, hs
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:        ccmn x3, #32, #0, ge
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 15]
// CHECK-ERROR-NEXT:        ccmn x19, #5, #-1, lt
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 15]
// CHECK-ERROR-NEXT:        ccmn x20, #7, #16, hs
// CHECK-ERROR-NEXT:                      ^

//------------------------------------------------------------------------------
// Conditional compare (register)
//------------------------------------------------------------------------------

        ccmp wsp, w4, #2, ne
        ccmp w3, wsp, #0, ge
        ccmp w19, w5, #-1, lt
        ccmp w20, w7, #16, hs
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        ccmp wsp, w4, #2, ne
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:        ccmp w3, wsp, #0, ge
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 15]
// CHECK-ERROR-NEXT:        ccmp w19, w5, #-1, lt
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 15]
// CHECK-ERROR-NEXT:        ccmp w20, w7, #16, hs
// CHECK-ERROR-NEXT:                      ^

        ccmp sp, x4, #2, ne
        ccmp x25, sp, #15, hs
        ccmp x19, x5, #-1, lt
        ccmp x20, x7, #16, hs
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        ccmp sp, x4, #2, ne
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:        ccmp x25, sp, #15, hs
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 15]
// CHECK-ERROR-NEXT:        ccmp x19, x5, #-1, lt
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 15]
// CHECK-ERROR-NEXT:        ccmp x20, x7, #16, hs
// CHECK-ERROR-NEXT:                      ^

        ccmn wsp, w4, #2, ne
        ccmn w25, wsp, #15, hs
        ccmn w19, w5, #-1, lt
        ccmn w20, w7, #16, hs
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        ccmn wsp, w4, #2, ne
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:        ccmn w25, wsp, #15, hs
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 15]
// CHECK-ERROR-NEXT:        ccmn w19, w5, #-1, lt
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 15]
// CHECK-ERROR-NEXT:        ccmn w20, w7, #16, hs
// CHECK-ERROR-NEXT:                      ^

        ccmn sp, x4, #2, ne
        ccmn x25, sp, #15, hs
        ccmn x19, x5, #-1, lt
        ccmn x20, x7, #16, hs
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        ccmn sp, x4, #2, ne
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:        ccmn x25, sp, #15, hs
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 15]
// CHECK-ERROR-NEXT:        ccmn x19, x5, #-1, lt
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 15]
// CHECK-ERROR-NEXT:        ccmn x20, x7, #16, hs
// CHECK-ERROR-NEXT:                      ^

//------------------------------------------------------------------------------
// Conditional select
//------------------------------------------------------------------------------

        csel w4, wsp, w9, eq
        csel wsp, w2, w3, ne
        csel w10, w11, wsp, ge
        csel w1, w2, w3, #3
        csel x4, sp, x9, eq
        csel sp, x2, x3, ne
        csel x10, x11, sp, ge
        csel x1, x2, x3, #3
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        csel w4, wsp, w9, eq
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        csel wsp, w2, w3, ne
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        csel w10, w11, wsp, ge
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: expected AArch64 condition code
// CHECK-ERROR-NEXT:        csel w1, w2, w3, #3
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        csel x4, sp, x9, eq
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        csel sp, x2, x3, ne
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        csel x10, x11, sp, ge
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: expected AArch64 condition code
// CHECK-ERROR-NEXT:        csel x1, x2, x3, #3
// CHECK-ERROR-NEXT:                         ^

        csinc w20, w21, wsp, mi
        csinc sp, x30, x29, eq
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        csinc w20, w21, wsp, mi
// CHECK-ERROR-NEXT:                        ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        csinc sp, x30, x29, eq
// CHECK-ERROR-NEXT:              ^

        csinv w20, wsp, wsp, mi
        csinv sp, x30, x29, le
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        csinv w20, wsp, wsp, mi
// CHECK-ERROR-NEXT:                   ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        csinv sp, x30, x29, le
// CHECK-ERROR-NEXT:              ^

        csneg w20, w21, wsp, mi
        csneg x0, sp, x29, le
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        csneg w20, w21, wsp, mi
// CHECK-ERROR-NEXT:                        ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        csneg x0, sp, x29, le
// CHECK-ERROR-NEXT:                  ^

        cset wsp, lt
        csetm sp, ge
        cset w1, al
        csetm x6, nv
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        cset wsp, lt
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        csetm sp, ge
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: condition codes AL and NV are invalid for this instruction
// CHECK-ERROR-NEXT:        cset w1, al
// CHECK-ERROR-NEXT:                   ^
// CHECK-ERROR-NEXT: error: condition codes AL and NV are invalid for this instruction
// CHECK-ERROR-NEXT:        csetm x6, nv
// CHECK-ERROR-NEXT:                    ^

        cinc w3, wsp, ne
        cinc sp, x9, eq
        cinc x2, x0, nv
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        cinc w3, wsp, ne
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        cinc sp, x9, eq
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: condition codes AL and NV are invalid for this instruction
// CHECK-ERROR-NEXT:        cinc x2, x0, nv
// CHECK-ERROR-NEXT:                       ^

        cinv w3, wsp, ne
        cinv sp, x9, eq
        cinv w8, x7, nv
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        cinv w3, wsp, ne
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        cinv sp, x9, eq
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: condition codes AL and NV are invalid for this instruction
// CHECK-ERROR-NEXT:        cinv w8, x7, nv
// CHECK-ERROR-NEXT:                       ^

        cneg w3, wsp, ne
        cneg sp, x9, eq
        cneg x4, x5, al
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        cneg w3, wsp, ne
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        cneg sp, x9, eq
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: condition codes AL and NV are invalid for this instruction
// CHECK-ERROR-NEXT:        cneg x4, x5, al
// CHECK-ERROR-NEXT:                       ^

//------------------------------------------------------------------------------
// Data Processing (1 source)
//------------------------------------------------------------------------------
        rbit x23, w2
//CHECK-ERROR: error: invalid operand for instruction
//CHECK-ERROR-NEXT:     rbit x23, w2

        cls sp, x2
//CHECK-ERROR: error: invalid operand for instruction
//CHECK-ERROR-NEXT:     cls sp, x2

        clz wsp, w3
//CHECK-ERROR: error: invalid operand for instruction
//CHECK-ERROR-NEXT:     clz wsp, w3

//------------------------------------------------------------------------------
// Data Processing (2 sources)
//------------------------------------------------------------------------------
        udiv x23, w2, x18
//CHECK-ERROR: error: invalid operand for instruction
//CHECK-ERROR-NEXT:     udiv x23, w2, x18

        lsl sp, x2, x4
//CHECK-ERROR: error: invalid operand for instruction
//CHECK-ERROR-NEXT:     lsl sp, x2, x4

        asr wsp, w3, w9
//CHECK-ERROR: error: invalid operand for instruction
//CHECK-ERROR-NEXT:     asr wsp, w3, w9

//------------------------------------------------------------------------------
// Data Processing (3 sources)
//------------------------------------------------------------------------------

        madd sp, x3, x9, x10
//CHECK-ERROR: error: invalid operand for instruction
//CHECK-ERROR-NEXT:     madd sp, x3, x9, x10

//------------------------------------------------------------------------------
// Exception generation
//------------------------------------------------------------------------------
        svc #-1
        hlt #65536
        dcps4 #43
        dcps4
// CHECK-ERROR: error: {{expected|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-NEXT:         svc #-1
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-NEXT:         hlt #65536
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: {{invalid instruction|unrecognized instruction mnemonic}}
// CHECK-ERROR-NEXT:         dcps4 #43
// CHECK-ERROR-NEXT:         ^
// CHECK-ERROR-NEXT: error: {{invalid instruction|unrecognized instruction mnemonic}}
// CHECK-ERROR-NEXT:         dcps4
// CHECK-ERROR-NEXT:         ^

//------------------------------------------------------------------------------
// Extract (immediate)
//------------------------------------------------------------------------------

        extr w2, w20, w30, #-1
        extr w9, w19, w20, #32
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:         extr w2, w20, w30, #-1
// CHECK-ERROR-NEXT:                            ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:         extr w9, w19, w20, #32
// CHECK-ERROR-NEXT:                            ^

        extr x10, x15, x20, #-1
        extr x20, x25, x30, #64
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 63]
// CHECK-ERROR-NEXT:         extr x10, x15, x20, #-1
// CHECK-ERROR-NEXT:                             ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 63]
// CHECK-ERROR-NEXT:         extr x20, x25, x30, #64
// CHECK-ERROR-NEXT:                             ^

        ror w9, w10, #32
        ror x10, x11, #64
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:         ror w9, w10, #32
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 63]
// CHECK-ERROR-NEXT:         ror x10, x11, #64
// CHECK-ERROR-NEXT:                       ^

//------------------------------------------------------------------------------
// Floating-point compare
//------------------------------------------------------------------------------

        fcmp s3, d2
// CHECK-ERROR-AARCH64: error: expected floating-point constant #0.0
// CHECK-ERROR-ARM64: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         fcmp s3, d2
// CHECK-ERROR-NEXT:                  ^

        fcmp s9, #-0.0
        fcmp d3, #-0.0
        fcmp s1, #1.0
        fcmpe s30, #-0.0
// CHECK-ERROR: error: expected floating-point constant #0.0
// CHECK-ERROR-NEXT:         fcmp s9, #-0.0
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: expected floating-point constant #0.0
// CHECK-ERROR-NEXT:         fcmp d3, #-0.0
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: expected floating-point constant #0.0
// CHECK-ERROR-NEXT:         fcmp s1, #1.0
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: expected floating-point constant #0.0
// CHECK-ERROR-NEXT:         fcmpe s30, #-0.0
// CHECK-ERROR-NEXT:                    ^

//------------------------------------------------------------------------------
// Floating-point conditional compare
//------------------------------------------------------------------------------

        fccmp s19, s5, #-1, lt
        fccmp s20, s7, #16, hs
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 15]
// CHECK-ERROR-NEXT:        fccmp s19, s5, #-1, lt
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 15]
// CHECK-ERROR-NEXT:        fccmp s20, s7, #16, hs
// CHECK-ERROR-NEXT:                      ^

        fccmp d19, d5, #-1, lt
        fccmp d20, d7, #16, hs
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 15]
// CHECK-ERROR-NEXT:        fccmp d19, d5, #-1, lt
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 15]
// CHECK-ERROR-NEXT:        fccmp d20, d7, #16, hs
// CHECK-ERROR-NEXT:                      ^

        fccmpe s19, s5, #-1, lt
        fccmpe s20, s7, #16, hs
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 15]
// CHECK-ERROR-NEXT:        fccmpe s19, s5, #-1, lt
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 15]
// CHECK-ERROR-NEXT:        fccmpe s20, s7, #16, hs
// CHECK-ERROR-NEXT:                      ^

        fccmpe d19, d5, #-1, lt
        fccmpe d20, d7, #16, hs
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 15]
// CHECK-ERROR-NEXT:        fccmpe d19, d5, #-1, lt
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 15]
// CHECK-ERROR-NEXT:        fccmpe d20, d7, #16, hs
// CHECK-ERROR-NEXT:                      ^

//------------------------------------------------------------------------------
// Floating-point conditional compare
//------------------------------------------------------------------------------

        fcsel q3, q20, q9, pl
        fcsel h9, h10, h11, mi
        fcsel b9, b10, b11, mi
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         fcsel q3, q20, q9, pl
// CHECK-ERROR-NEXT:               ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         fcsel h9, h10, h11, mi
// CHECK-ERROR-NEXT:               ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         fcsel b9, b10, b11, mi
// CHECK-ERROR-NEXT:               ^

//------------------------------------------------------------------------------
// Floating-point data-processing (1 source)
//------------------------------------------------------------------------------

        fmov d0, s3
        fcvt d0, d1
// CHECK-ERROR: error: expected compatible register or floating-point constant
// CHECK-ERROR-NEXT:           fmov d0, s3
// CHECK-ERROR-NEXT:                    ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:           fcvt d0, d1
// CHECK-ERROR-NEXT:                    ^


//------------------------------------------------------------------------------
// Floating-point data-processing (2 sources)
//------------------------------------------------------------------------------

        fadd s0, d3, d7
        fmaxnm d3, s19, d12
        fnmul d1, d9, s18
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:           fadd s0, d3, d7
// CHECK-ERROR-NEXT: ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:           fmaxnm d3, s19, d12
// CHECK-ERROR-NEXT: ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:           fnmul d1, d9, s18
// CHECK-ERROR-NEXT: ^

//------------------------------------------------------------------------------
// Floating-point data-processing (3 sources)
//------------------------------------------------------------------------------

        fmadd b3, b4, b5, b6
        fmsub h1, h2, h3, h4
        fnmadd q3, q5, q6, q7
        fnmsub s2, s4, d5, h9
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         fmadd b3, b4, b5, b6
// CHECK-ERROR-NEXT:               ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         fmsub h1, h2, h3, h4
// CHECK-ERROR-NEXT:               ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         fnmadd q3, q5, q6, q7
// CHECK-ERROR-NEXT:                ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         fnmsub s2, s4, d5, h9
// CHECK-ERROR-NEXT:                ^

//------------------------------------------------------------------------------
// Floating-point conditional compare
//------------------------------------------------------------------------------

        fcvtzs w13, s31, #0
        fcvtzs w19, s20, #33
        fcvtzs wsp, s19, #14
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [1, 32]
// CHECK-ERROR-NEXT:        fcvtzs w13, s31, #0
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [1, 32]
// CHECK-ERROR-NEXT:        fcvtzs w19, s20, #33
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        fcvtzs wsp, s19, #14
// CHECK-ERROR-NEXT:               ^

        fcvtzs x13, s31, #0
        fcvtzs x19, s20, #65
        fcvtzs sp, s19, #14
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [1, 64]
// CHECK-ERROR-NEXT:        fcvtzs x13, s31, #0
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [1, 64]
// CHECK-ERROR-NEXT:        fcvtzs x19, s20, #65
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        fcvtzs sp, s19, #14
// CHECK-ERROR-NEXT:               ^

        fcvtzu w13, s31, #0
        fcvtzu w19, s20, #33
        fcvtzu wsp, s19, #14
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [1, 32]
// CHECK-ERROR-NEXT:        fcvtzu w13, s31, #0
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [1, 32]
// CHECK-ERROR-NEXT:        fcvtzu w19, s20, #33
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        fcvtzu wsp, s19, #14
// CHECK-ERROR-NEXT:               ^

        fcvtzu x13, s31, #0
        fcvtzu x19, s20, #65
        fcvtzu sp, s19, #14
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [1, 64]
// CHECK-ERROR-NEXT:        fcvtzu x13, s31, #0
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [1, 64]
// CHECK-ERROR-NEXT:        fcvtzu x19, s20, #65
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        fcvtzu sp, s19, #14
// CHECK-ERROR-NEXT:               ^

        scvtf w13, s31, #0
        scvtf w19, s20, #33
        scvtf wsp, s19, #14
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        scvtf w13, s31, #0
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        scvtf w19, s20, #33
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        scvtf wsp, s19, #14
// CHECK-ERROR-NEXT:              ^

        scvtf x13, s31, #0
        scvtf x19, s20, #65
        scvtf sp, s19, #14
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        scvtf x13, s31, #0
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        scvtf x19, s20, #65
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        scvtf sp, s19, #14
// CHECK-ERROR-NEXT:              ^

        ucvtf w13, s31, #0
        ucvtf w19, s20, #33
        ucvtf wsp, s19, #14
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        ucvtf w13, s31, #0
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        ucvtf w19, s20, #33
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        ucvtf wsp, s19, #14
// CHECK-ERROR-NEXT:              ^

        ucvtf x13, s31, #0
        ucvtf x19, s20, #65
        ucvtf sp, s19, #14
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        ucvtf x13, s31, #0
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        ucvtf x19, s20, #65
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        ucvtf sp, s19, #14
// CHECK-ERROR-NEXT:              ^

//------------------------------------------------------------------------------
// Floating-point immediate
//------------------------------------------------------------------------------
        ;; Exponent too large
        fmov d3, #0.0625
        fmov s2, #32.0
// CHECK-ERROR: error: expected compatible register or floating-point constant
// CHECK-ERROR-NEXT:           fmov d3, #0.0625
// CHECK-ERROR-NEXT:                    ^
// CHECK-ERROR-NEXT: error: expected compatible register or floating-point constant
// CHECK-ERROR-NEXT:           fmov s2, #32.0
// CHECK-ERROR-NEXT:                    ^

        ;; Fraction too precise
        fmov s9, #1.03125
        fmov s28, #1.96875
// CHECK-ERROR: error: expected compatible register or floating-point constant
// CHECK-ERROR-NEXT:           fmov s9, #1.03125
// CHECK-ERROR-NEXT:                    ^
// CHECK-ERROR-NEXT: error: expected compatible register or floating-point constant
// CHECK-ERROR-NEXT:           fmov s28, #1.96875
// CHECK-ERROR-NEXT:                     ^

        ;; No particular reason, but a striking omission
        fmov d0, #0.0
// CHECK-ERROR-AARCH64: error: expected compatible register or floating-point constant
// CHECK-ERROR-AARCH64-NEXT:           fmov d0, #0.0
// CHECK-ERROR-AARCH64-NEXT:                    ^

//------------------------------------------------------------------------------
// Floating-point <-> integer conversion
//------------------------------------------------------------------------------

        fmov x3, v0.d[0]
        fmov v29.1d[1], x2
        fmov x7, v0.d[2]
        fcvtns sp, s5
        scvtf s6, wsp
// CHECK-ERROR: error: expected lane specifier '[1]'
// CHECK-ERROR-NEXT:         fmov x3, v0.d[0]
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-AARCH64-NEXT: error: lane number incompatible with layout
// CHECK-ERROR-ARM64-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT: fmov v29.1d[1], x2
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-AARCH64-NEXT: error: lane number incompatible with layout
// CHECK-ERROR-ARM64-NEXT: error: expected lane specifier '[1]'
// CHECK-ERROR-NEXT: fmov x7, v0.d[2]
// CHECK-ERROR-NEXT:               ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         fcvtns sp, s5
// CHECK-ERROR-NEXT:                ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         scvtf s6, wsp
// CHECK-ERROR-NEXT:                   ^

//------------------------------------------------------------------------------
// Load-register (literal)
//------------------------------------------------------------------------------

        ldr sp, some_label
        ldrsw w3, somewhere
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldr sp, some_label
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldrsw w3, somewhere
// CHECK-ERROR-NEXT:               ^

        ldrsw x2, #1048576
        ldr q0, #-1048580
        ldr x0, #2
// CHECK-ERROR: error: expected label or encodable integer pc offset
// CHECK-ERROR-NEXT:         ldrsw x2, #1048576
// CHECK-ERROR-NEXT:                   ^
// CHECK-ERROR-NEXT: error: expected label or encodable integer pc offset
// CHECK-ERROR-NEXT:         ldr q0, #-1048580
// CHECK-ERROR-NEXT:                   ^
// CHECK-ERROR-NEXT: error: expected label or encodable integer pc offset
// CHECK-ERROR-NEXT:         ldr x0, #2
// CHECK-ERROR-NEXT:                 ^

//------------------------------------------------------------------------------
// Load/store exclusive
//------------------------------------------------------------------------------

       stxrb w2, w3, [x4, #20]
       stlxrh w10, w11, [w2]
// CHECK-ERROR-AARCH64: error: expected '#0'
// CHECK-ERROR-ARM64: error: index must be absent or #0
// CHECK-ERROR-NEXT:         stxrb w2, w3, [x4, #20]
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         stlxrh w10, w11, [w2]
// CHECK-ERROR-NEXT:                           ^

       stlxr  x20, w21, [sp]
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         stlxr  x20, w21, [sp]
// CHECK-ERROR-NEXT:                ^

       ldxr   sp, [sp]
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldxr   sp, [sp]
// CHECK-ERROR-NEXT:                ^

       stxp x1, x2, x3, [x4]
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         stxp x1, x2,  x3, [x4]
// CHECK-ERROR-NEXT:              ^

       stlxp w5, x1, w4, [x5]
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         stlxp w5, x1, w4, [x5]
// CHECK-ERROR-NEXT:                       ^

       stlxp w17, w6, x7, [x22]
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         stlxp w17, w6, x7, [x22]
// CHECK-ERROR-NEXT:                        ^

//------------------------------------------------------------------------------
// Load/store (unscaled immediate)
//------------------------------------------------------------------------------

        ldurb w2, [sp, #256]
        sturh w17, [x1, #256]
        ldursw x20, [x1, #256]
        ldur x12, [sp, #256]
// CHECK-ERROR: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:        ldurb w2, [sp, #256]
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         sturh w17, [x1, #256]
// CHECK-ERROR-NEXT:                    ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldursw x20, [x1, #256]
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldur x12, [sp, #256]
// CHECK-ERROR-NEXT:                   ^

        stur h2, [x2, #-257]
        stur b2, [x2, #-257]
        ldursb x9, [sp, #-257]
        ldur w2, [x30, #-257]
        stur q9, [x20, #-257]
// CHECK-ERROR: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         stur h2, [x2, #-257]
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         stur b2, [x2, #-257]
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldursb x9, [sp, #-257]
// CHECK-ERROR-NEXT:                    ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldur w2, [x30, #-257]
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         stur q9, [x20, #-257]
// CHECK-ERROR-NEXT:                  ^

        prfum pstl3strm, [xzr]
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         prfum pstl3strm, [xzr]
// CHECK-ERROR-NEXT:                           ^

//------------------------------------------------------------------------------
// Load-store register (immediate post-indexed)
//------------------------------------------------------------------------------
        ldr x3, [x4, #25], #0
        ldr x4, [x9, #0], #4
// CHECK-ERROR-AARCH64: error: {{expected symbolic reference or integer|index must be a multiple of 8}} in range [0, 32760]
// CHECK-ERROR-ARM64: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldr x3, [x4, #25], #0
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-AARCH64-NEXT: error: invalid operand for instruction
// CHECK-ERROR-AARCH64-NEXT:         ldr x4, [x9, #0], #4
// CHECK-ERROR-AARCH64-NEXT:                           ^

        strb w1, [x19], #256
        strb w9, [sp], #-257
        strh w1, [x19], #256
        strh w9, [sp], #-257
        str w1, [x19], #256
        str w9, [sp], #-257
// CHECK-ERROR: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         strb w1, [x19], #256
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         strb w9, [sp], #-257
// CHECK-ERROR-NEXT:                        ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         strh w1, [x19], #256
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         strh w9, [sp], #-257
// CHECK-ERROR-NEXT:                        ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         str w1, [x19], #256
// CHECK-ERROR-NEXT:                        ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         str w9, [sp], #-257
// CHECK-ERROR-NEXT:                       ^

        ldrb w1, [x19], #256
        ldrb w9, [sp], #-257
        ldrh w1, [x19], #256
        ldrh w9, [sp], #-257
        ldr w1, [x19], #256
        ldr w9, [sp], #-257
// CHECK-ERROR: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldrb w1, [x19], #256
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldrb w9, [sp], #-257
// CHECK-ERROR-NEXT:                        ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldrh w1, [x19], #256
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldrh w9, [sp], #-257
// CHECK-ERROR-NEXT:                        ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldr w1, [x19], #256
// CHECK-ERROR-NEXT:                        ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldr w9, [sp], #-257
// CHECK-ERROR-NEXT:                       ^

        ldrsb x2, [x3], #256
        ldrsb x22, [x13], #-257
        ldrsh x2, [x3], #256
        ldrsh x22, [x13], #-257
        ldrsw x2, [x3], #256
        ldrsw x22, [x13], #-257
// CHECK-ERROR: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldrsb x2, [x3], #256
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldrsb x22, [x13], #-257
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldrsh x2, [x3], #256
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldrsh x22, [x13], #-257
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldrsw x2, [x3], #256
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldrsw x22, [x13], #-257
// CHECK-ERROR-NEXT:                           ^

        ldrsb w2, [x3], #256
        ldrsb w22, [x13], #-257
        ldrsh w2, [x3], #256
        ldrsh w22, [x13], #-257
// CHECK-ERROR: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldrsb w2, [x3], #256
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldrsb w22, [x13], #-257
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldrsh w2, [x3], #256
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldrsh w22, [x13], #-257
// CHECK-ERROR-NEXT:                           ^

        str b3, [x3], #256
        str b3, [x13], #-257
        str h3, [x3], #256
        str h3, [x13], #-257
        str s3, [x3], #256
        str s3, [x13], #-257
        str d3, [x3], #256
        str d3, [x13], #-257
        str q3, [x3], #256
        str q3, [x13], #-257
// CHECK-ERROR: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         str b3, [x3], #256
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         str b3, [x13], #-257
// CHECK-ERROR-NEXT:                        ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         str h3, [x3], #256
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         str h3, [x13], #-257
// CHECK-ERROR-NEXT:                        ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         str s3, [x3], #256
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         str s3, [x13], #-257
// CHECK-ERROR-NEXT:                        ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         str d3, [x3], #256
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         str d3, [x13], #-257
// CHECK-ERROR-NEXT:                        ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         str q3, [x3], #256
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         str q3, [x13], #-257
// CHECK-ERROR-NEXT:                        ^

        ldr b3, [x3], #256
        ldr b3, [x13], #-257
        ldr h3, [x3], #256
        ldr h3, [x13], #-257
        ldr s3, [x3], #256
        ldr s3, [x13], #-257
        ldr d3, [x3], #256
        ldr d3, [x13], #-257
        ldr q3, [x3], #256
        ldr q3, [x13], #-257
// CHECK-ERROR: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldr b3, [x3], #256
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldr b3, [x13], #-257
// CHECK-ERROR-NEXT:                        ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldr h3, [x3], #256
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldr h3, [x13], #-257
// CHECK-ERROR-NEXT:                        ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldr s3, [x3], #256
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldr s3, [x13], #-257
// CHECK-ERROR-NEXT:                        ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldr d3, [x3], #256
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldr d3, [x13], #-257
// CHECK-ERROR-NEXT:                        ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldr q3, [x3], #256
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldr q3, [x13], #-257
// CHECK-ERROR-NEXT:                        ^

//------------------------------------------------------------------------------
// Load-store register (immediate pre-indexed)
//------------------------------------------------------------------------------

        ldr x3, [x4]!
// CHECK-ERROR: error:
// CHECK-ERROR-NEXT:         ldr x3, [x4]!
// CHECK-ERROR-NEXT:                     ^

        strb w1, [x19, #256]!
        strb w9, [sp, #-257]!
        strh w1, [x19, #256]!
        strh w9, [sp, #-257]!
        str w1, [x19, #256]!
        str w9, [sp, #-257]!
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         strb w1, [x19, #256]!
// CHECK-ERROR-NEXT:                             ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         strb w9, [sp, #-257]!
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         strh w1, [x19, #256]!
// CHECK-ERROR-NEXT:                             ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         strh w9, [sp, #-257]!
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         str w1, [x19, #256]!
// CHECK-ERROR-NEXT:                            ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         str w9, [sp, #-257]!
// CHECK-ERROR-NEXT:                 ^

        ldrb w1, [x19, #256]!
        ldrb w9, [sp, #-257]!
        ldrh w1, [x19, #256]!
        ldrh w9, [sp, #-257]!
        ldr w1, [x19, #256]!
        ldr w9, [sp, #-257]!
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldrb w1, [x19, #256]!
// CHECK-ERROR-NEXT:                             ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldrb w9, [sp, #-257]!
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldrh w1, [x19, #256]!
// CHECK-ERROR-NEXT:                             ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldrh w9, [sp, #-257]!
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldr w1, [x19, #256]!
// CHECK-ERROR-NEXT:                            ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldr w9, [sp, #-257]!
// CHECK-ERROR-NEXT:                 ^

        ldrsb x2, [x3, #256]!
        ldrsb x22, [x13, #-257]!
        ldrsh x2, [x3, #256]!
        ldrsh x22, [x13, #-257]!
        ldrsw x2, [x3, #256]!
        ldrsw x22, [x13, #-257]!
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldrsb x2, [x3, #256]!
// CHECK-ERROR-NEXT:                             ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldrsb x22, [x13, #-257]!
// CHECK-ERROR-NEXT:                    ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldrsh x2, [x3, #256]!
// CHECK-ERROR-NEXT:                             ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldrsh x22, [x13, #-257]!
// CHECK-ERROR-NEXT:                    ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldrsw x2, [x3, #256]!
// CHECK-ERROR-NEXT:                             ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldrsw x22, [x13, #-257]!
// CHECK-ERROR-NEXT:                    ^

        ldrsb w2, [x3, #256]!
        ldrsb w22, [x13, #-257]!
        ldrsh w2, [x3, #256]!
        ldrsh w22, [x13, #-257]!
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldrsb w2, [x3, #256]!
// CHECK-ERROR-NEXT:                             ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldrsb w22, [x13, #-257]!
// CHECK-ERROR-NEXT:                    ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldrsh w2, [x3, #256]!
// CHECK-ERROR-NEXT:                             ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldrsh w22, [x13, #-257]!
// CHECK-ERROR-NEXT:                    ^

        str b3, [x3, #256]!
        str b3, [x13, #-257]!
        str h3, [x3, #256]!
        str h3, [x13, #-257]!
        str s3, [x3, #256]!
        str s3, [x13, #-257]!
        str d3, [x3, #256]!
        str d3, [x13, #-257]!
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         str b3, [x3, #256]!
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         str b3, [x13, #-257]!
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         str h3, [x3, #256]!
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         str h3, [x13, #-257]!
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         str s3, [x3, #256]!
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         str s3, [x13, #-257]!
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         str d3, [x3, #256]!
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         str d3, [x13, #-257]!
// CHECK-ERROR-NEXT:                 ^

        ldr b3, [x3, #256]!
        ldr b3, [x13, #-257]!
        ldr h3, [x3, #256]!
        ldr h3, [x13, #-257]!
        ldr s3, [x3, #256]!
        ldr s3, [x13, #-257]!
        ldr d3, [x3, #256]!
        ldr d3, [x13, #-257]!
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldr b3, [x3, #256]!
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldr b3, [x13, #-257]!
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldr h3, [x3, #256]!
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldr h3, [x13, #-257]!
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldr s3, [x3, #256]!
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldr s3, [x13, #-257]!
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldr d3, [x3, #256]!
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldr d3, [x13, #-257]!
// CHECK-ERROR-NEXT:                 ^

//------------------------------------------------------------------------------
// Load/store (unprivileged)
//------------------------------------------------------------------------------

        ldtrb w2, [sp, #256]
        sttrh w17, [x1, #256]
        ldtrsw x20, [x1, #256]
        ldtr x12, [sp, #256]
// CHECK-ERROR: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:        ldtrb w2, [sp, #256]
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         sttrh w17, [x1, #256]
// CHECK-ERROR-NEXT:                    ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldtrsw x20, [x1, #256]
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldtr x12, [sp, #256]
// CHECK-ERROR-NEXT:                   ^

        sttr h2, [x2, #-257]
        sttr b2, [x2, #-257]
        ldtrsb x9, [sp, #-257]
        ldtr w2, [x30, #-257]
        sttr q9, [x20, #-257]
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         sttr h2, [x2, #-257]
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         sttr b2, [x2, #-257]
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldtrsb x9, [sp, #-257]
// CHECK-ERROR-NEXT:                    ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldtr w2, [x30, #-257]
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         sttr q9, [x20, #-257]
// CHECK-ERROR-NEXT:                  ^


//------------------------------------------------------------------------------
// Load/store (unsigned immediate)
//------------------------------------------------------------------------------

//// Out of range immediates
        ldr q0, [x11, #65536]
        ldr x0, [sp, #32768]
        ldr w0, [x4, #16384]
        ldrh w2, [x21, #8192]
        ldrb w3, [x12, #4096]
// CHECK-ERROR: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldr q0, [x11, #65536]
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldr x0, [sp, #32768]
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldr w0, [x4, #16384]
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldrh w2, [x21, #8192]
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         ldrb w3, [x12, #4096]
// CHECK-ERROR-NEXT:                  ^

//// Misaligned addresses
        ldr w0, [x0, #2]
        ldrsh w2, [x0, #123]
        str q0, [x0, #8]
// CHECK-ERROR-AARCH64: error: too few operands for instruction
// CHECK-ERROR-AARCH64-NEXT:         ldr w0, [x0, #2]
// CHECK-ERROR-AARCH64-NEXT:                 ^
// CHECK-ERROR-AARCH64-NEXT: error: too few operands for instruction
// CHECK-ERROR-AARCH64-NEXT:         ldrsh w2, [x0, #123]
// CHECK-ERROR-AARCH64-NEXT:                   ^
// CHECK-ERROR-AARCH64-NEXT: error: too few operands for instruction
// CHECK-ERROR-AARCH64-NEXT:         str q0, [x0, #8]
// CHECK-ERROR-AARCH64-NEXT:                 ^

//// 32-bit addresses
        ldr w0, [w20]
        ldrsh x3, [wsp]
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldr w0, [w20]
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldrsh x3, [wsp]
// CHECK-ERROR-NEXT:                    ^

//// Store things
        strb w0, [wsp]
        strh w31, [x23, #1]
        str x5, [x22, #12]
        str w7, [x12, #16384]
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT: strb w0, [wsp]
// CHECK-ERROR-NEXT:           ^
// CHECK-ERROR-AARCH64: error: invalid operand for instruction
// CHECK-ERROR-AARCH64-NEXT:         strh w31, [x23, #1]
// CHECK-ERROR-AARCH64-NEXT:              ^
// CHECK-ERROR-AARCH64-NEXT: error: too few operands for instruction
// CHECK-ERROR-AARCH64-NEXT:         str x5, [x22, #12]
// CHECK-ERROR-AARCH64-NEXT:                 ^
// CHECK-ERROR-NEXT: error: {{expected|index must be an}} integer in range [-256, 255]
// CHECK-ERROR-NEXT:         str w7, [x12, #16384]
// CHECK-ERROR-NEXT:                 ^

//// Bad PRFMs
        prfm #-1, [sp]
        prfm #32, [sp, #8]
        prfm pldl1strm, [w3, #8]
        prfm wibble, [sp]
// CHECK-ERROR-AARCH64: error: Invalid immediate for instruction
// CHECK-ERROR-ARM64: error: prefetch operand out of range, [0,31] expected
// CHECK-ERROR-NEXT:        prfm #-1, [sp]
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-AARCH64-NEXT: error: Invalid immediate for instruction
// CHECK-ERROR-ARM64-NEXT: error: prefetch operand out of range, [0,31] expected
// CHECK-ERROR-NEXT:        prfm #32, [sp, #8]
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        prfm pldl1strm, [w3, #8]
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-AARCH64-NEXT: error: operand specifier not recognised
// CHECK-ERROR-ARM64-NEXT: error: pre-fetch hint expected
// CHECK-ERROR-NEXT:        prfm wibble, [sp]
// CHECK-ERROR-NEXT:             ^

//------------------------------------------------------------------------------
// Load/store register (register offset)
//------------------------------------------------------------------------------

        ldr w3, [xzr, x3]
        ldr w4, [x0, x4, lsl]
        ldr w9, [x5, x5, uxtw]
        ldr w10, [x6, x9, sxtw #2]
        ldr w11, [x7, w2, lsl #2]
        ldr w12, [x8, w1, sxtx]
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:        ldr w3, [xzr, x3]
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: expected #imm after shift specifier
// CHECK-ERROR-NEXT:         ldr w4, [x0, x4, lsl]
// CHECK-ERROR-NEXT:                             ^
// CHECK-ERROR-NEXT: error: expected 'lsl' or 'sxtx' with optional shift of #0 or #2
// CHECK-ERROR-NEXT:         ldr w9, [x5, x5, uxtw]
// CHECK-ERROR-NEXT:                          ^
// CHECK-ERROR-NEXT: error: expected 'lsl' or 'sxtx' with optional shift of #0 or #2
// CHECK-ERROR-NEXT:         ldr w10, [x6, x9, sxtw #2]
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: expected 'uxtw' or 'sxtw' with optional shift of #0 or #2
// CHECK-ERROR-NEXT:         ldr w11, [x7, w2, lsl #2]
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: expected 'uxtw' or 'sxtw' with optional shift of #0 or #2
// CHECK-ERROR-NEXT:         ldr w12, [x8, w1, sxtx]
// CHECK-ERROR-NEXT:                           ^

        ldrsb w9, [x4, x2, lsl #-1]
        strb w9, [x4, x2, lsl #1]
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         ldrsb w9, [x4, x2, lsl #-1]
// CHECK-ERROR-NEXT:                                 ^
// CHECK-ERROR-NEXT: error: expected 'lsl' or 'sxtx' with optional shift of #0
// CHECK-ERROR-NEXT:         strb w9, [x4, x2, lsl #1]
// CHECK-ERROR-NEXT:                  ^

        ldrsh w9, [x4, x2, lsl #-1]
        ldr h13, [x4, w2, uxtw #2]
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         ldrsh w9, [x4, x2, lsl #-1]
// CHECK-ERROR-NEXT:                                 ^
// CHECK-ERROR-NEXT: error: expected 'uxtw' or 'sxtw' with optional shift of #0 or #1
// CHECK-ERROR-NEXT:         ldr h13, [x4, w2, uxtw #2]
// CHECK-ERROR-NEXT:                           ^

        str w9, [x5, w9, sxtw #-1]
        str s3, [sp, w9, uxtw #1]
        ldrsw x9, [x15, x4, sxtx #3]
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         str w9, [x5, w9, sxtw #-1]
// CHECK-ERROR-NEXT:                                ^
// CHECK-ERROR-NEXT: error: expected 'uxtw' or 'sxtw' with optional shift of #0 or #2
// CHECK-ERROR-NEXT:         str s3, [sp, w9, uxtw #1]
// CHECK-ERROR-NEXT:                          ^
// CHECK-ERROR-NEXT: error: expected 'lsl' or 'sxtx' with optional shift of #0 or #2
// CHECK-ERROR-NEXT:         ldrsw x9, [x15, x4, sxtx #3]
// CHECK-ERROR-NEXT:                             ^

        str xzr, [x5, x9, sxtx #-1]
        prfm pldl3keep, [sp, x20, lsl #2]
        ldr d3, [x20, wzr, uxtw #4]
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         str xzr, [x5, x9, sxtx #-1]
// CHECK-ERROR-NEXT:                                 ^
// CHECK-ERROR-NEXT: error: expected 'lsl' or 'sxtx' with optional shift of #0 or #3
// CHECK-ERROR-NEXT:         prfm pldl3keep, [sp, x20, lsl #2]
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: expected 'uxtw' or 'sxtw' with optional shift of #0 or #3
// CHECK-ERROR-NEXT:         ldr d3, [x20, wzr, uxtw #4]
// CHECK-ERROR-NEXT:                 ^

        ldr q5, [sp, x2, lsl #-1]
        ldr q10, [x20, w4, uxtw #2]
        str q21, [x20, w4, uxtw #5]
// CHECK-ERROR-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         ldr q5, [sp, x2, lsl #-1]
// CHECK-ERROR-NEXT:                               ^
// CHECK-ERROR-AARCH64-NEXT: error: expected 'lsl' or 'sxtw' with optional shift of #0 or #4
// CHECK-ERROR-ARM64-NEXT: error: expected 'uxtw' or 'sxtw' with optional shift of #0 or #4
// CHECK-ERROR-NEXT:         ldr q10, [x20, w4, uxtw #2]
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-AARCH64-NEXT: error: expected 'lsl' or 'sxtw' with optional shift of #0 or #4
// CHECK-ERROR-ARM64-NEXT: error: expected 'uxtw' or 'sxtw' with optional shift of #0 or #4
// CHECK-ERROR-NEXT:         str q21, [x20, w4, uxtw #5]
// CHECK-ERROR-NEXT:                  ^

//------------------------------------------------------------------------------
// Load/store register pair (offset)
//------------------------------------------------------------------------------
        ldp w3, w2, [x4, #1]
        stp w1, w2, [x3, #253]
        stp w9, w10, [x5, #256]
        ldp w11, w12, [x9, #-260]
        stp wsp, w9, [sp]
// CHECK-ERROR: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         ldp w3, w2, [x4, #1]
// CHECK-ERROR-NEXT:                          ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         stp w1, w2, [x3, #253]
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         stp w9, w10, [x5, #256]
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         ldp w11, w12, [x9, #-260]
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         stp wsp, w9, [sp]
// CHECK-ERROR-NEXT:             ^

        ldpsw x9, x2, [sp, #2]
        ldpsw x1, x2, [x10, #256]
        ldpsw x3, x4, [x11, #-260]
// CHECK-ERROR: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         ldpsw x9, x2, [sp, #2]
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         ldpsw x1, x2, [x10, #256]
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         ldpsw x3, x4, [x11, #-260]
// CHECK-ERROR-NEXT:                       ^

        ldp x2, x5, [sp, #4]
        ldp x5, x6, [x9, #512]
        stp x7, x8, [x10, #-520]
// CHECK-ERROR: error: {{expected integer|index must be a}} multiple of 8 in range [-512, 504]
// CHECK-ERROR-NEXT:         ldp x2, x5, [sp, #4]
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 8 in range [-512, 504]
// CHECK-ERROR-NEXT:         ldp x5, x6, [x9, #512]
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 8 in range [-512, 504]
// CHECK-ERROR-NEXT:         stp x7, x8, [x10, #-520]
// CHECK-ERROR-NEXT:                     ^

        ldp sp, x3, [x10]
        stp x3, sp, [x9]
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldp sp, x3, [x10]
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         stp x3, sp, [x9]
// CHECK-ERROR-NEXT:                 ^

        stp s3, s5, [sp, #-2]
        ldp s6, s26, [x4, #-260]
        stp s13, s19, [x5, #256]
// CHECK-ERROR: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         stp s3, s5, [sp, #-2]
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         ldp s6, s26, [x4, #-260]
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         stp s13, s19, [x5, #256]
// CHECK-ERROR-NEXT:                       ^

        ldp d3, d4, [xzr]
        ldp d5, d6, [x0, #512]
        stp d7, d8, [x0, #-520]
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldp d3, d4, [xzr]
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 8 in range [-512, 504]
// CHECK-ERROR-NEXT:         ldp d5, d6, [x0, #512]
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 8 in range [-512, 504]
// CHECK-ERROR-NEXT:         stp d7, d8, [x0, #-520]
// CHECK-ERROR-NEXT:                     ^

        ldp d3, q2, [sp]
        ldp q3, q5, [sp, #8]
        stp q20, q25, [x5, #1024]
        ldp q30, q15, [x23, #-1040]
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldp d3, q2, [sp]
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 16 in range [-1024, 1008]
// CHECK-ERROR-NEXT:         ldp q3, q5, [sp, #8]
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 16 in range [-1024, 1008]
// CHECK-ERROR-NEXT:         stp q20, q25, [x5, #1024]
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 16 in range [-1024, 1008]
// CHECK-ERROR-NEXT:         ldp q30, q15, [x23, #-1040]
// CHECK-ERROR-NEXT:                       ^

//------------------------------------------------------------------------------
// Load/store register pair (post-indexed)
//------------------------------------------------------------------------------

        ldp w3, w2, [x4], #1
        stp w1, w2, [x3], #253
        stp w9, w10, [x5], #256
        ldp w11, w12, [x9], #-260
        stp wsp, w9, [sp], #0
// CHECK-ERROR: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         ldp w3, w2, [x4], #1
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         stp w1, w2, [x3], #253
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         stp w9, w10, [x5], #256
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         ldp w11, w12, [x9], #-260
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         stp wsp, w9, [sp], #0
// CHECK-ERROR-NEXT:             ^

        ldpsw x9, x2, [sp], #2
        ldpsw x1, x2, [x10], #256
        ldpsw x3, x4, [x11], #-260
// CHECK-ERROR: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         ldpsw x9, x2, [sp], #2
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         ldpsw x1, x2, [x10], #256
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         ldpsw x3, x4, [x11], #-260
// CHECK-ERROR-NEXT:                       ^

        ldp x2, x5, [sp], #4
        ldp x5, x6, [x9], #512
        stp x7, x8, [x10], #-520
// CHECK-ERROR: error: {{expected integer|index must be a}} multiple of 8 in range [-512, 504]
// CHECK-ERROR-NEXT:         ldp x2, x5, [sp], #4
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 8 in range [-512, 504]
// CHECK-ERROR-NEXT:         ldp x5, x6, [x9], #512
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 8 in range [-512, 504]
// CHECK-ERROR-NEXT:         stp x7, x8, [x10], #-520
// CHECK-ERROR-NEXT:                            ^

        ldp sp, x3, [x10], #0
        stp x3, sp, [x9], #0
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldp sp, x3, [x10], #0
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         stp x3, sp, [x9], #0
// CHECK-ERROR-NEXT:                 ^

        stp s3, s5, [sp], #-2
        ldp s6, s26, [x4], #-260
        stp s13, s19, [x5], #256
// CHECK-ERROR: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         stp s3, s5, [sp], #-2
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         ldp s6, s26, [x4], #-260
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         stp s13, s19, [x5], #256
// CHECK-ERROR-NEXT:                       ^

        ldp d3, d4, [xzr], #0
        ldp d5, d6, [x0], #512
        stp d7, d8, [x0], #-520
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldp d3, d4, [xzr], #0
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 8 in range [-512, 504]
// CHECK-ERROR-NEXT:         ldp d5, d6, [x0], #512
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 8 in range [-512, 504]
// CHECK-ERROR-NEXT:         stp d7, d8, [x0], #-520
// CHECK-ERROR-NEXT:                     ^

        ldp d3, q2, [sp], #0
        ldp q3, q5, [sp], #8
        stp q20, q25, [x5], #1024
        ldp q30, q15, [x23], #-1040
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldp d3, q2, [sp], #0
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 16 in range [-1024, 1008]
// CHECK-ERROR-NEXT:         ldp q3, q5, [sp], #8
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 16 in range [-1024, 1008]
// CHECK-ERROR-NEXT:         stp q20, q25, [x5], #1024
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 16 in range [-1024, 1008]
// CHECK-ERROR-NEXT:         ldp q30, q15, [x23], #-1040
// CHECK-ERROR-NEXT:                       ^

//------------------------------------------------------------------------------
// Load/store register pair (pre-indexed)
//------------------------------------------------------------------------------

        ldp w3, w2, [x4, #1]!
        stp w1, w2, [x3, #253]!
        stp w9, w10, [x5, #256]!
        ldp w11, w12, [x9, #-260]!
        stp wsp, w9, [sp, #0]!
// CHECK-ERROR: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         ldp w3, w2, [x4, #1]!
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         stp w1, w2, [x3, #253]!
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         stp w9, w10, [x5, #256]!
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         ldp w11, w12, [x9, #-260]!
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         stp wsp, w9, [sp, #0]!
// CHECK-ERROR-NEXT:             ^

        ldpsw x9, x2, [sp, #2]!
        ldpsw x1, x2, [x10, #256]!
        ldpsw x3, x4, [x11, #-260]!
// CHECK-ERROR: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         ldpsw x9, x2, [sp, #2]!
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         ldpsw x1, x2, [x10, #256]!
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         ldpsw x3, x4, [x11, #-260]!
// CHECK-ERROR-NEXT:                       ^

        ldp x2, x5, [sp, #4]!
        ldp x5, x6, [x9, #512]!
        stp x7, x8, [x10, #-520]!
// CHECK-ERROR: error: {{expected integer|index must be a}} multiple of 8 in range [-512, 504]
// CHECK-ERROR-NEXT:         ldp x2, x5, [sp, #4]!
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 8 in range [-512, 504]
// CHECK-ERROR-NEXT:         ldp x5, x6, [x9, #512]!
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 8 in range [-512, 504]
// CHECK-ERROR-NEXT:         stp x7, x8, [x10, #-520]!
// CHECK-ERROR-NEXT:                     ^

        ldp sp, x3, [x10, #0]!
        stp x3, sp, [x9, #0]!
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldp sp, x3, [x10, #0]!
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         stp x3, sp, [x9, #0]!
// CHECK-ERROR-NEXT:                 ^

        stp s3, s5, [sp, #-2]!
        ldp s6, s26, [x4, #-260]!
        stp s13, s19, [x5, #256]!
// CHECK-ERROR: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         stp s3, s5, [sp, #-2]!
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         ldp s6, s26, [x4, #-260]!
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         stp s13, s19, [x5, #256]!
// CHECK-ERROR-NEXT:                       ^

        ldp d3, d4, [xzr, #0]!
        ldp d5, d6, [x0, #512]!
        stp d7, d8, [x0, #-520]!
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldp d3, d4, [xzr, #0]!
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 8 in range [-512, 504]
// CHECK-ERROR-NEXT:         ldp d5, d6, [x0, #512]!
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 8 in range [-512, 504]
// CHECK-ERROR-NEXT:         stp d7, d8, [x0, #-520]!
// CHECK-ERROR-NEXT:                     ^

        ldp d3, q2, [sp, #0]!
        ldp q3, q5, [sp, #8]!
        stp q20, q25, [x5, #1024]!
        ldp q30, q15, [x23, #-1040]!
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldp d3, q2, [sp, #0]!
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 16 in range [-1024, 1008]
// CHECK-ERROR-NEXT:         ldp q3, q5, [sp, #8]!
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 16 in range [-1024, 1008]
// CHECK-ERROR-NEXT:         stp q20, q25, [x5, #1024]!
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 16 in range [-1024, 1008]
// CHECK-ERROR-NEXT:         ldp q30, q15, [x23, #-1040]!
// CHECK-ERROR-NEXT:                       ^

//------------------------------------------------------------------------------
// Load/store register pair (offset)
//------------------------------------------------------------------------------
        ldnp w3, w2, [x4, #1]
        stnp w1, w2, [x3, #253]
        stnp w9, w10, [x5, #256]
        ldnp w11, w12, [x9, #-260]
        stnp wsp, w9, [sp]
// CHECK-ERROR: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         ldnp w3, w2, [x4, #1]
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         stnp w1, w2, [x3, #253]
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         stnp w9, w10, [x5, #256]
// CHECK-ERROR-NEXT:                            ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         ldnp w11, w12, [x9, #-260]
// CHECK-ERROR-NEXT:                             ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         stnp wsp, w9, [sp]
// CHECK-ERROR-NEXT:              ^

        ldnp x2, x5, [sp, #4]
        ldnp x5, x6, [x9, #512]
        stnp x7, x8, [x10, #-520]
// CHECK-ERROR: error: {{expected integer|index must be a}} multiple of 8 in range [-512, 504]
// CHECK-ERROR-NEXT:         ldnp x2, x5, [sp, #4]
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 8 in range [-512, 504]
// CHECK-ERROR-NEXT:         ldnp x5, x6, [x9, #512]
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 8 in range [-512, 504]
// CHECK-ERROR-NEXT:         stnp x7, x8, [x10, #-520]
// CHECK-ERROR-NEXT:                            ^

        ldnp sp, x3, [x10]
        stnp x3, sp, [x9]
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldnp sp, x3, [x10]
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         stnp x3, sp, [x9]
// CHECK-ERROR-NEXT:                 ^

        stnp s3, s5, [sp, #-2]
        ldnp s6, s26, [x4, #-260]
        stnp s13, s19, [x5, #256]
// CHECK-ERROR: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         stnp s3, s5, [sp, #-2]
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         ldnp s6, s26, [x4, #-260]
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 4 in range [-256, 252]
// CHECK-ERROR-NEXT:         stnp s13, s19, [x5, #256]
// CHECK-ERROR-NEXT:                       ^

        ldnp d3, d4, [xzr]
        ldnp d5, d6, [x0, #512]
        stnp d7, d8, [x0, #-520]
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldnp d3, d4, [xzr]
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 8 in range [-512, 504]
// CHECK-ERROR-NEXT:         ldnp d5, d6, [x0, #512]
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 8 in range [-512, 504]
// CHECK-ERROR-NEXT:         stnp d7, d8, [x0, #-520]
// CHECK-ERROR-NEXT:                     ^

        ldnp d3, q2, [sp]
        ldnp q3, q5, [sp, #8]
        stnp q20, q25, [x5, #1024]
        ldnp q30, q15, [x23, #-1040]
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ldnp d3, q2, [sp]
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 16 in range [-1024, 1008]
// CHECK-ERROR-NEXT:         ldnp q3, q5, [sp, #8]
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 16 in range [-1024, 1008]
// CHECK-ERROR-NEXT:         stnp q20, q25, [x5, #1024]
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: {{expected integer|index must be a}} multiple of 16 in range [-1024, 1008]
// CHECK-ERROR-NEXT:         ldnp q30, q15, [x23, #-1040]
// CHECK-ERROR-NEXT:                       ^

//------------------------------------------------------------------------------
// Logical (shifted register)
//------------------------------------------------------------------------------
        orr w0, w1, #0xffffffff
        and x3, x5, #0xffffffffffffffff
// CHECK-ERROR: error: expected compatible register or logical immediate
// CHECK-ERROR-NEXT:         orr w0, w1, #0xffffffff
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-NEXT: error: expected compatible register or logical immediate
// CHECK-ERROR-NEXT:         and x3, x5, #0xffffffffffffffff
// CHECK-ERROR-NEXT:                     ^

        ands w3, w9, #0x0
        eor x2, x0, #0x0
// CHECK-ERROR: error: expected compatible register or logical immediate
// CHECK-ERROR-NEXT:         ands w3, w9, #0x0
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: expected compatible register or logical immediate
// CHECK-ERROR-NEXT:         eor x2, x0, #0x0
// CHECK-ERROR-NEXT:                     ^

        eor w3, w5, #0x83
        eor x9, x20, #0x1234
// CHECK-ERROR: error: expected compatible register or logical immediate
// CHECK-ERROR-NEXT:         eor w3, w5, #0x83
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-NEXT: error: expected compatible register or logical immediate
// CHECK-ERROR-NEXT:         eor x9, x20, #0x1234
// CHECK-ERROR-NEXT:                      ^

        and wzr, w4, 0xffff0000
        eor xzr, x9, #0xffff0000ffff0000
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         and wzr, w4, 0xffff0000
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         eor xzr, x9, #0xffff0000ffff0000
// CHECK-ERROR-NEXT:                      ^

        orr w3, wsp, #0xf0f0f0f0
        ands x3, sp, #0xaaaaaaaaaaaaaaaa
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         orr w3, wsp, #0xf0f0f0f0
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ands x3, sp, #0xaaaaaaaaaaaaaaaa
// CHECK-ERROR-NEXT:                  ^

        tst sp, #0xe0e0e0e0e0e0e0e0
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         tst sp, #0xe0e0e0e0e0e0e0e0
// CHECK-ERROR-NEXT:             ^

        // movi has been removed from the specification. Make sure it's really gone.
        movi wzr, #0x44444444
        movi w3, #0xffff
        movi x9, #0x0000ffff00000000
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         movi wzr, #0x44444444
// CHECK-ERROR-NEXT:         ^
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         movi w3, #0xffff
// CHECK-ERROR-NEXT:         ^
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         movi x9, #0x0000ffff00000000
// CHECK-ERROR-NEXT:         ^

//------------------------------------------------------------------------------
// Logical (shifted register)
//------------------------------------------------------------------------------

        //// Out of range shifts
        and w2, w24, w6, lsl #-1
        and w4, w6, w12, lsl #32
        and x4, x6, x12, lsl #64
        and x2, x5, x11, asr
// CHECK-ERROR: error: expected integer shift amount
// CHECK-ERROR-NEXT:         and w2, w24, w6, lsl #-1
// CHECK-ERROR-NEXT:                               ^
// CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 31]
// CHECK-ERROR-NEXT:         and w4, w6, w12, lsl #32
// CHECK-ERROR-NEXT:                          ^
// CHECK-ERROR-NEXT: error: expected 'lsl', 'lsr' or 'asr' with optional integer in range [0, 63]
// CHECK-ERROR-NEXT:         and x4, x6, x12, lsl #64
// CHECK-ERROR-NEXT:                          ^
// CHECK-ERROR-NEXT: error: expected #imm after shift specifier
// CHECK-ERROR-NEXT:         and x2, x5, x11, asr
// CHECK-ERROR-NEXT:                             ^

        //// sp not allowed
        orn wsp, w3, w5
        bics x20, sp, x9, lsr #0
        orn x2, x6, sp, lsl #3
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         orn wsp, w3, w5
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         bics x20, sp, x9, lsr #0
// CHECK-ERROR-NEXT:                   ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         orn x2, x6, sp, lsl #3
// CHECK-ERROR-NEXT:                     ^

        //// Mismatched registers
        and x3, w2, w1
        ands w1, x12, w2
        and x4, x5, w6, lsl #12
        orr w2, w5, x7, asr #0
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         and x3, w2, w1
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         ands w1, x12, w2
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: expected compatible register or logical immediate
// CHECK-ERROR-NEXT:         and x4, x5, w6, lsl #12
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-NEXT: error: expected compatible register or logical immediate
// CHECK-ERROR-NEXT:         orr w2, w5, x7, asr #0
// CHECK-ERROR-NEXT:                     ^

        //// Shifts should not be allowed on mov
        mov w3, w7, lsl #13
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         mov w3, w7, lsl #13
// CHECK-ERROR-NEXT:                     ^

//------------------------------------------------------------------------------
// Move wide (immediate)
//------------------------------------------------------------------------------

        movz w3, #65536, lsl #0
        movz w4, #65536
        movn w1, #2, lsl #1
        movk w3, #0, lsl #-1
        movn w2, #-1, lsl #0
        movz x3, #-1
        movk w3, #1, lsl #32
        movn x2, #12, lsl #64
// CHECK-ERROR: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-NEXT:         movz w3, #65536, lsl #0
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-NEXT:         movz w4, #65536
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-AARCH64-NEXT: error: expected relocated symbol or integer in range [0, 65535]
// CHECK-ERROR-ARM64-NEXT: error: expected 'lsl' with optional integer 0 or 16
// CHECK-ERROR-NEXT:         movn w1, #2, lsl #1
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-AARCH64-NEXT: error: only 'lsl #+N' valid after immediate
// CHECK-ERROR-ARM64-NEXT: error: expected integer shift amount
// CHECK-ERROR-NEXT:         movk w3, #0, lsl #-1
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-NEXT:         movn w2, #-1, lsl #0
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-NEXT:         movz x3, #-1
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-AARCH64-NEXT: error: expected relocated symbol or integer in range [0, 65535]
// CHECK-ERROR-ARM64-NEXT: error: expected 'lsl' with optional integer 0 or 16
// CHECK-ERROR-NEXT:         movk w3, #1, lsl #32
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-AARCH64-NEXT: error: expected relocated symbol or integer in range [0, 65535]
// CHECK-ERROR-ARM64-NEXT: error: expected 'lsl' with optional integer 0, 16, 32 or 48
// CHECK-ERROR-NEXT:         movn x2, #12, lsl #64
// CHECK-ERROR-NEXT:                  ^

        movz x12, #:abs_g0:sym, lsl #16
        movz x12, #:abs_g0:sym, lsl #0
        movn x2, #:abs_g0:sym
        movk w3, #:abs_g0:sym
        movz x3, #:abs_g0_nc:sym
        movn x4, #:abs_g0_nc:sym
// CHECK-ERROR: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-NEXT:         movz x12, #:abs_g0:sym, lsl #16
// CHECK-ERROR-NEXT:                                 ^
// CHECK-ERROR-NEXT: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-NEXT:         movz x12, #:abs_g0:sym, lsl #0
// CHECK-ERROR-NEXT:                                 ^
// CHECK-ERROR-AARCH64-NEXT: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-AARCH64-NEXT:         movn x2, #:abs_g0:sym
// CHECK-ERROR-AARCH64-NEXT:                  ^
// CHECK-ERROR-NEXT: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-NEXT:         movk w3, #:abs_g0:sym
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-NEXT:         movz x3, #:abs_g0_nc:sym
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-NEXT:         movn x4, #:abs_g0_nc:sym
// CHECK-ERROR-NEXT:                  ^

        movn x2, #:abs_g1:sym
        movk w3, #:abs_g1:sym
        movz x3, #:abs_g1_nc:sym
        movn x4, #:abs_g1_nc:sym
// CHECK-ERROR-AARCH64: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-AARCH64-NEXT:         movn x2, #:abs_g1:sym
// CHECK-ERROR-AARCH64-NEXT:                  ^
// CHECK-ERROR-NEXT: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-NEXT:         movk w3, #:abs_g1:sym
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-NEXT:         movz x3, #:abs_g1_nc:sym
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-NEXT:         movn x4, #:abs_g1_nc:sym
// CHECK-ERROR-NEXT:                  ^

        movz w12, #:abs_g2:sym
        movn x12, #:abs_g2:sym
        movk x13, #:abs_g2:sym
        movk w3, #:abs_g2_nc:sym
        movz x13, #:abs_g2_nc:sym
        movn x24, #:abs_g2_nc:sym
// CHECK-ERROR: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-NEXT:         movz w12, #:abs_g2:sym
// CHECK-ERROR-NEXT:                   ^
// CHECK-ERROR-AARCH64-NEXT: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-AARCH64-NEXT:         movn x12, #:abs_g2:sym
// CHECK-ERROR-AARCH64-NEXT:                   ^
// CHECK-ERROR-NEXT: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-NEXT:         movk x13, #:abs_g2:sym
// CHECK-ERROR-NEXT:                   ^
// CHECK-ERROR-NEXT: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-NEXT:         movk w3, #:abs_g2_nc:sym
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-NEXT:         movz x13, #:abs_g2_nc:sym
// CHECK-ERROR-NEXT:                   ^
// CHECK-ERROR-NEXT: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-NEXT:         movn x24, #:abs_g2_nc:sym
// CHECK-ERROR-NEXT:                   ^

        movn x19, #:abs_g3:sym
        movz w20, #:abs_g3:sym
        movk w21, #:abs_g3:sym
// CHECK-ERROR-AARCH64: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-AARCH64-NEXT:         movn x19, #:abs_g3:sym
// CHECK-ERROR-AARCH64-NEXT:                   ^
// CHECK-ERROR-NEXT: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-NEXT:         movz w20, #:abs_g3:sym
// CHECK-ERROR-NEXT:                   ^
// CHECK-ERROR-NEXT: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-NEXT:         movk w21, #:abs_g3:sym
// CHECK-ERROR-NEXT:                   ^

        movk x19, #:abs_g0_s:sym
        movk w23, #:abs_g0_s:sym
// CHECK-ERROR: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-NEXT:         movk x19, #:abs_g0_s:sym
// CHECK-ERROR-NEXT:                   ^
// CHECK-ERROR-NEXT: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-NEXT:         movk w23, #:abs_g0_s:sym
// CHECK-ERROR-NEXT:                   ^

        movk x19, #:abs_g1_s:sym
        movk w23, #:abs_g1_s:sym
// CHECK-ERROR: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-NEXT:         movk x19, #:abs_g1_s:sym
// CHECK-ERROR-NEXT:                   ^
// CHECK-ERROR-NEXT: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-NEXT:         movk w23, #:abs_g1_s:sym
// CHECK-ERROR-NEXT:                   ^

        movz w2, #:abs_g2_s:sym
        movn w29, #:abs_g2_s:sym
        movk x19, #:abs_g2_s:sym
        movk w23, #:abs_g2_s:sym
// CHECK-ERROR: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-NEXT:         movz w2, #:abs_g2_s:sym
// CHECK-ERROR-NEXT:                    ^
// CHECK-ERROR-NEXT: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-NEXT:         movn w29, #:abs_g2_s:sym
// CHECK-ERROR-NEXT:                   ^
// CHECK-ERROR-NEXT: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-NEXT:         movk x19, #:abs_g2_s:sym
// CHECK-ERROR-NEXT:                   ^
// CHECK-ERROR-NEXT: error: {{expected relocated symbol or|immediate must be an}} integer in range [0, 65535]
// CHECK-ERROR-NEXT:         movk w23, #:abs_g2_s:sym
// CHECK-ERROR-NEXT:                   ^

//------------------------------------------------------------------------------
// PC-relative addressing
//------------------------------------------------------------------------------

        adr sp, loc             // expects xzr
        adrp x3, #20            // Immediate unaligned
        adrp w2, loc            // 64-bit register needed
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         adr sp, loc
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected label or encodable integer pc offset
// CHECK-ERROR-NEXT:         adrp x3, #20
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         adrp w2, loc
// CHECK-ERROR-NEXT:              ^

        adr x9, #1048576
        adr x2, #-1048577
        adrp x9, #4294967296
        adrp x20, #-4294971392
// CHECK-ERROR: error: expected label or encodable integer pc offset
// CHECK-ERROR-NEXT:         adr x9, #1048576
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: expected label or encodable integer pc offset
// CHECK-ERROR-NEXT:         adr x2, #-1048577
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: expected label or encodable integer pc offset
// CHECK-ERROR-NEXT:         adrp x9, #4294967296
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: expected label or encodable integer pc offset
// CHECK-ERROR-NEXT:         adrp x20, #-4294971392
// CHECK-ERROR-NEXT:                   ^

//------------------------------------------------------------------------------
// System
//------------------------------------------------------------------------------

        hint #-1
        hint #128
// CHECK-ERROR: error: {{expected|immediate must be an}} integer in range [0, 127]
// CHECK-ERROR-NEXT:         hint #-1
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 127]
// CHECK-ERROR-NEXT:         hint #128
// CHECK-ERROR-NEXT:              ^

        clrex #-1
        clrex #16
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 15]
// CHECK-ERROR-NEXT:         clrex #-1
// CHECK-ERROR-NEXT:               ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 15]
// CHECK-ERROR-NEXT:         clrex #16
// CHECK-ERROR-NEXT:               ^

        dsb #-1
        dsb #16
        dmb #-1
        dmb #16
// CHECK-ERROR-NEXT: error: {{Invalid immediate for instruction|barrier operand out of range}}
// CHECK-ERROR-NEXT:         dsb #-1
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: {{Invalid immediate for instruction|barrier operand out of range}}
// CHECK-ERROR-NEXT:         dsb #16
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: {{Invalid immediate for instruction|barrier operand out of range}}
// CHECK-ERROR-NEXT:         dmb #-1
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: {{Invalid immediate for instruction|barrier operand out of range}}
// CHECK-ERROR-NEXT:         dmb #16
// CHECK-ERROR-NEXT:             ^

        isb #-1
        isb #16
// CHECK-ERROR-NEXT: error: {{Invalid immediate for instruction|barrier operand out of range}}
// CHECK-ERROR-NEXT:         isb #-1
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: {{Invalid immediate for instruction|barrier operand out of range}}
// CHECK-ERROR-NEXT:         isb #16
// CHECK-ERROR-NEXT:             ^

        msr daifset, x4
        msr spsel, #-1
        msr spsel #-1
        msr daifclr, #16
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 15]
// CHECK-ERROR-NEXT:         msr daifset, x4
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 15]
// CHECK-ERROR-NEXT:         msr spsel, #-1
// CHECK-ERROR-NEXT:                    ^
// CHECK-ERROR-NEXT: error: {{expected comma before next operand|unexpected token in argument list}}
// CHECK-ERROR-NEXT:         msr spsel #-1
// CHECK-ERROR-NEXT:                   ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 15]
// CHECK-ERROR-NEXT:         msr daifclr, #16
// CHECK-ERROR-NEXT:                      ^

        sys #8, c1, c2, #7, x9
        sys #3, c16, c2, #3, x10
        sys #2, c11, c16, #5
        sys #4, c9, c8, #8, xzr
        sysl x11, #8, c1, c2, #7
        sysl x13, #3, c16, c2, #3
        sysl x9, #2, c11, c16, #5
        sysl x4, #4, c9, c8, #8
// CHECK-ERROR-NEXT: error:  {{expected|immediate must be an}} integer in range [0, 7]
// CHECK-ERROR-NEXT:         sys #8, c1, c2, #7, x9
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: Expected cN operand where 0 <= N <= 15
// CHECK-ERROR-NEXT:         sys #3, c16, c2, #3, x10
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: Expected cN operand where 0 <= N <= 15
// CHECK-ERROR-NEXT:         sys #2, c11, c16, #5
// CHECK-ERROR-NEXT:                      ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 7]
// CHECK-ERROR-NEXT:         sys #4, c9, c8, #8, xzr
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 7]
// CHECK-ERROR-NEXT:         sysl x11, #8, c1, c2, #7
// CHECK-ERROR-NEXT:                   ^
// CHECK-ERROR-NEXT: error: Expected cN operand where 0 <= N <= 15
// CHECK-ERROR-NEXT:         sysl x13, #3, c16, c2, #3
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: Expected cN operand where 0 <= N <= 15
// CHECK-ERROR-NEXT:         sysl x9, #2, c11, c16, #5
// CHECK-ERROR-NEXT:                           ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 7]
// CHECK-ERROR-NEXT:         sysl x4, #4, c9, c8, #8
// CHECK-ERROR-NEXT:                              ^

        ic ialluis, x2
        ic allu, x7
        ic ivau
// CHECK-ERROR-NEXT: error: specified {{IC|ic}} op does not use a register
// CHECK-ERROR-NEXT:         ic ialluis, x2
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-AARCH64-NEXT: error: operand specifier not recognised
// CHECK-ERROR-ARM64-NEXT: error: invalid operand for IC instruction
// CHECK-ERROR-NEXT:         ic allu, x7
// CHECK-ERROR-NEXT:            ^
// CHECK-ERROR-NEXT: error: specified {{IC|ic}} op requires a register
// CHECK-ERROR-NEXT:         ic ivau
// CHECK-ERROR-NEXT:            ^

        tlbi IPAS2E1IS
        tlbi IPAS2LE1IS
        tlbi VMALLE1IS, x12
        tlbi ALLE2IS, x11
        tlbi ALLE3IS, x20
        tlbi VAE1IS
        tlbi VAE2IS
        tlbi VAE3IS
        tlbi ASIDE1IS
        tlbi VAAE1IS
        tlbi ALLE1IS, x0
        tlbi VALE1IS
        tlbi VALE2IS
        tlbi VALE3IS
        tlbi VMALLS12E1IS, xzr
        tlbi VAALE1IS
        tlbi IPAS2E1
        tlbi IPAS2LE1
        tlbi VMALLE1, x9
        tlbi ALLE2, x10
        tlbi ALLE3, x11
        tlbi VAE1
        tlbi VAE2
        tlbi VAE3
        tlbi ASIDE1
        tlbi VAAE1
        tlbi ALLE1, x25
        tlbi VALE1
        tlbi VALE2
        tlbi VALE3
        tlbi VMALLS12E1, x15
        tlbi VAALE1
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op requires a register
// CHECK-ERROR-NEXT:         tlbi IPAS2E1IS
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op requires a register
// CHECK-ERROR-NEXT:         tlbi IPAS2LE1IS
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op does not use a register
// CHECK-ERROR-NEXT:         tlbi VMALLE1IS, x12
// CHECK-ERROR-NEXT:                         ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op does not use a register
// CHECK-ERROR-NEXT:         tlbi ALLE2IS, x11
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op does not use a register
// CHECK-ERROR-NEXT:         tlbi ALLE3IS, x20
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op requires a register
// CHECK-ERROR-NEXT:         tlbi VAE1IS
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op requires a register
// CHECK-ERROR-NEXT:         tlbi VAE2IS
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op requires a register
// CHECK-ERROR-NEXT:         tlbi VAE3IS
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op requires a register
// CHECK-ERROR-NEXT:         tlbi ASIDE1IS
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op requires a register
// CHECK-ERROR-NEXT:         tlbi VAAE1IS
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op does not use a register
// CHECK-ERROR-NEXT:         tlbi ALLE1IS, x0
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op requires a register
// CHECK-ERROR-NEXT:         tlbi VALE1IS
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op requires a register
// CHECK-ERROR-NEXT:         tlbi VALE2IS
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op requires a register
// CHECK-ERROR-NEXT:         tlbi VALE3IS
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op does not use a register
// CHECK-ERROR-NEXT:         tlbi VMALLS12E1IS, xzr
// CHECK-ERROR-NEXT:                            ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op requires a register
// CHECK-ERROR-NEXT:         tlbi VAALE1IS
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op requires a register
// CHECK-ERROR-NEXT:         tlbi IPAS2E1
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op requires a register
// CHECK-ERROR-NEXT:         tlbi IPAS2LE1
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op does not use a register
// CHECK-ERROR-NEXT:         tlbi VMALLE1, x9
// CHECK-ERROR-NEXT:                       ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op does not use a register
// CHECK-ERROR-NEXT:         tlbi ALLE2, x10
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op does not use a register
// CHECK-ERROR-NEXT:         tlbi ALLE3, x11
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op requires a register
// CHECK-ERROR-NEXT:         tlbi VAE1
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op requires a register
// CHECK-ERROR-NEXT:         tlbi VAE2
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op requires a register
// CHECK-ERROR-NEXT:         tlbi VAE3
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op requires a register
// CHECK-ERROR-NEXT:         tlbi ASIDE1
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op requires a register
// CHECK-ERROR-NEXT:         tlbi VAAE1
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op does not use a register
// CHECK-ERROR-NEXT:         tlbi ALLE1, x25
// CHECK-ERROR-NEXT:                     ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op requires a register
// CHECK-ERROR-NEXT:         tlbi VALE1
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op requires a register
// CHECK-ERROR-NEXT:         tlbi VALE2
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op requires a register
// CHECK-ERROR-NEXT:         tlbi VALE3
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op does not use a register
// CHECK-ERROR-NEXT:         tlbi VMALLS12E1, x15
// CHECK-ERROR-NEXT:                          ^
// CHECK-ERROR-NEXT: error: specified {{TLBI|tlbi}} op requires a register
// CHECK-ERROR-NEXT:         tlbi VAALE1
// CHECK-ERROR-NEXT:              ^

// For the MSR/MRS instructions, first make sure read-only and
// write-only registers actually are.
        msr MDCCSR_EL0, x12
        msr DBGDTRRX_EL0, x12
        msr MDRAR_EL1, x12
        msr OSLSR_EL1, x12
        msr DBGAUTHSTATUS_EL1, x12
        msr MIDR_EL1, x12
        msr CCSIDR_EL1, x12
        msr CLIDR_EL1, x12
        msr CTR_EL0, x12
        msr MPIDR_EL1, x12
        msr REVIDR_EL1, x12
        msr AIDR_EL1, x12
        msr DCZID_EL0, x12
        msr ID_PFR0_EL1, x12
        msr ID_PFR1_EL1, x12
        msr ID_DFR0_EL1, x12
        msr ID_AFR0_EL1, x12
        msr ID_MMFR0_EL1, x12
        msr ID_MMFR1_EL1, x12
        msr ID_MMFR2_EL1, x12
        msr ID_MMFR3_EL1, x12
        msr ID_ISAR0_EL1, x12
        msr ID_ISAR1_EL1, x12
        msr ID_ISAR2_EL1, x12
        msr ID_ISAR3_EL1, x12
        msr ID_ISAR4_EL1, x12
        msr ID_ISAR5_EL1, x12
        msr MVFR0_EL1, x12
        msr MVFR1_EL1, x12
        msr MVFR2_EL1, x12
        msr ID_AA64PFR0_EL1, x12
        msr ID_AA64PFR1_EL1, x12
        msr ID_AA64DFR0_EL1, x12
        msr ID_AA64DFR1_EL1, x12
        msr ID_AA64AFR0_EL1, x12
        msr ID_AA64AFR1_EL1, x12
        msr ID_AA64ISAR0_EL1, x12
        msr ID_AA64ISAR1_EL1, x12
        msr ID_AA64MMFR0_EL1, x12
        msr ID_AA64MMFR1_EL1, x12
        msr PMCEID0_EL0, x12
        msr PMCEID1_EL0, x12
        msr RVBAR_EL1, x12
        msr RVBAR_EL2, x12
        msr RVBAR_EL3, x12
        msr ISR_EL1, x12
        msr CNTPCT_EL0, x12
        msr CNTVCT_EL0, x12
        msr PMEVCNTR31_EL0, x12
        msr PMEVTYPER31_EL0, x12
// CHECK-ERROR: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr MDCCSR_EL0, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr DBGDTRRX_EL0, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr MDRAR_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr OSLSR_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr DBGAUTHSTATUS_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr MIDR_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr CCSIDR_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr CLIDR_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr CTR_EL0, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr MPIDR_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr REVIDR_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr AIDR_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr DCZID_EL0, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr ID_PFR0_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr ID_PFR1_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr ID_DFR0_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr ID_AFR0_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr ID_MMFR0_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr ID_MMFR1_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr ID_MMFR2_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr ID_MMFR3_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr ID_ISAR0_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr ID_ISAR1_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr ID_ISAR2_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr ID_ISAR3_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr ID_ISAR4_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr ID_ISAR5_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr MVFR0_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr MVFR1_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr MVFR2_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr ID_AA64PFR0_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr ID_AA64PFR1_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr ID_AA64DFR0_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr ID_AA64DFR1_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr ID_AA64AFR0_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr ID_AA64AFR1_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr ID_AA64ISAR0_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr ID_AA64ISAR1_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr ID_AA64MMFR0_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr ID_AA64MMFR1_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr PMCEID0_EL0, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr PMCEID1_EL0, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr RVBAR_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr RVBAR_EL2, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr RVBAR_EL3, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr ISR_EL1, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr CNTPCT_EL0, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr CNTVCT_EL0, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr PMEVCNTR31_EL0, x12
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: expected writable system register or pstate
// CHECK-ERROR-NEXT:         msr PMEVTYPER31_EL0, x12
// CHECK-ERROR-NEXT:             ^

        mrs x9, DBGDTRTX_EL0
        mrs x9, OSLAR_EL1
        mrs x9, PMSWINC_EL0
        mrs x9, PMEVCNTR31_EL0
        mrs x9, PMEVTYPER31_EL0
// CHECK-ERROR: error: expected readable system register
// CHECK-ERROR-NEXT:         mrs x9, DBGDTRTX_EL0
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: expected readable system register
// CHECK-ERROR-NEXT:         mrs x9, OSLAR_EL1
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: expected readable system register
// CHECK-ERROR-NEXT:         mrs x9, PMSWINC_EL0
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: expected readable system register
// CHECK-ERROR-NEXT:         mrs x9, PMEVCNTR31_EL0
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: expected readable system register
// CHECK-ERROR-NEXT:         mrs x9, PMEVTYPER31_EL0
// CHECK-ERROR-NEXT:                 ^

// Now check some invalid generic names
        mrs xzr, s2_5_c11_c13_2
        mrs x12, s3_8_c11_c13_2
        mrs x13, s3_3_c12_c13_2
        mrs x19, s3_2_c15_c16_2
        mrs x30, s3_2_c15_c1_8
// CHECK-ERROR-NEXT: error: expected readable system register
// CHECK-ERROR-NEXT:         mrs xzr, s2_5_c11_c13_2
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: expected readable system register
// CHECK-ERROR-NEXT:         mrs x12, s3_8_c11_c13_2
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: expected readable system register
// CHECK-ERROR-NEXT:         mrs x13, s3_3_c12_c13_2
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: expected readable system register
// CHECK-ERROR-NEXT:         mrs x19, s3_2_c15_c16_2
// CHECK-ERROR-NEXT:                  ^
// CHECK-ERROR-NEXT: error: expected readable system register
// CHECK-ERROR-NEXT:         mrs x30, s3_2_c15_c1_8
// CHECK-ERROR-NEXT:                  ^

//------------------------------------------------------------------------------
// Test and branch (immediate)
//------------------------------------------------------------------------------

        tbz w3, #-1, addr
        tbz w3, #32, nowhere
        tbz x9, #-1, there
        tbz x20, #64, dont
// CHECK-ERROR: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:     tbz w3, #-1, addr
// CHECK-ERROR-NEXT:             ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:        tbz w3, #32, nowhere
// CHECK-ERROR-NEXT:                ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 63]
// CHECK-ERROR-NEXT:        tbz x9, #-1, there
// CHECK-ERROR-NEXT:                ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 63]
// CHECK-ERROR-NEXT:        tbz x20, #64, dont
// CHECK-ERROR-NEXT:                 ^

        tbnz w3, #-1, addr
        tbnz w3, #32, nowhere
        tbnz x9, #-1, there
        tbnz x20, #64, dont
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:        tbnz w3, #-1, addr
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 31]
// CHECK-ERROR-NEXT:        tbnz w3, #32, nowhere
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 63]
// CHECK-ERROR-NEXT:        tbnz x9, #-1, there
// CHECK-ERROR-NEXT:                 ^
// CHECK-ERROR-NEXT: error: {{expected|immediate must be an}} integer in range [0, 63]
// CHECK-ERROR-NEXT:        tbnz x20, #64, dont

//------------------------------------------------------------------------------
// Unconditional branch (immediate)
//------------------------------------------------------------------------------

        b #134217728
        b #-134217732
        b #1
// CHECK-ERROR: error: expected label or encodable integer pc offset
// CHECK-ERROR-NEXT:         b #134217728
// CHECK-ERROR-NEXT:           ^
// CHECK-ERROR-NEXT: error: expected label or encodable integer pc offset
// CHECK-ERROR-NEXT:         b #-134217732
// CHECK-ERROR-NEXT:           ^
// CHECK-ERROR-NEXT: error: expected label or encodable integer pc offset
// CHECK-ERROR-NEXT:         b #1
// CHECK-ERROR-NEXT:           ^

//------------------------------------------------------------------------------
// Unconditional branch (register)
//------------------------------------------------------------------------------

        br w2
        br sp
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         br w2
// CHECK-ERROR-NEXT:            ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         br sp
// CHECK-ERROR-NEXT:            ^

        //// These ones shouldn't allow any registers
        eret x2
        drps x2
// CHECK-ERROR: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         eret x2
// CHECK-ERROR-NEXT:              ^
// CHECK-ERROR-NEXT: error: invalid operand for instruction
// CHECK-ERROR-NEXT:         drps x2
// CHECK-ERROR-NEXT:              ^