armv8.5a-mte-error.s 27.9 KB
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
// RUN: not llvm-mc -triple aarch64 -show-encoding -mattr=+mte < %s 2>&1| FileCheck %s

irg
irg x0
irg q0, x0
irg w0, x0
irg x0, q0
irg x0, w0
irg x0, x1, q0
irg x0, x1, w0
irg x0, x1, sp
irg x0, x1, #1
irg x0, #1, x1
irg #1, x0, x1
irg x0, x1, x2, x3

// CHECK: too few operands for instruction
// CHECK-NEXT: irg
// CHECK: too few operands for instruction
// CHECK-NEXT: irg x0
// CHECK: invalid operand for instruction
// CHECK-NEXT: irg q0, x0
// CHECK: invalid operand for instruction
// CHECK-NEXT: irg w0, x0
// CHECK: invalid operand for instruction
// CHECK-NEXT: irg x0, q0
// CHECK: invalid operand for instruction
// CHECK-NEXT: irg x0, w0
// CHECK: invalid operand for instruction
// CHECK-NEXT: irg x0, x1, q0
// CHECK: invalid operand for instruction
// CHECK-NEXT: irg x0, x1, w0
// CHECK: invalid operand for instruction
// CHECK-NEXT: irg x0, x1, sp
// CHECK: invalid operand for instruction
// CHECK-NEXT: irg x0, x1, #1
// CHECK: invalid operand for instruction
// CHECK-NEXT: irg x0, #1, x1
// CHECK: invalid operand for instruction
// CHECK-NEXT: irg #1, x0, x1
// CHECK: invalid operand for instruction
// CHECK-NEXT: irg x0, x1, x2, x3

addg
addg x0
addg x0, x1
addg x0, x1, #0
addg x0, x1, #1024, #0
addg x0, x1, #8, #0
addg x0, x1, #-16, #0
addg x0, x1, #0, #16
addg q0, x1, #0, #0
addg w0, x1, #0, #0
addg x0, q1, #0, #0
addg x0, w1, #0, #0
addg #0, x1, #0, #0
addg x0, #0, #0, #0
addg x0, x1, x0, #0
addg x0, x1, #0, x0
addg x0, x1, #16, #2, #99

subg
subg x0
subg x0, x1
subg x0, x1, #0
subg x0, x1, #1024, #0
subg x0, x1, #8, #0
subg x0, x1, #-16, #0
subg x0, x1, #0, #16
subg q0, x1, #0, #0
subg w0, x1, #0, #0
subg x0, q1, #0, #0
subg x0, w1, #0, #0
subg #0, x1, #0, #0
subg x0, #0, #0, #0
subg x0, x1, x0, #0
subg x0, x1, #0, x0
subg x0, x1, #16, #2, #99

// CHECK: too few operands for instruction
// CHECK-NEXT: addg
// CHECK: too few operands for instruction
// CHECK-NEXT: addg x0
// CHECK: too few operands for instruction
// CHECK-NEXT: addg x0, x1
// CHECK: too few operands for instruction
// CHECK-NEXT: addg x0, x1, #0
// CHECK: index must be a multiple of 16 in range [0, 1008]
// CHECK-NEXT: addg x0, x1, #1024, #0
// CHECK: index must be a multiple of 16 in range [0, 1008]
// CHECK-NEXT: addg x0, x1, #8, #0
// CHECK: index must be a multiple of 16 in range [0, 1008]
// CHECK-NEXT: addg x0, x1, #-16, #0
// CHECK: immediate must be an integer in range [0, 15]
// CHECK-NEXT: addg x0, x1, #0, #16
// CHECK: invalid operand for instruction
// CHECK-NEXT: addg q0, x1, #0, #0
// CHECK: invalid operand for instruction
// CHECK-NEXT: addg w0, x1, #0, #0
// CHECK: invalid operand for instruction
// CHECK-NEXT: addg x0, q1, #0, #0
// CHECK: invalid operand for instruction
// CHECK-NEXT: addg x0, w1, #0, #0
// CHECK: invalid operand for instruction
// CHECK-NEXT: addg #0, x1, #0, #0
// CHECK: invalid operand for instruction
// CHECK-NEXT: addg x0, #0, #0, #0
// CHECK: invalid operand for instruction
// CHECK-NEXT: addg x0, x1, x0, #0
// CHECK: immediate must be an integer in range [0, 15]
// CHECK-NEXT: addg x0, x1, #0, x0
// CHECK: invalid operand for instruction
// CHECK-NEXT: addg x0, x1, #16, #2, #99

// CHECK: too few operands for instruction
// CHECK-NEXT: subg
// CHECK: too few operands for instruction
// CHECK-NEXT: subg x0
// CHECK: too few operands for instruction
// CHECK-NEXT: subg x0, x1
// CHECK: too few operands for instruction
// CHECK-NEXT: subg x0, x1, #0
// CHECK: index must be a multiple of 16 in range [0, 1008]
// CHECK-NEXT: subg x0, x1, #1024, #0
// CHECK: index must be a multiple of 16 in range [0, 1008]
// CHECK-NEXT: subg x0, x1, #8, #0
// CHECK: index must be a multiple of 16 in range [0, 1008]
// CHECK-NEXT: subg x0, x1, #-16, #0
// CHECK: immediate must be an integer in range [0, 15]
// CHECK-NEXT: subg x0, x1, #0, #16
// CHECK: invalid operand for instruction
// CHECK-NEXT: subg q0, x1, #0, #0
// CHECK: invalid operand for instruction
// CHECK-NEXT: subg w0, x1, #0, #0
// CHECK: invalid operand for instruction
// CHECK-NEXT: subg x0, q1, #0, #0
// CHECK: invalid operand for instruction
// CHECK-NEXT: subg x0, w1, #0, #0
// CHECK: invalid operand for instruction
// CHECK-NEXT: subg #0, x1, #0, #0
// CHECK: invalid operand for instruction
// CHECK-NEXT: subg x0, #0, #0, #0
// CHECK: invalid operand for instruction
// CHECK-NEXT: subg x0, x1, x0, #0
// CHECK: immediate must be an integer in range [0, 15]
// CHECK-NEXT: subg x0, x1, #0, x0
// CHECK: invalid operand for instruction
// CHECK-NEXT: subg x0, x1, #16, #2, #99

gmi
gmi x0
gmi x0, x1
gmi sp, x0, x1
gmi x0, x1, sp
gmi x0, x1, x2, #1
gmi w0, x1, x2
gmi x0, w1, x2
gmi x0, x1, w2
gmi #1, x1, x2
gmi x0, #1, x2
gmi x0, x1, #1

// CHECK: too few operands for instruction
// CHECK-NEXT: gmi
// CHECK: too few operands for instruction
// CHECK-NEXT: gmi x0
// CHECK: too few operands for instruction
// CHECK-NEXT: gmi x0, x1
// CHECK: invalid operand for instruction
// CHECK-NEXT: gmi sp, x0, x1
// CHECK: invalid operand for instruction
// CHECK-NEXT: gmi x0, x1, sp
// CHECK: invalid operand for instruction
// CHECK-NEXT: gmi x0, x1, x2, #1
// CHECK: invalid operand for instruction
// CHECK-NEXT: gmi w0, x1, x2
// CHECK: invalid operand for instruction
// CHECK-NEXT: gmi x0, w1, x2
// CHECK: invalid operand for instruction
// CHECK-NEXT: gmi x0, x1, w2
// CHECK: invalid operand for instruction
// CHECK-NEXT: gmi #1, x1, x2
// CHECK: invalid operand for instruction
// CHECK-NEXT: gmi x0, #1, x2
// CHECK: invalid operand for instruction
// CHECK-NEXT: gmi x0, x1, #1
stg
stg x0
stg w0
stg sp
stg #1
stg x0, [x0, #-4112]
stg x0, [x0, #4096]
stg x0, [x0, #8]
stg x0, [x0, x1]
stg x0, [w0]
stg x0, [xzr]
stg x0, [#1]

// CHECK: too few operands for instruction
// CHECK-NEXT: stg
// CHECK: too few operands for instruction
// CHECK-NEXT: stg x0
// CHECK: invalid operand for instruction
// CHECK-NEXT: stg w0
// CHECK: too few operands for instruction
// CHECK-NEXT: stg sp
// CHECK: invalid operand for instruction
// CHECK-NEXT: stg #1
// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #-4112
// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #4096
// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #8
// CHECK: invalid operand for instruction
// CHECK-NEXT: stg x0, [x0, x1]
// CHECK: invalid operand for instruction
// CHECK-NEXT: stg x0, [w0]
// CHECK: invalid operand for instruction
// CHECK-NEXT: stg x0, [xzr]
// CHECK: invalid operand for instruction
// CHECK-NEXT: stg x0, [#1]

stzg
stzg x0
stzg w0
stzg sp
stzg #1
stzg x0, [x0, #-4112]
stzg x0, [x0, #4096]
stzg x0, [x0, #8]
stzg x0, [x0, x1]
stzg x0, [w0]
stzg x0, [xzr]
stzg x0, [#1]

// CHECK: too few operands for instruction
// CHECK-NEXT: stzg
// CHECK: too few operands for instruction
// CHECK-NEXT: stzg x0
// CHECK: invalid operand for instruction
// CHECK-NEXT: stzg w0
// CHECK: too few operands for instruction
// CHECK-NEXT: stzg sp
// CHECK: invalid operand for instruction
// CHECK-NEXT: stzg #1
// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #-4112
// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #4096
// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #8
// CHECK: invalid operand for instruction
// CHECK-NEXT: stzg x0, [x0, x1]
// CHECK: invalid operand for instruction
// CHECK-NEXT: stzg x0, [w0]
// CHECK: invalid operand for instruction
// CHECK-NEXT: stzg x0, [xzr]
// CHECK: invalid operand for instruction
// CHECK-NEXT: stzg x0, [#1]

stg x0, [x0, #-4112]!
stg x0, [x0, #4096]!
stg x0, [x0, #8]!
stg x0, [x0, x1]!
stg x0, [w0]!
stg x0, [xzr]!
stg x0, [#1]!

// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #-4112
// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #4096
// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #8
// CHECK: invalid operand for instruction
// CHECK-NEXT: stg x0, [x0, x1]!
// CHECK: invalid operand for instruction
// CHECK-NEXT: stg x0, [w0]!
// CHECK: invalid operand for instruction
// CHECK-NEXT: stg x0, [xzr]!
// CHECK: invalid operand for instruction
// CHECK-NEXT: stg x0, [#1]!

stzg x0, [x0, #-4112]!
stzg x0, [x0, #4096]!
stzg x0, [x0, #8]!
stzg x0, [x0, x1]!
stzg x0, [w0]!
stzg x0, [xzr]!
stzg x0, [#1]!

// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #-4112
// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #4096
// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #8
// CHECK: invalid operand for instruction
// CHECK-NEXT: stzg x0, [x0, x1]!
// CHECK: invalid operand for instruction
// CHECK-NEXT: stzg x0, [w0]!
// CHECK: invalid operand for instruction
// CHECK-NEXT: stzg x0, [xzr]!
// CHECK: invalid operand for instruction
// CHECK-NEXT: stzg x0, [#1]!

stg x0, [x0], #-4112
stg x0, [x0], #4096
stg x0, [x0], #8
stg x0, [x0], x1
stg x0, [w0], #255
stg x0, [xzr], #255
stg x0, [#1], #255

// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #-4112
// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #4096
// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #8
// CHECK: invalid operand for instruction
// CHECK-NEXT: stg x0, [x0], x1
// CHECK: invalid operand for instruction
// CHECK-NEXT: stg x0, [w0], #255
// CHECK: invalid operand for instruction
// CHECK-NEXT: stg x0, [xzr], #255
// CHECK: invalid operand for instruction
// CHECK-NEXT: stg x0, [#1], #255

stzg x0, [x0], #-4112
stzg x0, [x0], #4096
stzg x0, [x0], #8
stzg x0, [x0], x1
stzg x0, [w0], #255
stzg x0, [xzr], #255
stzg x0, [#1], #255

// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #-4112
// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #4096
// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #8
// CHECK: invalid operand for instruction
// CHECK-NEXT: stzg x0, [x0], x1
// CHECK: invalid operand for instruction
// CHECK-NEXT: stzg x0, [w0], #255
// CHECK: invalid operand for instruction
// CHECK-NEXT: stzg x0, [xzr], #255
// CHECK: invalid operand for instruction
// CHECK-NEXT: stzg x0, [#1], #255

st2g
st2g x0
st2g w0
st2g sp
st2g #1
st2g x0, [x0, #-4112]
st2g x0, [x0, #4096]
st2g x0, [x0, #8]
st2g x0, [x0, x1]
st2g x0, [w0]
st2g x0, [xzr]
st2g x0, [#1]

// CHECK: too few operands for instruction
// CHECK-NEXT: st2g
// CHECK: too few operands for instruction
// CHECK-NEXT: st2g x0
// CHECK: invalid operand for instruction
// CHECK-NEXT: st2g w0
// CHECK: too few operands for instruction
// CHECK-NEXT: st2g sp
// CHECK: invalid operand for instruction
// CHECK-NEXT: st2g #1
// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #-4112
// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #4096
// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #8
// CHECK: invalid operand for instruction
// CHECK-NEXT: st2g x0, [x0, x1]
// CHECK: invalid operand for instruction
// CHECK-NEXT: st2g x0, [w0]
// CHECK: invalid operand for instruction
// CHECK-NEXT: st2g x0, [xzr]
// CHECK: invalid operand for instruction
// CHECK-NEXT: st2g x0, [#1]

stz2g
stz2g x0
stz2g w0
stz2g sp
stz2g #1
stz2g x0, [x0, #-4112]
stz2g x0, [x0, #4096]
stz2g x0, [x0, #8]
stz2g x0, [x0, x1]
stz2g x0, [w0]
stz2g x0, [xzr]
stz2g x0, [#1]

// CHECK: too few operands for instruction
// CHECK-NEXT: stz2g
// CHECK: too few operands for instruction
// CHECK-NEXT: stz2g x0
// CHECK: invalid operand for instruction
// CHECK-NEXT: stz2g w0
// CHECK: too few operands for instruction
// CHECK-NEXT: stz2g sp
// CHECK: invalid operand for instruction
// CHECK-NEXT: stz2g #1
// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #-4112
// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #4096
// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #8
// CHECK: invalid operand for instruction
// CHECK-NEXT: stz2g x0, [x0, x1]
// CHECK: invalid operand for instruction
// CHECK-NEXT: stz2g x0, [w0]
// CHECK: invalid operand for instruction
// CHECK-NEXT: stz2g x0, [xzr]
// CHECK: invalid operand for instruction
// CHECK-NEXT: stz2g x0, [#1]

st2g x0, [x0, #-4112]!
st2g x0, [x0, #4096]!
st2g x0, [x0, #8]!
st2g x0, [x0, x1]!
st2g x0, [w0, #256]!
st2g x0, [xzr, #256]!
st2g x0, [#1, #256]!

// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #-4112
// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #4096
// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #8
// CHECK: invalid operand for instruction
// CHECK-NEXT: st2g x0, [x0, x1]!
// CHECK: invalid operand for instruction
// CHECK-NEXT: st2g x0, [w0, #256]!
// CHECK: invalid operand for instruction
// CHECK-NEXT: st2g x0, [xzr, #256]!
// CHECK: invalid operand for instruction
// CHECK-NEXT: st2g x0, [#1, #256]!

stz2g x0, [x0, #-4112]!
stz2g x0, [x0, #4096]!
stz2g x0, [x0, #8]!
stz2g x0, [x0, x1]!
stz2g x0, [w0, #255]!
stz2g x0, [xzr, #255]!
stz2g x0, [#1, #255]!

// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #-4112
// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #4096
// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #8
// CHECK: invalid operand for instruction
// CHECK-NEXT: stz2g x0, [x0, x1]!
// CHECK: invalid operand for instruction
// CHECK-NEXT: stz2g x0, [w0, #255]!
// CHECK: invalid operand for instruction
// CHECK-NEXT: stz2g x0, [xzr, #255]!
// CHECK: invalid operand for instruction
// CHECK-NEXT: stz2g x0, [#1, #255]!

st2g x0, [x0], #-4112
st2g x0, [x0], #4096
st2g x0, [x0], #8
st2g x0, [x0], x1
st2g x0, [w0], #255
st2g x0, [xzr], #255
st2g x0, [#1], #255

// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #-4112
// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #4096
// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #8
// CHECK: invalid operand for instruction
// CHECK-NEXT: st2g x0, [x0], x1
// CHECK: invalid operand for instruction
// CHECK-NEXT: st2g x0, [w0], #255
// CHECK: invalid operand for instruction
// CHECK-NEXT: st2g x0, [xzr], #255
// CHECK: invalid operand for instruction
// CHECK-NEXT: st2g x0, [#1], #255

stz2g x0, [x0], #-4112
stz2g x0, [x0], #4096
stz2g x0, [x0], #8
stz2g x0, [x0], x1
stz2g x0, [w0], #255
stz2g x0, [xzr], #255
stz2g x0, [#1], #255

// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #-4112
// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #4096
// CHECK: index must be a multiple of 16 in range [-4096, 4080]
// CHECK-NEXT: #8
// CHECK: invalid operand for instruction
// CHECK-NEXT: stz2g x0, [x0], x1
// CHECK: invalid operand for instruction
// CHECK-NEXT: stz2g x0, [w0], #255
// CHECK: invalid operand for instruction
// CHECK-NEXT: stz2g x0, [xzr], #255
// CHECK: invalid operand for instruction
// CHECK-NEXT: stz2g x0, [#1], #255

stgp sp, x1, [x2, #16]
stgp x0, sp, [x2, #16]
stgp x0, x1, [xzr, #16]
stgp x0, x1, [x2, #-1040]
stgp x0, x1, [x2, #1024]
stgp x0, x1, [x2, #8]
stgp x0, x1, [x2, x3]
stgp w0, x1, [x2, #1]
stgp x0, w1, [x2, #1]
stgp x0, x1, [w2, #1]
stgp #1, x1, [x3, #1]
stgp x0, #1, [x3, #1]
stgp x0, x1, [#1, #1]

// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp sp
// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp x0, sp
// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp x0, x1, [xzr
// CHECK: index must be a multiple of 16 in range [-1024, 1008]
// CHECK-NEXT: #-1040
// CHECK: index must be a multiple of 16 in range [-1024, 1008]
// CHECK-NEXT: #1024
// CHECK: index must be a multiple of 16 in range [-1024, 1008]
// CHECK-NEXT: #8
// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp x0, x1, [x2, x3]
// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp w0, x1, [x2, #1]
// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp x0, w1, [x2, #1]
// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp x0, x1, [w2, #1]
// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp #1, x1, [x3, #1]
// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp x0, #1, [x3, #1]
// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp x0, x1, [#1, #1]

stgp sp, x1, [x2, #16]!
stgp x0, sp, [x2, #16]!
stgp x0, x1, [xzr, #16]!
stgp x0, x1, [x2, #-1040]!
stgp x0, x1, [x2, #1024]!
stgp x0, x1, [x2, #8]!
stgp x0, x1, [x2, x3]!
stgp w0, x1, [x2, #1]!
stgp x0, w1, [x2, #1]!
stgp x0, x1, [w2, #1]!
stgp #1, x1, [x3, #1]!
stgp x0, #1, [x3, #1]!
stgp x0, x1, [#1, #1]!

// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp sp
// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp x0, sp
// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp x0, x1, [xzr
// CHECK: index must be a multiple of 16 in range [-1024, 1008]
// CHECK-NEXT: #-1040
// CHECK: index must be a multiple of 16 in range [-1024, 1008]
// CHECK-NEXT: #1024
// CHECK: index must be a multiple of 16 in range [-1024, 1008]
// CHECK-NEXT: #8
// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp x0, x1, [x2, x3]!
// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp w0, x1, [x2, #1]!
// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp x0, w1, [x2, #1]!
// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp x0, x1, [w2, #1]!
// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp #1, x1, [x3, #1]!
// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp x0, #1, [x3, #1]!
// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp x0, x1, [#1, #1]!

stgp sp, x1, [x2], #16
stgp x0, sp, [x2], #16
stgp x0, x1, [xzr], #16
stgp x0, x1, [x2], #-1040
stgp x0, x1, [x2], #1024
stgp x0, x1, [x2], #8
stgp x0, x1, [x2], x3
stgp w0, x1, [x2], #1
stgp x0, w1, [x2], #1
stgp x0, x1, [w2], #1
stgp #1, x1, [x2], #1
stgp x0, #1, [x2], #1
stgp x0, x1, [#1], #1

// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp sp
// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp x0, sp
// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp x0, x1, [xzr
// CHECK: index must be a multiple of 16 in range [-1024, 1008]
// CHECK-NEXT: #-1040
// CHECK: index must be a multiple of 16 in range [-1024, 1008]
// CHECK-NEXT: #1024
// CHECK: index must be a multiple of 16 in range [-1024, 1008]
// CHECK-NEXT: #8
// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp x0, x1, [x2], x3
// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp w0, x1, [x2], #1
// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp x0, w1, [x2], #1
// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp x0, x1, [w2], #1
// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp #1, x1, [x2], #1
// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp x0, #1, [x2], #1
// CHECK: invalid operand for instruction
// CHECK-NEXT: stgp x0, x1, [#1], #1

mrs tco
mrs gcr_el1
mrs rgsr_el1
mrs tfsr_el1
mrs tfsr_el2
mrs tfsr_el3
mrs tfsr_el12
mrs tfsre0_el1
mrs gmid_el1

// CHECK:      invalid operand for instruction
// CHECK-NEXT: tco
// CHECK:      invalid operand for instruction
// CHECK-NEXT: gcr_el1
// CHECK:      invalid operand for instruction
// CHECK-NEXT: rgsr_el1
// CHECK:      invalid operand for instruction
// CHECK-NEXT: tfsr_el1
// CHECK:      invalid operand for instruction
// CHECK-NEXT: tfsr_el2
// CHECK:      invalid operand for instruction
// CHECK-NEXT: tfsr_el3
// CHECK:      invalid operand for instruction
// CHECK-NEXT: tfsr_el12
// CHECK:      invalid operand for instruction
// CHECK-NEXT: tfsre0_el1
// CHECK:      invalid operand for instruction
// CHECK-NEXT: gmid_el1

mrs tco, #0
mrs tco, x0
mrs gcr_el1, x1
mrs rgsr_el1, x2
mrs tfsr_el1, x3
mrs tfsr_el2, x4
mrs tfsr_el3, x5
mrs tfsr_el12, x6
mrs tfsre0_el1, x7
mrs gmid_el1, x7

// CHECK:      invalid operand for instruction
// CHECK-NEXT: tco, #0
// CHECK:      invalid operand for instruction
// CHECK-NEXT: tco, x0
// CHECK:      invalid operand for instruction
// CHECK-NEXT: gcr_el1
// CHECK:      invalid operand for instruction
// CHECK-NEXT: rgsr_el1
// CHECK:      invalid operand for instruction
// CHECK-NEXT: tfsr_el1
// CHECK:      invalid operand for instruction
// CHECK-NEXT: tfsr_el2
// CHECK:      invalid operand for instruction
// CHECK-NEXT: tfsr_el3
// CHECK:      invalid operand for instruction
// CHECK-NEXT: tfsr_el12
// CHECK:      invalid operand for instruction
// CHECK-NEXT: tfsre0_el1
// CHECK:      invalid operand for instruction
// CHECK-NEXT: gmid_el1

msr tco
msr gcr_el1
msr rgsr_el1
msr tfsr_el1
msr tfsr_el2
msr tfsr_el3
msr tfsr_el12
msr tfsre0_el1
msr gmid_el1

// CHECK:      too few operands for instruction
// CHECK-NEXT: tco
// CHECK:      too few operands for instruction
// CHECK-NEXT: gcr_el1
// CHECK:      too few operands for instruction
// CHECK-NEXT: rgsr_el1
// CHECK:      too few operands for instruction
// CHECK-NEXT: tfsr_el1
// CHECK:      too few operands for instruction
// CHECK-NEXT: tfsr_el2
// CHECK:      too few operands for instruction
// CHECK-NEXT: tfsr_el3
// CHECK:      too few operands for instruction
// CHECK-NEXT: tfsr_el12
// CHECK:      too few operands for instruction
// CHECK-NEXT: tfsre0_el1
// CHECK:      expected writable system register or pstate
// CHECK-NEXT: gmid_el1

msr x0, tco
msr x1, gcr_el1
msr x2, rgsr_el1
msr x3, tfsr_el1
msr x4, tfsr_el2
msr x5, tfsr_el3
msr x6, tfsr_el12
msr x7, tfsre0_el1
msr x7, gmid_el1

// CHECK:      expected writable system register or pstate
// CHECK-NEXT: tco
// CHECK:      expected writable system register or pstate
// CHECK-NEXT: gcr_el1
// CHECK:      expected writable system register or pstate
// CHECK-NEXT: rgsr_el1
// CHECK:      expected writable system register or pstate
// CHECK-NEXT: tfsr_el1
// CHECK:      expected writable system register or pstate
// CHECK-NEXT: tfsr_el2
// CHECK:      expected writable system register or pstate
// CHECK-NEXT: tfsr_el3
// CHECK:      expected writable system register or pstate
// CHECK-NEXT: tfsr_el12
// CHECK:      expected writable system register or pstate
// CHECK-NEXT: tfsre0_el1
// CHECK:      expected writable system register or pstate
// CHECK-NEXT: gmid_el1

msr gmid_el1, x7

// CHECK:      expected writable system register or pstate
// CHECK-NEXT: gmid_el1

// Among the system registers added by MTE, only TCO can be used with MSR (imm).
// The rest can only be used with MSR (reg).
msr gcr_el1, #1
msr rgsr_el1, #2
msr tfsr_el1, #3
msr tfsr_el2, #4
msr tfsr_el3, #5
msr tfsr_el12, #6
msr tfsre0_el1, #7
// Is read only
msr gmid_el1, #7

// CHECK:      invalid operand for instruction
// CHECK-NEXT: gcr_el1
// CHECK:      invalid operand for instruction
// CHECK-NEXT: rgsr_el1
// CHECK:      invalid operand for instruction
// CHECK-NEXT: tfsr_el1
// CHECK:      invalid operand for instruction
// CHECK-NEXT: tfsr_el2
// CHECK:      invalid operand for instruction
// CHECK-NEXT: tfsr_el3
// CHECK:      invalid operand for instruction
// CHECK-NEXT: tfsr_el12
// CHECK:      invalid operand for instruction
// CHECK-NEXT: tfsre0_el1
// CHECK:      expected writable system register or pstate
// CHECK-NEXT: gmid_el1

// Xd cannot be the stack pointer, the rest can
subps sp, x0, x1
subp  sp, x2, x3
subp  w0, x1, x2
subp  x0, w1, x2
subp  x0, x1, w2
subps w0, x1, x2
subps x0, w1, x2
subps x0, x1, w2
subp  #1, x1, x2
subp  x0, #1, x2
subp  x0, x1, #1
subps #1, x1, x2
subps x0, #1, x2
subps x0, x1, #1

// CHECK:      invalid operand for instruction
// CHECK-NEXT: sp
// CHECK:      invalid operand for instruction
// CHECK-NEXT: sp
// CHECK:      invalid operand for instruction
// CHECK-NEXT: subp  w0, x1, x2
// CHECK:      invalid operand for instruction
// CHECK-NEXT: subp  x0, w1, x2
// CHECK:      invalid operand for instruction
// CHECK-NEXT: subp  x0, x1, w2
// CHECK:      invalid operand for instruction
// CHECK-NEXT: subps w0, x1, x2
// CHECK:      invalid operand for instruction
// CHECK-NEXT: subps x0, w1, x2
// CHECK:      invalid operand for instruction
// CHECK-NEXT: subps x0, x1, w2
// CHECK: invalid operand for instruction
// CHECK-NEXT: subp  #1, x1, x2
// CHECK: invalid operand for instruction
// CHECK-NEXT: subp  x0, #1, x2
// CHECK: invalid operand for instruction
// CHECK-NEXT: subp  x0, x1, #1
// CHECK: invalid operand for instruction
// CHECK-NEXT: subps #1, x1, x2
// CHECK: invalid operand for instruction
// CHECK-NEXT: subps x0, #1, x2
// CHECK: invalid operand for instruction
// CHECK-NEXT: subps x0, x1, #1

subps x0, x1, x2, x3
subp  x0, x1, x2, x3

// CHECK: invalid operand for instruction
// CHECK-NEXT: subps x0, x1, x2, x3
// CHECK: invalid operand for instruction
// CHECK-NEXT: subp x0, x1, x2, x3

subps
subp
cmpp
subps x0
subp  x0
cmpp  x0
subps x0, x1
subp  x0, x1

// CHECK:      too few operands for instruction
// CHECK-NEXT: subps
// CHECK:      too few operands for instruction
// CHECK-NEXT: subp
// CHECK:      too few operands for instruction
// CHECK-NEXT: cmpp
// CHECK:      too few operands for instruction
// CHECK-NEXT: subps x0
// CHECK:      too few operands for instruction
// CHECK-NEXT: subp x0
// CHECK:      too few operands for instruction
// CHECK-NEXT: cmpp x0
// CHECK:      too few operands for instruction
// CHECK-NEXT: subps x0, x1
// CHECK:      too few operands for instruction
// CHECK-NEXT: subp x0, x1

ldg sp, [x0, #0]
ldg x0, [x0, x0]
ldg x0, [x0, #4096]
ldg x0, [x0, #-4112]
ldg #1, [x0, #255]
ldg x0, [#1, #255]

// CHECK:      invalid operand for instruction
// CHECK-NEXT: ldg sp, [x0, #0]
// CHECK:      invalid operand for instruction
// CHECK-NEXT: ldg x0, [x0, x0]
// CHECK:      index must be a multiple of 16 in range [-4096, 4080].
// CHECK-NEXT: ldg x0, [x0, #4096]
// CHECK:      index must be a multiple of 16 in range [-4096, 4080].
// CHECK-NEXT: ldg x0, [x0, #-4112]
// CHECK:      invalid operand for instruction
// CHECK-NEXT: ldg #1, [x0, #255]
// CHECK:      invalid operand for instruction
// CHECK-NEXT: ldg x0, [#1, #255]

ldg
ldg x0
ldg x0, [#0]
ldg w0, [x1]
ldg x0, [w1]

// CHECK:      too few operands for instruction
// CHECK-NEXT: ldg
// CHECK:      too few operands for instruction
// CHECK-NEXT: ldg x0
// CHECK:      invalid operand for instruction
// CHECK-NEXT: ldg x0, [#0]
// CHECK:      invalid operand for instruction
// CHECK-NEXT: ldg w0, [x1]
// CHECK:      invalid operand for instruction
// CHECK-NEXT: ldg x0, [w1]

ldgm
ldgm x0
ldgm w0, [x1]
ldgm x0, [w1]
ldgm #1, [x1]
ldgm x0, [#1]
ldgm sp, [x0]

// CHECK:      too few operands for instruction
// CHECK-NEXT: ldgm
// CHECK:      too few operands for instruction
// CHECK-NEXT: ldgm x0
// CHECK:      invalid operand for instruction
// CHECK-NEXT: ldgm w0, [x1]
// CHECK:      invalid operand for instruction
// CHECK-NEXT: ldgm x0, [w1]
// CHECK:      invalid operand for instruction
// CHECK-NEXT: ldgm #1, [x1]
// CHECK:      invalid operand for instruction
// CHECK-NEXT: ldgm x0, [#1]
// CHECK:      invalid operand for instruction
// CHECK-NEXT: ldgm sp, [x0]

stgm
stgm x0
stgm sp, [x0]
stgm w0, [x0]
stgm x0, [w0]
stgm #1, [x1]
stgm x0, [#1]

// CHECK:      too few operands for instruction
// CHECK-NEXT: stgm
// CHECK:      too few operands for instruction
// CHECK-NEXT: stgm x0
// CHECK:      invalid operand for instruction
// CHECK-NEXT: stgm sp, [x0]
// CHECK:      invalid operand for instruction
// CHECK-NEXT: stgm w0, [x0]
// CHECK:      invalid operand for instruction
// CHECK-NEXT: stgm x0, [w0]
// CHECK:      invalid operand for instruction
// CHECK-NEXT: stgm #1, [x1]
// CHECK:      invalid operand for instruction
// CHECK-NEXT: stgm x0, [#1]

stzgm
stzgm x0
stzgm sp, [x0]
stzgm w0, [x0]
stzgm x0, [w0]
stzgm #1, [x1]
stzgm x0, [#1]

// CHECK:      too few operands for instruction
// CHECK-NEXT: stzgm
// CHECK:      too few operands for instruction
// CHECK-NEXT: stzgm x0
// CHECK:      invalid operand for instruction
// CHECK-NEXT: stzgm sp, [x0]
// CHECK:      invalid operand for instruction
// CHECK-NEXT: stzgm w0, [x0]
// CHECK:      invalid operand for instruction
// CHECK-NEXT: stzgm x0, [w0]
// CHECK:      invalid operand for instruction
// CHECK-NEXT: stzgm #1, [x1]
// CHECK:      invalid operand for instruction
// CHECK-NEXT: stzgm x0, [#1]