comparison lib/Target/SystemZ/SystemZInstrFormats.td @ 121:803732b1fca8

LLVM 5.0
author kono
date Fri, 27 Oct 2017 17:07:41 +0900
parents 1172e4bd9c6f
children 3a76565eade5
comparison
equal deleted inserted replaced
120:1172e4bd9c6f 121:803732b1fca8
175 175
176 let Inst{15-8} = op; 176 let Inst{15-8} = op;
177 let Inst{7-0} = I1; 177 let Inst{7-0} = I1;
178 } 178 }
179 179
180 class InstIE<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern>
181 : InstSystemZ<4, outs, ins, asmstr, pattern> {
182 field bits<32> Inst;
183 field bits<32> SoftFail = 0;
184
185 bits<4> I1;
186 bits<4> I2;
187
188 let Inst{31-16} = op;
189 let Inst{15-8} = 0;
190 let Inst{7-4} = I1;
191 let Inst{3-0} = I2;
192 }
193
194 class InstMII<bits<8> op, dag outs, dag ins, string asmstr, list<dag> pattern>
195 : InstSystemZ<6, outs, ins, asmstr, pattern> {
196 field bits<48> Inst;
197 field bits<48> SoftFail = 0;
198
199 bits<4> M1;
200 bits<12> RI2;
201 bits<24> RI3;
202
203 let Inst{47-40} = op;
204 let Inst{39-36} = M1;
205 let Inst{35-24} = RI2;
206 let Inst{23-0} = RI3;
207 }
208
180 class InstRIa<bits<12> op, dag outs, dag ins, string asmstr, list<dag> pattern> 209 class InstRIa<bits<12> op, dag outs, dag ins, string asmstr, list<dag> pattern>
181 : InstSystemZ<4, outs, ins, asmstr, pattern> { 210 : InstSystemZ<4, outs, ins, asmstr, pattern> {
182 field bits<32> Inst; 211 field bits<32> Inst;
183 field bits<32> SoftFail = 0; 212 field bits<32> SoftFail = 0;
184 213
289 let Inst{31-16} = I2; 318 let Inst{31-16} = I2;
290 let Inst{15-8} = 0; 319 let Inst{15-8} = 0;
291 let Inst{7-0} = op{7-0}; 320 let Inst{7-0} = op{7-0};
292 } 321 }
293 322
323 class InstRIEe<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern>
324 : InstSystemZ<6, outs, ins, asmstr, pattern> {
325 field bits<48> Inst;
326 field bits<48> SoftFail = 0;
327
328 bits<4> R1;
329 bits<4> R3;
330 bits<16> RI2;
331
332 let Inst{47-40} = op{15-8};
333 let Inst{39-36} = R1;
334 let Inst{35-32} = R3;
335 let Inst{31-16} = RI2;
336 let Inst{15-8} = 0;
337 let Inst{7-0} = op{7-0};
338 }
339
294 class InstRIEf<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern> 340 class InstRIEf<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern>
295 : InstSystemZ<6, outs, ins, asmstr, pattern> { 341 : InstSystemZ<6, outs, ins, asmstr, pattern> {
296 field bits<48> Inst; 342 field bits<48> Inst;
297 field bits<48> SoftFail = 0; 343 field bits<48> SoftFail = 0;
298 344
479 let Inst{11-8} = 0; 525 let Inst{11-8} = 0;
480 let Inst{7-4} = R1; 526 let Inst{7-4} = R1;
481 let Inst{3-0} = R2; 527 let Inst{3-0} = R2;
482 } 528 }
483 529
530 class InstRRFd<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern>
531 : InstSystemZ<4, outs, ins, asmstr, pattern> {
532 field bits<32> Inst;
533 field bits<32> SoftFail = 0;
534
535 bits<4> R1;
536 bits<4> R2;
537 bits<4> M4;
538
539 let Inst{31-16} = op;
540 let Inst{15-12} = 0;
541 let Inst{11-8} = M4;
542 let Inst{7-4} = R1;
543 let Inst{3-0} = R2;
544 }
545
484 class InstRRFe<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern> 546 class InstRRFe<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern>
485 : InstSystemZ<4, outs, ins, asmstr, pattern> { 547 : InstSystemZ<4, outs, ins, asmstr, pattern> {
486 field bits<32> Inst; 548 field bits<32> Inst;
487 field bits<32> SoftFail = 0; 549 field bits<32> SoftFail = 0;
488 550
662 let Inst{23-20} = R1; 724 let Inst{23-20} = R1;
663 let Inst{19-16} = R3; 725 let Inst{19-16} = R3;
664 let Inst{15-0} = RI2; 726 let Inst{15-0} = RI2;
665 } 727 }
666 728
729 class InstRSLa<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern>
730 : InstSystemZ<6, outs, ins, asmstr, pattern> {
731 field bits<48> Inst;
732 field bits<48> SoftFail = 0;
733
734 bits<20> BDL1;
735
736 let Inst{47-40} = op{15-8};
737 let Inst{39-36} = BDL1{19-16};
738 let Inst{35-32} = 0;
739 let Inst{31-16} = BDL1{15-0};
740 let Inst{15-8} = 0;
741 let Inst{7-0} = op{7-0};
742 }
743
744 class InstRSLb<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern>
745 : InstSystemZ<6, outs, ins, asmstr, pattern> {
746 field bits<48> Inst;
747 field bits<48> SoftFail = 0;
748
749 bits<4> R1;
750 bits<24> BDL2;
751 bits<4> M3;
752
753 let Inst{47-40} = op{15-8};
754 let Inst{39-16} = BDL2;
755 let Inst{15-12} = R1;
756 let Inst{11-8} = M3;
757 let Inst{7-0} = op{7-0};
758 }
759
667 class InstRSYa<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern> 760 class InstRSYa<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern>
668 : InstSystemZ<6, outs, ins, asmstr, pattern> { 761 : InstSystemZ<6, outs, ins, asmstr, pattern> {
669 field bits<48> Inst; 762 field bits<48> Inst;
670 field bits<48> SoftFail = 0; 763 field bits<48> SoftFail = 0;
671 764
740 let Inst{7-0} = op{7-0}; 833 let Inst{7-0} = op{7-0};
741 834
742 let Has20BitOffset = 1; 835 let Has20BitOffset = 1;
743 } 836 }
744 837
838 class InstSMI<bits<8> op, dag outs, dag ins, string asmstr, list<dag> pattern>
839 : InstSystemZ<6, outs, ins, asmstr, pattern> {
840 field bits<48> Inst;
841 field bits<48> SoftFail = 0;
842
843 bits<4> M1;
844 bits<16> RI2;
845 bits<16> BD3;
846
847 let Inst{47-40} = op;
848 let Inst{39-36} = M1;
849 let Inst{35-32} = 0;
850 let Inst{31-16} = BD3;
851 let Inst{15-0} = RI2;
852 }
853
745 class InstSSa<bits<8> op, dag outs, dag ins, string asmstr, list<dag> pattern> 854 class InstSSa<bits<8> op, dag outs, dag ins, string asmstr, list<dag> pattern>
746 : InstSystemZ<6, outs, ins, asmstr, pattern> { 855 : InstSystemZ<6, outs, ins, asmstr, pattern> {
747 field bits<48> Inst; 856 field bits<48> Inst;
748 field bits<48> SoftFail = 0; 857 field bits<48> SoftFail = 0;
749 858
750 bits<24> BDL1; 859 bits<24> BDL1;
751 bits<16> BD2; 860 bits<16> BD2;
752 861
753 let Inst{47-40} = op; 862 let Inst{47-40} = op;
754 let Inst{39-16} = BDL1; 863 let Inst{39-16} = BDL1;
864 let Inst{15-0} = BD2;
865 }
866
867 class InstSSb<bits<8> op, dag outs, dag ins, string asmstr, list<dag> pattern>
868 : InstSystemZ<6, outs, ins, asmstr, pattern> {
869 field bits<48> Inst;
870 field bits<48> SoftFail = 0;
871
872 bits<20> BDL1;
873 bits<20> BDL2;
874
875 let Inst{47-40} = op;
876 let Inst{39-36} = BDL1{19-16};
877 let Inst{35-32} = BDL2{19-16};
878 let Inst{31-16} = BDL1{15-0};
879 let Inst{15-0} = BDL2{15-0};
880 }
881
882 class InstSSc<bits<8> op, dag outs, dag ins, string asmstr, list<dag> pattern>
883 : InstSystemZ<6, outs, ins, asmstr, pattern> {
884 field bits<48> Inst;
885 field bits<48> SoftFail = 0;
886
887 bits<20> BDL1;
888 bits<16> BD2;
889 bits<4> I3;
890
891 let Inst{47-40} = op;
892 let Inst{39-36} = BDL1{19-16};
893 let Inst{35-32} = I3;
894 let Inst{31-16} = BDL1{15-0};
755 let Inst{15-0} = BD2; 895 let Inst{15-0} = BD2;
756 } 896 }
757 897
758 class InstSSd<bits<8> op, dag outs, dag ins, string asmstr, list<dag> pattern> 898 class InstSSd<bits<8> op, dag outs, dag ins, string asmstr, list<dag> pattern>
759 : InstSystemZ<6, outs, ins, asmstr, pattern> { 899 : InstSystemZ<6, outs, ins, asmstr, pattern> {
767 let Inst{47-40} = op; 907 let Inst{47-40} = op;
768 let Inst{39-36} = RBD1{19-16}; 908 let Inst{39-36} = RBD1{19-16};
769 let Inst{35-32} = R3; 909 let Inst{35-32} = R3;
770 let Inst{31-16} = RBD1{15-0}; 910 let Inst{31-16} = RBD1{15-0};
771 let Inst{15-0} = BD2; 911 let Inst{15-0} = BD2;
912 }
913
914 class InstSSe<bits<8> op, dag outs, dag ins, string asmstr, list<dag> pattern>
915 : InstSystemZ<6, outs, ins, asmstr, pattern> {
916 field bits<48> Inst;
917 field bits<48> SoftFail = 0;
918
919 bits<4> R1;
920 bits<16> BD2;
921 bits<4> R3;
922 bits<16> BD4;
923
924 let Inst{47-40} = op;
925 let Inst{39-36} = R1;
926 let Inst{35-32} = R3;
927 let Inst{31-16} = BD2;
928 let Inst{15-0} = BD4;
929 }
930
931 class InstSSf<bits<8> op, dag outs, dag ins, string asmstr, list<dag> pattern>
932 : InstSystemZ<6, outs, ins, asmstr, pattern> {
933 field bits<48> Inst;
934 field bits<48> SoftFail = 0;
935
936 bits<16> BD1;
937 bits<24> BDL2;
938
939 let Inst{47-40} = op;
940 let Inst{39-32} = BDL2{23-16};
941 let Inst{31-16} = BD1;
942 let Inst{15-0} = BDL2{15-0};
772 } 943 }
773 944
774 class InstSSE<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern> 945 class InstSSE<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern>
775 : InstSystemZ<6, outs, ins, asmstr, pattern> { 946 : InstSystemZ<6, outs, ins, asmstr, pattern> {
776 field bits<48> Inst; 947 field bits<48> Inst;
915 let Inst{19-16} = M5; 1086 let Inst{19-16} = M5;
916 let Inst{15-12} = M4; 1087 let Inst{15-12} = M4;
917 let Inst{11} = V1{4}; 1088 let Inst{11} = V1{4};
918 let Inst{10} = V2{4}; 1089 let Inst{10} = V2{4};
919 let Inst{9-8} = 0; 1090 let Inst{9-8} = 0;
1091 let Inst{7-0} = op{7-0};
1092 }
1093
1094 class InstVRIf<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern>
1095 : InstSystemZ<6, outs, ins, asmstr, pattern> {
1096 field bits<48> Inst;
1097 field bits<48> SoftFail = 0;
1098
1099 bits<5> V1;
1100 bits<5> V2;
1101 bits<5> V3;
1102 bits<8> I4;
1103 bits<4> M5;
1104
1105 let Inst{47-40} = op{15-8};
1106 let Inst{39-36} = V1{3-0};
1107 let Inst{35-32} = V2{3-0};
1108 let Inst{31-28} = V3{3-0};
1109 let Inst{27-24} = 0;
1110 let Inst{23-20} = M5;
1111 let Inst{19-12} = I4;
1112 let Inst{11} = V1{4};
1113 let Inst{10} = V2{4};
1114 let Inst{9} = V3{4};
1115 let Inst{8} = 0;
1116 let Inst{7-0} = op{7-0};
1117 }
1118
1119 class InstVRIg<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern>
1120 : InstSystemZ<6, outs, ins, asmstr, pattern> {
1121 field bits<48> Inst;
1122 field bits<48> SoftFail = 0;
1123
1124 bits<5> V1;
1125 bits<5> V2;
1126 bits<8> I3;
1127 bits<8> I4;
1128 bits<4> M5;
1129
1130 let Inst{47-40} = op{15-8};
1131 let Inst{39-36} = V1{3-0};
1132 let Inst{35-32} = V2{3-0};
1133 let Inst{31-24} = I4;
1134 let Inst{23-20} = M5;
1135 let Inst{19-12} = I3;
1136 let Inst{11} = V1{4};
1137 let Inst{10} = V2{4};
1138 let Inst{9-8} = 0;
1139 let Inst{7-0} = op{7-0};
1140 }
1141
1142 class InstVRIh<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern>
1143 : InstSystemZ<6, outs, ins, asmstr, pattern> {
1144 field bits<48> Inst;
1145 field bits<48> SoftFail = 0;
1146
1147 bits<5> V1;
1148 bits<16> I2;
1149 bits<4> I3;
1150
1151 let Inst{47-40} = op{15-8};
1152 let Inst{39-36} = V1{3-0};
1153 let Inst{35-32} = 0;
1154 let Inst{31-16} = I2;
1155 let Inst{15-12} = I3;
1156 let Inst{11} = V1{4};
1157 let Inst{10-8} = 0;
1158 let Inst{7-0} = op{7-0};
1159 }
1160
1161 class InstVRIi<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern>
1162 : InstSystemZ<6, outs, ins, asmstr, pattern> {
1163 field bits<48> Inst;
1164 field bits<48> SoftFail = 0;
1165
1166 bits<5> V1;
1167 bits<4> R2;
1168 bits<8> I3;
1169 bits<4> M4;
1170
1171 let Inst{47-40} = op{15-8};
1172 let Inst{39-36} = V1{3-0};
1173 let Inst{35-32} = R2;
1174 let Inst{31-24} = 0;
1175 let Inst{23-20} = M4;
1176 let Inst{19-12} = I3;
1177 let Inst{11} = V1{4};
1178 let Inst{10-8} = 0;
920 let Inst{7-0} = op{7-0}; 1179 let Inst{7-0} = op{7-0};
921 } 1180 }
922 1181
923 // Depending on the instruction mnemonic, certain bits may be or-ed into 1182 // Depending on the instruction mnemonic, certain bits may be or-ed into
924 // the M4 value provided as explicit operand. These are passed as m4or. 1183 // the M4 value provided as explicit operand. These are passed as m4or.
1086 let Inst{11} = V1{4}; 1345 let Inst{11} = V1{4};
1087 let Inst{10-8} = 0; 1346 let Inst{10-8} = 0;
1088 let Inst{7-0} = op{7-0}; 1347 let Inst{7-0} = op{7-0};
1089 } 1348 }
1090 1349
1350 class InstVRRg<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern>
1351 : InstSystemZ<6, outs, ins, asmstr, pattern> {
1352 field bits<48> Inst;
1353 field bits<48> SoftFail = 0;
1354
1355 bits<5> V1;
1356
1357 let Inst{47-40} = op{15-8};
1358 let Inst{39-36} = 0;
1359 let Inst{35-32} = V1{3-0};
1360 let Inst{31-12} = 0;
1361 let Inst{11} = 0;
1362 let Inst{10} = V1{4};
1363 let Inst{9-8} = 0;
1364 let Inst{7-0} = op{7-0};
1365 }
1366
1367 class InstVRRh<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern>
1368 : InstSystemZ<6, outs, ins, asmstr, pattern> {
1369 field bits<48> Inst;
1370 field bits<48> SoftFail = 0;
1371
1372 bits<5> V1;
1373 bits<5> V2;
1374 bits<4> M3;
1375
1376 let Inst{47-40} = op{15-8};
1377 let Inst{39-36} = 0;
1378 let Inst{35-32} = V1{3-0};
1379 let Inst{31-28} = V2{3-0};
1380 let Inst{27-24} = 0;
1381 let Inst{23-20} = M3;
1382 let Inst{19-12} = 0;
1383 let Inst{11} = 0;
1384 let Inst{10} = V1{4};
1385 let Inst{9} = V2{4};
1386 let Inst{8} = 0;
1387 let Inst{7-0} = op{7-0};
1388 }
1389
1390 class InstVRRi<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern>
1391 : InstSystemZ<6, outs, ins, asmstr, pattern> {
1392 field bits<48> Inst;
1393 field bits<48> SoftFail = 0;
1394
1395 bits<4> R1;
1396 bits<5> V2;
1397 bits<4> M3;
1398
1399 let Inst{47-40} = op{15-8};
1400 let Inst{39-36} = R1;
1401 let Inst{35-32} = V2{3-0};
1402 let Inst{31-24} = 0;
1403 let Inst{23-20} = M3;
1404 let Inst{19-12} = 0;
1405 let Inst{11} = 0;
1406 let Inst{10} = V2{4};
1407 let Inst{9-8} = 0;
1408 let Inst{7-0} = op{7-0};
1409 }
1410
1091 class InstVRSa<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern> 1411 class InstVRSa<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern>
1092 : InstSystemZ<6, outs, ins, asmstr, pattern> { 1412 : InstSystemZ<6, outs, ins, asmstr, pattern> {
1093 field bits<48> Inst; 1413 field bits<48> Inst;
1094 field bits<48> SoftFail = 0; 1414 field bits<48> SoftFail = 0;
1095 1415
1148 let Inst{10} = V3{4}; 1468 let Inst{10} = V3{4};
1149 let Inst{9-8} = 0; 1469 let Inst{9-8} = 0;
1150 let Inst{7-0} = op{7-0}; 1470 let Inst{7-0} = op{7-0};
1151 } 1471 }
1152 1472
1473 class InstVRSd<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern>
1474 : InstSystemZ<6, outs, ins, asmstr, pattern> {
1475 field bits<48> Inst;
1476 field bits<48> SoftFail = 0;
1477
1478 bits<5> V1;
1479 bits<16> BD2;
1480 bits<4> R3;
1481
1482 let Inst{47-40} = op{15-8};
1483 let Inst{39-36} = 0;
1484 let Inst{35-32} = R3;
1485 let Inst{31-16} = BD2;
1486 let Inst{15-12} = V1{3-0};
1487 let Inst{11-9} = 0;
1488 let Inst{8} = V1{4};
1489 let Inst{7-0} = op{7-0};
1490 }
1491
1153 class InstVRV<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern> 1492 class InstVRV<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern>
1154 : InstSystemZ<6, outs, ins, asmstr, pattern> { 1493 : InstSystemZ<6, outs, ins, asmstr, pattern> {
1155 field bits<48> Inst; 1494 field bits<48> Inst;
1156 field bits<48> SoftFail = 0; 1495 field bits<48> SoftFail = 0;
1157 1496
1182 let Inst{39-36} = V1{3-0}; 1521 let Inst{39-36} = V1{3-0};
1183 let Inst{35-16} = XBD2; 1522 let Inst{35-16} = XBD2;
1184 let Inst{15-12} = M3; 1523 let Inst{15-12} = M3;
1185 let Inst{11} = V1{4}; 1524 let Inst{11} = V1{4};
1186 let Inst{10-8} = 0; 1525 let Inst{10-8} = 0;
1526 let Inst{7-0} = op{7-0};
1527 }
1528
1529 class InstVSI<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern>
1530 : InstSystemZ<6, outs, ins, asmstr, pattern> {
1531 field bits<48> Inst;
1532 field bits<48> SoftFail = 0;
1533
1534 bits<5> V1;
1535 bits<16> BD2;
1536 bits<8> I3;
1537
1538 let Inst{47-40} = op{15-8};
1539 let Inst{39-32} = I3;
1540 let Inst{31-16} = BD2;
1541 let Inst{15-12} = V1{3-0};
1542 let Inst{11-9} = 0;
1543 let Inst{8} = V1{4};
1187 let Inst{7-0} = op{7-0}; 1544 let Inst{7-0} = op{7-0};
1188 } 1545 }
1189 1546
1190 //===----------------------------------------------------------------------===// 1547 //===----------------------------------------------------------------------===//
1191 // Instruction classes for .insn directives 1548 // Instruction classes for .insn directives
1486 // <Category> can be one of: 1843 // <Category> can be one of:
1487 // 1844 //
1488 // Inherent: 1845 // Inherent:
1489 // One register output operand and no input operands. 1846 // One register output operand and no input operands.
1490 // 1847 //
1848 // InherentDual:
1849 // Two register output operands and no input operands.
1850 //
1491 // StoreInherent: 1851 // StoreInherent:
1492 // One address operand. The instruction stores to the address. 1852 // One address operand. The instruction stores to the address.
1493 // 1853 //
1494 // SideEffectInherent: 1854 // SideEffectInherent:
1495 // No input or output operands, but causes some side effect. 1855 // No input or output operands, but causes some side effect.
1504 // CmpBranch: 1864 // CmpBranch:
1505 // Two input operands and one optional branch target. The instruction 1865 // Two input operands and one optional branch target. The instruction
1506 // compares the two input operands and branches or traps on the result. 1866 // compares the two input operands and branches or traps on the result.
1507 // 1867 //
1508 // BranchUnary: 1868 // BranchUnary:
1509 // One register output operand, one register input operand and 1869 // One register output operand, one register input operand and one branch
1510 // one branch displacement. The instructions stores a modified 1870 // target. The instructions stores a modified form of the source register
1511 // form of the source register in the destination register and 1871 // in the destination register and branches on the result.
1512 // branches on the result.
1513 // 1872 //
1514 // BranchBinary: 1873 // BranchBinary:
1515 // One register output operand, two register input operands and one branch 1874 // One register output operand, two register input operands and one branch
1516 // displacement. The instructions stores a modified form of one of the 1875 // target. The instructions stores a modified form of one of the source
1517 // source registers in the destination register and branches on the result. 1876 // registers in the destination register and branches on the result.
1518 // 1877 //
1519 // LoadMultiple: 1878 // LoadMultiple:
1520 // One address input operand and two explicit output operands. 1879 // One address input operand and two explicit output operands.
1521 // The instruction loads a range of registers from the address, 1880 // The instruction loads a range of registers from the address,
1522 // with the explicit operands giving the first and last register 1881 // with the explicit operands giving the first and last register
1535 // length operand. 1894 // length operand.
1536 // 1895 //
1537 // LoadAddress: 1896 // LoadAddress:
1538 // One register output operand and one address operand. 1897 // One register output operand and one address operand.
1539 // 1898 //
1899 // SideEffectAddress:
1900 // One address operand. No output operands, but causes some side effect.
1901 //
1540 // Unary: 1902 // Unary:
1541 // One register output operand and one input operand. 1903 // One register output operand and one input operand.
1542 // 1904 //
1543 // Store: 1905 // Store:
1544 // One address operand and one other input operand. The instruction 1906 // One address operand and one other input operand. The instruction
1559 // 1921 //
1560 // Compare: 1922 // Compare:
1561 // Two input operands and an implicit CC output operand. 1923 // Two input operands and an implicit CC output operand.
1562 // 1924 //
1563 // Test: 1925 // Test:
1564 // Two input operands and an implicit CC output operand. The second 1926 // One or two input operands and an implicit CC output operand. If
1565 // input operand is an "address" operand used as a test class mask. 1927 // present, the second input operand is an "address" operand used as
1928 // a test class mask.
1566 // 1929 //
1567 // Ternary: 1930 // Ternary:
1568 // One register output operand and three input operands. 1931 // One register output operand and three input operands.
1569 // 1932 //
1570 // SideEffectTernary: 1933 // SideEffectTernary:
1586 // are registers and the other three are immediates. 1949 // are registers and the other three are immediates.
1587 // 1950 //
1588 // Prefetch: 1951 // Prefetch:
1589 // One 4-bit immediate operand and one address operand. The immediate 1952 // One 4-bit immediate operand and one address operand. The immediate
1590 // operand is 1 for a load prefetch and 2 for a store prefetch. 1953 // operand is 1 for a load prefetch and 2 for a store prefetch.
1954 //
1955 // BranchPreload:
1956 // One 4-bit immediate operand and two address operands.
1591 // 1957 //
1592 // The format determines which input operands are tied to output operands, 1958 // The format determines which input operands are tied to output operands,
1593 // and also determines the shape of any address operand. 1959 // and also determines the shape of any address operand.
1594 // 1960 //
1595 // Multiclasses of the form <Category><Format>Pair define two instructions, 1961 // Multiclasses of the form <Category><Format>Pair define two instructions,
1605 mnemonic#"\t$R1", 1971 mnemonic#"\t$R1",
1606 [(set cls:$R1, (operator))]> { 1972 [(set cls:$R1, (operator))]> {
1607 let R2 = 0; 1973 let R2 = 0;
1608 } 1974 }
1609 1975
1976 class InherentDualRRE<string mnemonic, bits<16> opcode, RegisterOperand cls>
1977 : InstRRE<opcode, (outs cls:$R1, cls:$R2), (ins),
1978 mnemonic#"\t$R1, $R2", []>;
1979
1610 class InherentVRIa<string mnemonic, bits<16> opcode, bits<16> value> 1980 class InherentVRIa<string mnemonic, bits<16> opcode, bits<16> value>
1611 : InstVRIa<opcode, (outs VR128:$V1), (ins), mnemonic#"\t$V1", []> { 1981 : InstVRIa<opcode, (outs VR128:$V1), (ins), mnemonic#"\t$V1", []> {
1612 let I2 = value; 1982 let I2 = value;
1613 let M3 = 0; 1983 let M3 = 0;
1614 } 1984 }
1615 1985
1616 class StoreInherentS<string mnemonic, bits<16> opcode> 1986 class StoreInherentS<string mnemonic, bits<16> opcode,
1987 SDPatternOperator operator, bits<5> bytes>
1617 : InstS<opcode, (outs), (ins bdaddr12only:$BD2), 1988 : InstS<opcode, (outs), (ins bdaddr12only:$BD2),
1618 mnemonic#"\t$BD2", []> { 1989 mnemonic#"\t$BD2", [(operator bdaddr12only:$BD2)]> {
1619 let mayStore = 1; 1990 let mayStore = 1;
1991 let AccessBytes = bytes;
1620 } 1992 }
1621 1993
1622 class SideEffectInherentE<string mnemonic, bits<16>opcode> 1994 class SideEffectInherentE<string mnemonic, bits<16>opcode>
1623 : InstE<opcode, (outs), (ins), mnemonic, []> { 1995 : InstE<opcode, (outs), (ins), mnemonic, []>;
1624 let hasSideEffects = 1;
1625 }
1626 1996
1627 class SideEffectInherentS<string mnemonic, bits<16> opcode, 1997 class SideEffectInherentS<string mnemonic, bits<16> opcode,
1628 SDPatternOperator operator> 1998 SDPatternOperator operator>
1629 : InstS<opcode, (outs), (ins), mnemonic, [(operator)]> { 1999 : InstS<opcode, (outs), (ins), mnemonic, [(operator)]> {
1630 let hasSideEffects = 1;
1631 let BD2 = 0; 2000 let BD2 = 0;
2001 }
2002
2003 class SideEffectInherentRRE<string mnemonic, bits<16> opcode>
2004 : InstRRE<opcode, (outs), (ins), mnemonic, []> {
2005 let R1 = 0;
2006 let R2 = 0;
1632 } 2007 }
1633 2008
1634 // Allow an optional TLS marker symbol to generate TLS call relocations. 2009 // Allow an optional TLS marker symbol to generate TLS call relocations.
1635 class CallRI<string mnemonic, bits<12> opcode> 2010 class CallRI<string mnemonic, bits<12> opcode>
1636 : InstRIb<opcode, (outs), (ins GR64:$R1, brtarget16tls:$RI2), 2011 : InstRIb<opcode, (outs), (ins GR64:$R1, brtarget16tls:$RI2),
1719 !subst("#", V.suffix, mnemonic)#"\t$XBD2", []> { 2094 !subst("#", V.suffix, mnemonic)#"\t$XBD2", []> {
1720 let isAsmParserOnly = V.alternate; 2095 let isAsmParserOnly = V.alternate;
1721 let M1 = V.ccmask; 2096 let M1 = V.ccmask;
1722 } 2097 }
1723 2098
2099 class CondBranchRXY<string mnemonic, bits<16> opcode>
2100 : InstRXYb<opcode, (outs), (ins cond4:$valid, cond4:$M1, bdxaddr20only:$XBD2),
2101 !subst("#", "${M1}", mnemonic)#"\t$XBD2", []> {
2102 let CCMaskFirst = 1;
2103 }
2104
2105 class AsmCondBranchRXY<string mnemonic, bits<16> opcode>
2106 : InstRXYb<opcode, (outs), (ins imm32zx4:$M1, bdxaddr20only:$XBD2),
2107 mnemonic#"\t$M1, $XBD2", []>;
2108
2109 class FixedCondBranchRXY<CondVariant V, string mnemonic, bits<16> opcode,
2110 SDPatternOperator operator = null_frag>
2111 : InstRXYb<opcode, (outs), (ins bdxaddr20only:$XBD2),
2112 !subst("#", V.suffix, mnemonic)#"\t$XBD2",
2113 [(operator (load bdxaddr20only:$XBD2))]> {
2114 let isAsmParserOnly = V.alternate;
2115 let M1 = V.ccmask;
2116 }
2117
1724 class CmpBranchRIEa<string mnemonic, bits<16> opcode, 2118 class CmpBranchRIEa<string mnemonic, bits<16> opcode,
1725 RegisterOperand cls, Immediate imm> 2119 RegisterOperand cls, Immediate imm>
1726 : InstRIEa<opcode, (outs), (ins cls:$R1, imm:$I2, cond4:$M3), 2120 : InstRIEa<opcode, (outs), (ins cls:$R1, imm:$I2, cond4:$M3),
1727 mnemonic#"$M3\t$R1, $I2", []>; 2121 mnemonic#"$M3\t$R1, $I2", []>;
1728 2122
1909 mnemonic##"\t$R1, $RI2", []> { 2303 mnemonic##"\t$R1, $RI2", []> {
1910 let Constraints = "$R1 = $R1src"; 2304 let Constraints = "$R1 = $R1src";
1911 let DisableEncoding = "$R1src"; 2305 let DisableEncoding = "$R1src";
1912 } 2306 }
1913 2307
2308 class BranchUnaryRIL<string mnemonic, bits<12> opcode, RegisterOperand cls>
2309 : InstRILb<opcode, (outs cls:$R1), (ins cls:$R1src, brtarget32:$RI2),
2310 mnemonic##"\t$R1, $RI2", []> {
2311 let Constraints = "$R1 = $R1src";
2312 let DisableEncoding = "$R1src";
2313 }
2314
2315 class BranchUnaryRR<string mnemonic, bits<8> opcode, RegisterOperand cls>
2316 : InstRR<opcode, (outs cls:$R1), (ins cls:$R1src, GR64:$R2),
2317 mnemonic##"\t$R1, $R2", []> {
2318 let Constraints = "$R1 = $R1src";
2319 let DisableEncoding = "$R1src";
2320 }
2321
2322 class BranchUnaryRRE<string mnemonic, bits<16> opcode, RegisterOperand cls>
2323 : InstRRE<opcode, (outs cls:$R1), (ins cls:$R1src, GR64:$R2),
2324 mnemonic##"\t$R1, $R2", []> {
2325 let Constraints = "$R1 = $R1src";
2326 let DisableEncoding = "$R1src";
2327 }
2328
2329 class BranchUnaryRX<string mnemonic, bits<8> opcode, RegisterOperand cls>
2330 : InstRXa<opcode, (outs cls:$R1), (ins cls:$R1src, bdxaddr12only:$XBD2),
2331 mnemonic##"\t$R1, $XBD2", []> {
2332 let Constraints = "$R1 = $R1src";
2333 let DisableEncoding = "$R1src";
2334 }
2335
2336 class BranchUnaryRXY<string mnemonic, bits<16> opcode, RegisterOperand cls>
2337 : InstRXYa<opcode, (outs cls:$R1), (ins cls:$R1src, bdxaddr20only:$XBD2),
2338 mnemonic##"\t$R1, $XBD2", []> {
2339 let Constraints = "$R1 = $R1src";
2340 let DisableEncoding = "$R1src";
2341 }
2342
1914 class BranchBinaryRSI<string mnemonic, bits<8> opcode, RegisterOperand cls> 2343 class BranchBinaryRSI<string mnemonic, bits<8> opcode, RegisterOperand cls>
1915 : InstRSI<opcode, (outs cls:$R1), (ins cls:$R1src, cls:$R3, brtarget16:$RI2), 2344 : InstRSI<opcode, (outs cls:$R1), (ins cls:$R1src, cls:$R3, brtarget16:$RI2),
1916 mnemonic##"\t$R1, $R3, $RI2", []> { 2345 mnemonic##"\t$R1, $R3, $RI2", []> {
2346 let Constraints = "$R1 = $R1src";
2347 let DisableEncoding = "$R1src";
2348 }
2349
2350 class BranchBinaryRIEe<string mnemonic, bits<16> opcode, RegisterOperand cls>
2351 : InstRIEe<opcode, (outs cls:$R1),
2352 (ins cls:$R1src, cls:$R3, brtarget16:$RI2),
2353 mnemonic##"\t$R1, $R3, $RI2", []> {
2354 let Constraints = "$R1 = $R1src";
2355 let DisableEncoding = "$R1src";
2356 }
2357
2358 class BranchBinaryRS<string mnemonic, bits<8> opcode, RegisterOperand cls>
2359 : InstRSa<opcode, (outs cls:$R1),
2360 (ins cls:$R1src, cls:$R3, bdaddr12only:$BD2),
2361 mnemonic##"\t$R1, $R3, $BD2", []> {
2362 let Constraints = "$R1 = $R1src";
2363 let DisableEncoding = "$R1src";
2364 }
2365
2366 class BranchBinaryRSY<string mnemonic, bits<16> opcode, RegisterOperand cls>
2367 : InstRSYa<opcode,
2368 (outs cls:$R1), (ins cls:$R1src, cls:$R3, bdaddr20only:$BD2),
2369 mnemonic##"\t$R1, $R3, $BD2", []> {
1917 let Constraints = "$R1 = $R1src"; 2370 let Constraints = "$R1 = $R1src";
1918 let DisableEncoding = "$R1src"; 2371 let DisableEncoding = "$R1src";
1919 } 2372 }
1920 2373
1921 class LoadMultipleRS<string mnemonic, bits<8> opcode, RegisterOperand cls, 2374 class LoadMultipleRS<string mnemonic, bits<8> opcode, RegisterOperand cls,
1938 let DispSize = "12" in 2391 let DispSize = "12" in
1939 def "" : LoadMultipleRS<mnemonic, rsOpcode, cls, bdaddr12pair>; 2392 def "" : LoadMultipleRS<mnemonic, rsOpcode, cls, bdaddr12pair>;
1940 let DispSize = "20" in 2393 let DispSize = "20" in
1941 def Y : LoadMultipleRSY<mnemonic#"y", rsyOpcode, cls, bdaddr20pair>; 2394 def Y : LoadMultipleRSY<mnemonic#"y", rsyOpcode, cls, bdaddr20pair>;
1942 } 2395 }
2396 }
2397
2398 class LoadMultipleSSe<string mnemonic, bits<8> opcode, RegisterOperand cls>
2399 : InstSSe<opcode, (outs cls:$R1, cls:$R3),
2400 (ins bdaddr12only:$BD2, bdaddr12only:$BD4),
2401 mnemonic#"\t$R1, $R3, $BD2, $BD4", []> {
2402 let mayLoad = 1;
1943 } 2403 }
1944 2404
1945 class LoadMultipleVRSa<string mnemonic, bits<16> opcode> 2405 class LoadMultipleVRSa<string mnemonic, bits<16> opcode>
1946 : InstVRSa<opcode, (outs VR128:$V1, VR128:$V3), (ins bdaddr12only:$BD2), 2406 : InstVRSa<opcode, (outs VR128:$V1, VR128:$V3), (ins bdaddr12only:$BD2),
1947 mnemonic#"\t$V1, $V3, $BD2", []> { 2407 mnemonic#"\t$V1, $V3, $BD2", []> {
2011 SDPatternOperator operator, bits<5> bytes> 2471 SDPatternOperator operator, bits<5> bytes>
2012 : InstVRSb<opcode, (outs), (ins VR128:$V1, GR32:$R3, bdaddr12only:$BD2), 2472 : InstVRSb<opcode, (outs), (ins VR128:$V1, GR32:$R3, bdaddr12only:$BD2),
2013 mnemonic#"\t$V1, $R3, $BD2", 2473 mnemonic#"\t$V1, $R3, $BD2",
2014 [(operator VR128:$V1, GR32:$R3, bdaddr12only:$BD2)]> { 2474 [(operator VR128:$V1, GR32:$R3, bdaddr12only:$BD2)]> {
2015 let M4 = 0; 2475 let M4 = 0;
2476 let mayStore = 1;
2477 let AccessBytes = bytes;
2478 }
2479
2480 class StoreLengthVRSd<string mnemonic, bits<16> opcode,
2481 SDPatternOperator operator, bits<5> bytes>
2482 : InstVRSd<opcode, (outs), (ins VR128:$V1, GR32:$R3, bdaddr12only:$BD2),
2483 mnemonic#"\t$V1, $R3, $BD2",
2484 [(operator VR128:$V1, GR32:$R3, bdaddr12only:$BD2)]> {
2485 let mayStore = 1;
2486 let AccessBytes = bytes;
2487 }
2488
2489 class StoreLengthVSI<string mnemonic, bits<16> opcode,
2490 SDPatternOperator operator, bits<5> bytes>
2491 : InstVSI<opcode, (outs), (ins VR128:$V1, bdaddr12only:$BD2, imm32zx8:$I3),
2492 mnemonic#"\t$V1, $BD2, $I3",
2493 [(operator VR128:$V1, imm32zx8:$I3, bdaddr12only:$BD2)]> {
2016 let mayStore = 1; 2494 let mayStore = 1;
2017 let AccessBytes = bytes; 2495 let AccessBytes = bytes;
2018 } 2496 }
2019 2497
2020 class StoreMultipleRS<string mnemonic, bits<8> opcode, RegisterOperand cls, 2498 class StoreMultipleRS<string mnemonic, bits<8> opcode, RegisterOperand cls,
2135 def Asm : AsmCondStoreRSY<mnemonic, opcode, cls, bytes, mode>; 2613 def Asm : AsmCondStoreRSY<mnemonic, opcode, cls, bytes, mode>;
2136 } 2614 }
2137 2615
2138 class SideEffectUnaryI<string mnemonic, bits<8> opcode, Immediate imm> 2616 class SideEffectUnaryI<string mnemonic, bits<8> opcode, Immediate imm>
2139 : InstI<opcode, (outs), (ins imm:$I1), 2617 : InstI<opcode, (outs), (ins imm:$I1),
2140 mnemonic#"\t$I1", []> { 2618 mnemonic#"\t$I1", []>;
2141 let hasSideEffects = 1;
2142 }
2143 2619
2144 class SideEffectUnaryRR<string mnemonic, bits<8>opcode, RegisterOperand cls> 2620 class SideEffectUnaryRR<string mnemonic, bits<8>opcode, RegisterOperand cls>
2145 : InstRR<opcode, (outs), (ins cls:$R1), 2621 : InstRR<opcode, (outs), (ins cls:$R1),
2146 mnemonic#"\t$R1", []> { 2622 mnemonic#"\t$R1", []> {
2147 let hasSideEffects = 1;
2148 let R2 = 0; 2623 let R2 = 0;
2149 } 2624 }
2150 2625
2626 class SideEffectUnaryRRE<string mnemonic, bits<16> opcode, RegisterOperand cls,
2627 SDPatternOperator operator>
2628 : InstRRE<opcode, (outs), (ins cls:$R1),
2629 mnemonic#"\t$R1", [(operator cls:$R1)]> {
2630 let R2 = 0;
2631 }
2632
2151 class SideEffectUnaryS<string mnemonic, bits<16> opcode, 2633 class SideEffectUnaryS<string mnemonic, bits<16> opcode,
2152 SDPatternOperator operator> 2634 SDPatternOperator operator, bits<5> bytes,
2153 : InstS<opcode, (outs), (ins bdaddr12only:$BD2), 2635 AddressingMode mode = bdaddr12only>
2154 mnemonic#"\t$BD2", [(operator bdaddr12only:$BD2)]> { 2636 : InstS<opcode, (outs), (ins mode:$BD2),
2155 let hasSideEffects = 1; 2637 mnemonic#"\t$BD2", [(operator mode:$BD2)]> {
2156 } 2638 let mayLoad = 1;
2639 let AccessBytes = bytes;
2640 }
2641
2642 class SideEffectAddressS<string mnemonic, bits<16> opcode,
2643 SDPatternOperator operator,
2644 AddressingMode mode = bdaddr12only>
2645 : InstS<opcode, (outs), (ins mode:$BD2),
2646 mnemonic#"\t$BD2", [(operator mode:$BD2)]>;
2157 2647
2158 class LoadAddressRX<string mnemonic, bits<8> opcode, 2648 class LoadAddressRX<string mnemonic, bits<8> opcode,
2159 SDPatternOperator operator, AddressingMode mode> 2649 SDPatternOperator operator, AddressingMode mode>
2160 : InstRXa<opcode, (outs GR64:$R1), (ins mode:$XBD2), 2650 : InstRXa<opcode, (outs GR64:$R1), (ins mode:$XBD2),
2161 mnemonic#"\t$R1, $XBD2", 2651 mnemonic#"\t$R1, $XBD2",
2199 [(set cls1:$R1, (operator cls2:$R2))]> { 2689 [(set cls1:$R1, (operator cls2:$R2))]> {
2200 let OpKey = mnemonic#cls1; 2690 let OpKey = mnemonic#cls1;
2201 let OpType = "reg"; 2691 let OpType = "reg";
2202 } 2692 }
2203 2693
2204 // These instructions are generated by if conversion. The old value of R1 2694 class UnaryTiedRRE<string mnemonic, bits<16> opcode, RegisterOperand cls>
2205 // is added as an implicit use. 2695 : InstRRE<opcode, (outs cls:$R1), (ins cls:$R1src),
2206 class CondUnaryRRF<string mnemonic, bits<16> opcode, RegisterOperand cls1, 2696 mnemonic#"\t$R1", []> {
2207 RegisterOperand cls2>
2208 : InstRRFc<opcode, (outs cls1:$R1), (ins cls2:$R2, cond4:$valid, cond4:$M3),
2209 mnemonic#"$M3\t$R1, $R2", []> {
2210 let CCMaskLast = 1;
2211 }
2212
2213 class CondUnaryRIE<string mnemonic, bits<16> opcode, RegisterOperand cls,
2214 Immediate imm>
2215 : InstRIEg<opcode, (outs cls:$R1), (ins imm:$I2, cond4:$valid, cond4:$M3),
2216 mnemonic#"$M3\t$R1, $I2", []> {
2217 let CCMaskLast = 1;
2218 }
2219
2220 // Like CondUnaryRRF, but used for the raw assembly form. The condition-code
2221 // mask is the third operand rather than being part of the mnemonic.
2222 class AsmCondUnaryRRF<string mnemonic, bits<16> opcode, RegisterOperand cls1,
2223 RegisterOperand cls2>
2224 : InstRRFc<opcode, (outs cls1:$R1),
2225 (ins cls1:$R1src, cls2:$R2, imm32zx4:$M3),
2226 mnemonic#"\t$R1, $R2, $M3", []> {
2227 let Constraints = "$R1 = $R1src"; 2697 let Constraints = "$R1 = $R1src";
2228 let DisableEncoding = "$R1src"; 2698 let DisableEncoding = "$R1src";
2229 } 2699 let R2 = 0;
2230 2700 }
2231 class AsmCondUnaryRIE<string mnemonic, bits<16> opcode, RegisterOperand cls, 2701
2232 Immediate imm> 2702 class UnaryMemRRFc<string mnemonic, bits<16> opcode,
2233 : InstRIEg<opcode, (outs cls:$R1), 2703 RegisterOperand cls1, RegisterOperand cls2>
2234 (ins cls:$R1src, imm:$I2, imm32zx4:$M3), 2704 : InstRRFc<opcode, (outs cls2:$R2, cls1:$R1), (ins cls1:$R1src),
2235 mnemonic#"\t$R1, $I2, $M3", []> { 2705 mnemonic#"\t$R1, $R2", []> {
2236 let Constraints = "$R1 = $R1src"; 2706 let Constraints = "$R1 = $R1src";
2237 let DisableEncoding = "$R1src"; 2707 let DisableEncoding = "$R1src";
2238 } 2708 let M3 = 0;
2239
2240 // Like CondUnaryRRF, but with a fixed CC mask.
2241 class FixedCondUnaryRRF<CondVariant V, string mnemonic, bits<16> opcode,
2242 RegisterOperand cls1, RegisterOperand cls2>
2243 : InstRRFc<opcode, (outs cls1:$R1), (ins cls1:$R1src, cls2:$R2),
2244 mnemonic#V.suffix#"\t$R1, $R2", []> {
2245 let Constraints = "$R1 = $R1src";
2246 let DisableEncoding = "$R1src";
2247 let isAsmParserOnly = V.alternate;
2248 let M3 = V.ccmask;
2249 }
2250
2251 class FixedCondUnaryRIE<CondVariant V, string mnemonic, bits<16> opcode,
2252 RegisterOperand cls, Immediate imm>
2253 : InstRIEg<opcode, (outs cls:$R1), (ins cls:$R1src, imm:$I2),
2254 mnemonic#V.suffix#"\t$R1, $I2", []> {
2255 let Constraints = "$R1 = $R1src";
2256 let DisableEncoding = "$R1src";
2257 let isAsmParserOnly = V.alternate;
2258 let M3 = V.ccmask;
2259 }
2260
2261 multiclass CondUnaryRRFPair<string mnemonic, bits<16> opcode,
2262 RegisterOperand cls1, RegisterOperand cls2> {
2263 let isCodeGenOnly = 1 in
2264 def "" : CondUnaryRRF<mnemonic, opcode, cls1, cls2>;
2265 def Asm : AsmCondUnaryRRF<mnemonic, opcode, cls1, cls2>;
2266 }
2267
2268 multiclass CondUnaryRIEPair<string mnemonic, bits<16> opcode,
2269 RegisterOperand cls, Immediate imm> {
2270 let isCodeGenOnly = 1 in
2271 def "" : CondUnaryRIE<mnemonic, opcode, cls, imm>;
2272 def Asm : AsmCondUnaryRIE<mnemonic, opcode, cls, imm>;
2273 } 2709 }
2274 2710
2275 class UnaryRI<string mnemonic, bits<12> opcode, SDPatternOperator operator, 2711 class UnaryRI<string mnemonic, bits<12> opcode, SDPatternOperator operator,
2276 RegisterOperand cls, Immediate imm> 2712 RegisterOperand cls, Immediate imm>
2277 : InstRIa<opcode, (outs cls:$R1), (ins imm:$I2), 2713 : InstRIa<opcode, (outs cls:$R1), (ins imm:$I2),
2483 } 2919 }
2484 2920
2485 class SideEffectBinaryRX<string mnemonic, bits<8> opcode, 2921 class SideEffectBinaryRX<string mnemonic, bits<8> opcode,
2486 RegisterOperand cls> 2922 RegisterOperand cls>
2487 : InstRXa<opcode, (outs), (ins cls:$R1, bdxaddr12only:$XBD2), 2923 : InstRXa<opcode, (outs), (ins cls:$R1, bdxaddr12only:$XBD2),
2488 mnemonic##"\t$R1, $XBD2", []> { 2924 mnemonic##"\t$R1, $XBD2", []>;
2489 let hasSideEffects = 1; 2925
2490 } 2926 class SideEffectBinaryRXY<string mnemonic, bits<16> opcode,
2927 RegisterOperand cls>
2928 : InstRXYa<opcode, (outs), (ins cls:$R1, bdxaddr20only:$XBD2),
2929 mnemonic##"\t$R1, $XBD2", []>;
2491 2930
2492 class SideEffectBinaryRILPC<string mnemonic, bits<12> opcode, 2931 class SideEffectBinaryRILPC<string mnemonic, bits<12> opcode,
2493 RegisterOperand cls> 2932 RegisterOperand cls>
2494 : InstRILb<opcode, (outs), (ins cls:$R1, pcrel32:$RI2), 2933 : InstRILb<opcode, (outs), (ins cls:$R1, pcrel32:$RI2),
2495 mnemonic##"\t$R1, $RI2", []> { 2934 mnemonic##"\t$R1, $RI2", []> {
2496 let hasSideEffects = 1;
2497 // We want PC-relative addresses to be tried ahead of BD and BDX addresses. 2935 // We want PC-relative addresses to be tried ahead of BD and BDX addresses.
2498 // However, BDXs have two extra operands and are therefore 6 units more 2936 // However, BDXs have two extra operands and are therefore 6 units more
2499 // complex. 2937 // complex.
2500 let AddedComplexity = 7; 2938 let AddedComplexity = 7;
2501 } 2939 }
2502 2940
2941 class SideEffectBinaryRRE<string mnemonic, bits<16> opcode,
2942 RegisterOperand cls1, RegisterOperand cls2>
2943 : InstRRE<opcode, (outs), (ins cls1:$R1, cls2:$R2),
2944 mnemonic#"\t$R1, $R2", []>;
2945
2946 class SideEffectBinaryRRFa<string mnemonic, bits<16> opcode,
2947 RegisterOperand cls1, RegisterOperand cls2>
2948 : InstRRFa<opcode, (outs), (ins cls1:$R1, cls2:$R2),
2949 mnemonic#"\t$R1, $R2", []> {
2950 let R3 = 0;
2951 let M4 = 0;
2952 }
2953
2954 class SideEffectBinaryRRFc<string mnemonic, bits<16> opcode,
2955 RegisterOperand cls1, RegisterOperand cls2>
2956 : InstRRFc<opcode, (outs), (ins cls1:$R1, cls2:$R2),
2957 mnemonic#"\t$R1, $R2", []> {
2958 let M3 = 0;
2959 }
2960
2961 class SideEffectBinaryIE<string mnemonic, bits<16> opcode,
2962 Immediate imm1, Immediate imm2>
2963 : InstIE<opcode, (outs), (ins imm1:$I1, imm2:$I2),
2964 mnemonic#"\t$I1, $I2", []>;
2965
2966 class SideEffectBinarySI<string mnemonic, bits<8> opcode, Operand imm>
2967 : InstSI<opcode, (outs), (ins bdaddr12only:$BD1, imm:$I2),
2968 mnemonic#"\t$BD1, $I2", []>;
2969
2503 class SideEffectBinarySIL<string mnemonic, bits<16> opcode, 2970 class SideEffectBinarySIL<string mnemonic, bits<16> opcode,
2504 SDPatternOperator operator, Immediate imm> 2971 SDPatternOperator operator, Immediate imm>
2505 : InstSIL<opcode, (outs), (ins bdaddr12only:$BD1, imm:$I2), 2972 : InstSIL<opcode, (outs), (ins bdaddr12only:$BD1, imm:$I2),
2506 mnemonic#"\t$BD1, $I2", [(operator bdaddr12only:$BD1, imm:$I2)]> { 2973 mnemonic#"\t$BD1, $I2", [(operator bdaddr12only:$BD1, imm:$I2)]>;
2507 let hasSideEffects = 1; 2974
2975 class SideEffectBinarySSa<string mnemonic, bits<8> opcode>
2976 : InstSSa<opcode, (outs), (ins bdladdr12onlylen8:$BDL1, bdaddr12only:$BD2),
2977 mnemonic##"\t$BDL1, $BD2", []>;
2978
2979 class SideEffectBinarySSb<string mnemonic, bits<8> opcode>
2980 : InstSSb<opcode,
2981 (outs), (ins bdladdr12onlylen4:$BDL1, bdladdr12onlylen4:$BDL2),
2982 mnemonic##"\t$BDL1, $BDL2", []>;
2983
2984 class SideEffectBinarySSf<string mnemonic, bits<8> opcode>
2985 : InstSSf<opcode, (outs), (ins bdaddr12only:$BD1, bdladdr12onlylen8:$BDL2),
2986 mnemonic##"\t$BD1, $BDL2", []>;
2987
2988 class SideEffectBinarySSE<string mnemonic, bits<16> opcode>
2989 : InstSSE<opcode, (outs), (ins bdaddr12only:$BD1, bdaddr12only:$BD2),
2990 mnemonic#"\t$BD1, $BD2", []>;
2991
2992 class SideEffectBinaryMemMemRR<string mnemonic, bits<8> opcode,
2993 RegisterOperand cls1, RegisterOperand cls2>
2994 : InstRR<opcode, (outs cls1:$R1, cls2:$R2), (ins cls1:$R1src, cls2:$R2src),
2995 mnemonic#"\t$R1, $R2", []> {
2996 let Constraints = "$R1 = $R1src, $R2 = $R2src";
2997 let DisableEncoding = "$R1src, $R2src";
2998 }
2999
3000 class SideEffectBinaryMemRRE<string mnemonic, bits<16> opcode,
3001 RegisterOperand cls1, RegisterOperand cls2>
3002 : InstRRE<opcode, (outs cls2:$R2), (ins cls1:$R1, cls2:$R2src),
3003 mnemonic#"\t$R1, $R2", []> {
3004 let Constraints = "$R2 = $R2src";
3005 let DisableEncoding = "$R2src";
3006 }
3007
3008 class SideEffectBinaryMemMemRRE<string mnemonic, bits<16> opcode,
3009 RegisterOperand cls1, RegisterOperand cls2>
3010 : InstRRE<opcode, (outs cls1:$R1, cls2:$R2), (ins cls1:$R1src, cls2:$R2src),
3011 mnemonic#"\t$R1, $R2", []> {
3012 let Constraints = "$R1 = $R1src, $R2 = $R2src";
3013 let DisableEncoding = "$R1src, $R2src";
3014 }
3015
3016 class SideEffectBinaryMemMemRRFc<string mnemonic, bits<16> opcode,
3017 RegisterOperand cls1, RegisterOperand cls2>
3018 : InstRRFc<opcode, (outs cls1:$R1, cls2:$R2), (ins cls1:$R1src, cls2:$R2src),
3019 mnemonic#"\t$R1, $R2", []> {
3020 let Constraints = "$R1 = $R1src, $R2 = $R2src";
3021 let DisableEncoding = "$R1src, $R2src";
3022 let M3 = 0;
2508 } 3023 }
2509 3024
2510 class BinaryRR<string mnemonic, bits<8> opcode, SDPatternOperator operator, 3025 class BinaryRR<string mnemonic, bits<8> opcode, SDPatternOperator operator,
2511 RegisterOperand cls1, RegisterOperand cls2> 3026 RegisterOperand cls1, RegisterOperand cls2>
2512 : InstRR<opcode, (outs cls1:$R1), (ins cls1:$R1src, cls2:$R2), 3027 : InstRR<opcode, (outs cls1:$R1), (ins cls1:$R1src, cls2:$R2),
2525 [(set cls1:$R1, (operator cls1:$R1src, cls2:$R2))]> { 3040 [(set cls1:$R1, (operator cls1:$R1src, cls2:$R2))]> {
2526 let OpKey = mnemonic#cls1; 3041 let OpKey = mnemonic#cls1;
2527 let OpType = "reg"; 3042 let OpType = "reg";
2528 let Constraints = "$R1 = $R1src"; 3043 let Constraints = "$R1 = $R1src";
2529 let DisableEncoding = "$R1src"; 3044 let DisableEncoding = "$R1src";
3045 }
3046
3047 class BinaryRRD<string mnemonic, bits<16> opcode, SDPatternOperator operator,
3048 RegisterOperand cls1, RegisterOperand cls2>
3049 : InstRRD<opcode, (outs cls1:$R1), (ins cls2:$R3, cls2:$R2),
3050 mnemonic#"\t$R1, $R3, $R2",
3051 [(set cls1:$R1, (operator cls2:$R3, cls2:$R2))]> {
3052 let OpKey = mnemonic#cls;
3053 let OpType = "reg";
2530 } 3054 }
2531 3055
2532 class BinaryRRFa<string mnemonic, bits<16> opcode, SDPatternOperator operator, 3056 class BinaryRRFa<string mnemonic, bits<16> opcode, SDPatternOperator operator,
2533 RegisterOperand cls1, RegisterOperand cls2, 3057 RegisterOperand cls1, RegisterOperand cls2,
2534 RegisterOperand cls3> 3058 RegisterOperand cls3>
2569 mnemonic#"\t$R1, $R3, $R2", 3093 mnemonic#"\t$R1, $R3, $R2",
2570 [(set cls1:$R1, (operator cls2:$R2, cls3:$R3))]> { 3094 [(set cls1:$R1, (operator cls2:$R2, cls3:$R3))]> {
2571 let M4 = 0; 3095 let M4 = 0;
2572 } 3096 }
2573 3097
3098 class BinaryMemRRFc<string mnemonic, bits<16> opcode,
3099 RegisterOperand cls1, RegisterOperand cls2, Immediate imm>
3100 : InstRRFc<opcode, (outs cls2:$R2, cls1:$R1), (ins cls1:$R1src, imm:$M3),
3101 mnemonic#"\t$R1, $R2, $M3", []> {
3102 let Constraints = "$R1 = $R1src";
3103 let DisableEncoding = "$R1src";
3104 }
3105
3106 multiclass BinaryMemRRFcOpt<string mnemonic, bits<16> opcode,
3107 RegisterOperand cls1, RegisterOperand cls2> {
3108 def "" : BinaryMemRRFc<mnemonic, opcode, cls1, cls2, imm32zx4>;
3109 def Opt : UnaryMemRRFc<mnemonic, opcode, cls1, cls2>;
3110 }
3111
3112 class BinaryRRFd<string mnemonic, bits<16> opcode, RegisterOperand cls1,
3113 RegisterOperand cls2>
3114 : InstRRFd<opcode, (outs cls1:$R1), (ins cls2:$R2, imm32zx4:$M4),
3115 mnemonic#"\t$R1, $R2, $M4", []>;
3116
2574 class BinaryRRFe<string mnemonic, bits<16> opcode, RegisterOperand cls1, 3117 class BinaryRRFe<string mnemonic, bits<16> opcode, RegisterOperand cls1,
2575 RegisterOperand cls2> 3118 RegisterOperand cls2>
2576 : InstRRFe<opcode, (outs cls1:$R1), (ins imm32zx4:$M3, cls2:$R2), 3119 : InstRRFe<opcode, (outs cls1:$R1), (ins imm32zx4:$M3, cls2:$R2),
2577 mnemonic#"\t$R1, $M3, $R2", []> { 3120 mnemonic#"\t$R1, $M3, $R2", []> {
2578 let M4 = 0; 3121 let M4 = 0;
3122 }
3123
3124 class CondBinaryRRF<string mnemonic, bits<16> opcode, RegisterOperand cls1,
3125 RegisterOperand cls2>
3126 : InstRRFc<opcode, (outs cls1:$R1),
3127 (ins cls1:$R1src, cls2:$R2, cond4:$valid, cond4:$M3),
3128 mnemonic#"$M3\t$R1, $R2", []> {
3129 let Constraints = "$R1 = $R1src";
3130 let DisableEncoding = "$R1src";
3131 let CCMaskLast = 1;
3132 }
3133
3134 // Like CondBinaryRRF, but used for the raw assembly form. The condition-code
3135 // mask is the third operand rather than being part of the mnemonic.
3136 class AsmCondBinaryRRF<string mnemonic, bits<16> opcode, RegisterOperand cls1,
3137 RegisterOperand cls2>
3138 : InstRRFc<opcode, (outs cls1:$R1),
3139 (ins cls1:$R1src, cls2:$R2, imm32zx4:$M3),
3140 mnemonic#"\t$R1, $R2, $M3", []> {
3141 let Constraints = "$R1 = $R1src";
3142 let DisableEncoding = "$R1src";
3143 }
3144
3145 // Like CondBinaryRRF, but with a fixed CC mask.
3146 class FixedCondBinaryRRF<CondVariant V, string mnemonic, bits<16> opcode,
3147 RegisterOperand cls1, RegisterOperand cls2>
3148 : InstRRFc<opcode, (outs cls1:$R1), (ins cls1:$R1src, cls2:$R2),
3149 mnemonic#V.suffix#"\t$R1, $R2", []> {
3150 let Constraints = "$R1 = $R1src";
3151 let DisableEncoding = "$R1src";
3152 let isAsmParserOnly = V.alternate;
3153 let M3 = V.ccmask;
3154 }
3155
3156 multiclass CondBinaryRRFPair<string mnemonic, bits<16> opcode,
3157 RegisterOperand cls1, RegisterOperand cls2> {
3158 let isCodeGenOnly = 1 in
3159 def "" : CondBinaryRRF<mnemonic, opcode, cls1, cls2>;
3160 def Asm : AsmCondBinaryRRF<mnemonic, opcode, cls1, cls2>;
2579 } 3161 }
2580 3162
2581 class BinaryRI<string mnemonic, bits<12> opcode, SDPatternOperator operator, 3163 class BinaryRI<string mnemonic, bits<12> opcode, SDPatternOperator operator,
2582 RegisterOperand cls, Immediate imm> 3164 RegisterOperand cls, Immediate imm>
2583 : InstRIa<opcode, (outs cls:$R1), (ins cls:$R1src, imm:$I2), 3165 : InstRIa<opcode, (outs cls:$R1), (ins cls:$R1src, imm:$I2),
2603 let NumOpsValue = "2", isConvertibleToThreeAddress = 1 in 3185 let NumOpsValue = "2", isConvertibleToThreeAddress = 1 in
2604 def "" : BinaryRI<mnemonic, opcode1, operator, cls, imm>; 3186 def "" : BinaryRI<mnemonic, opcode1, operator, cls, imm>;
2605 } 3187 }
2606 } 3188 }
2607 3189
3190 class CondBinaryRIE<string mnemonic, bits<16> opcode, RegisterOperand cls,
3191 Immediate imm>
3192 : InstRIEg<opcode, (outs cls:$R1),
3193 (ins cls:$R1src, imm:$I2, cond4:$valid, cond4:$M3),
3194 mnemonic#"$M3\t$R1, $I2",
3195 [(set cls:$R1, (z_select_ccmask imm:$I2, cls:$R1src,
3196 cond4:$valid, cond4:$M3))]> {
3197 let Constraints = "$R1 = $R1src";
3198 let DisableEncoding = "$R1src";
3199 let CCMaskLast = 1;
3200 }
3201
3202 // Like CondBinaryRIE, but used for the raw assembly form. The condition-code
3203 // mask is the third operand rather than being part of the mnemonic.
3204 class AsmCondBinaryRIE<string mnemonic, bits<16> opcode, RegisterOperand cls,
3205 Immediate imm>
3206 : InstRIEg<opcode, (outs cls:$R1),
3207 (ins cls:$R1src, imm:$I2, imm32zx4:$M3),
3208 mnemonic#"\t$R1, $I2, $M3", []> {
3209 let Constraints = "$R1 = $R1src";
3210 let DisableEncoding = "$R1src";
3211 }
3212
3213 // Like CondBinaryRIE, but with a fixed CC mask.
3214 class FixedCondBinaryRIE<CondVariant V, string mnemonic, bits<16> opcode,
3215 RegisterOperand cls, Immediate imm>
3216 : InstRIEg<opcode, (outs cls:$R1), (ins cls:$R1src, imm:$I2),
3217 mnemonic#V.suffix#"\t$R1, $I2", []> {
3218 let Constraints = "$R1 = $R1src";
3219 let DisableEncoding = "$R1src";
3220 let isAsmParserOnly = V.alternate;
3221 let M3 = V.ccmask;
3222 }
3223
3224 multiclass CondBinaryRIEPair<string mnemonic, bits<16> opcode,
3225 RegisterOperand cls, Immediate imm> {
3226 let isCodeGenOnly = 1 in
3227 def "" : CondBinaryRIE<mnemonic, opcode, cls, imm>;
3228 def Asm : AsmCondBinaryRIE<mnemonic, opcode, cls, imm>;
3229 }
3230
2608 class BinaryRIL<string mnemonic, bits<12> opcode, SDPatternOperator operator, 3231 class BinaryRIL<string mnemonic, bits<12> opcode, SDPatternOperator operator,
2609 RegisterOperand cls, Immediate imm> 3232 RegisterOperand cls, Immediate imm>
2610 : InstRILa<opcode, (outs cls:$R1), (ins cls:$R1src, imm:$I2), 3233 : InstRILa<opcode, (outs cls:$R1), (ins cls:$R1src, imm:$I2),
2611 mnemonic#"\t$R1, $I2", 3234 mnemonic#"\t$R1, $I2",
2612 [(set cls:$R1, (operator cls:$R1src, imm:$I2))]> { 3235 [(set cls:$R1, (operator cls:$R1src, imm:$I2))]> {
2637 def K : BinaryRSY<mnemonic##"k", opcode2, null_frag, cls>, 3260 def K : BinaryRSY<mnemonic##"k", opcode2, null_frag, cls>,
2638 Requires<[FeatureDistinctOps]>; 3261 Requires<[FeatureDistinctOps]>;
2639 let NumOpsValue = "2", isConvertibleToThreeAddress = 1 in 3262 let NumOpsValue = "2", isConvertibleToThreeAddress = 1 in
2640 def "" : BinaryRS<mnemonic, opcode1, operator, cls>; 3263 def "" : BinaryRS<mnemonic, opcode1, operator, cls>;
2641 } 3264 }
3265 }
3266
3267 class BinaryRSL<string mnemonic, bits<16> opcode, RegisterOperand cls>
3268 : InstRSLb<opcode, (outs cls:$R1),
3269 (ins bdladdr12onlylen8:$BDL2, imm32zx4:$M3),
3270 mnemonic#"\t$R1, $BDL2, $M3", []> {
3271 let mayLoad = 1;
2642 } 3272 }
2643 3273
2644 class BinaryRX<string mnemonic, bits<8> opcode, SDPatternOperator operator, 3274 class BinaryRX<string mnemonic, bits<8> opcode, SDPatternOperator operator,
2645 RegisterOperand cls, SDPatternOperator load, bits<5> bytes, 3275 RegisterOperand cls, SDPatternOperator load, bits<5> bytes,
2646 AddressingMode mode = bdxaddr12only> 3276 AddressingMode mode = bdxaddr12only>
2666 let Constraints = "$R1 = $R1src"; 3296 let Constraints = "$R1 = $R1src";
2667 let DisableEncoding = "$R1src"; 3297 let DisableEncoding = "$R1src";
2668 let mayLoad = 1; 3298 let mayLoad = 1;
2669 let AccessBytes = bytes; 3299 let AccessBytes = bytes;
2670 let M3 = 0; 3300 let M3 = 0;
3301 }
3302
3303 class BinaryRXF<string mnemonic, bits<16> opcode, SDPatternOperator operator,
3304 RegisterOperand cls1, RegisterOperand cls2,
3305 SDPatternOperator load, bits<5> bytes>
3306 : InstRXF<opcode, (outs cls1:$R1), (ins cls2:$R3, bdxaddr12only:$XBD2),
3307 mnemonic#"\t$R1, $R3, $XBD2",
3308 [(set cls1:$R1, (operator cls2:$R3, (load bdxaddr12only:$XBD2)))]> {
3309 let OpKey = mnemonic#"r"#cls;
3310 let OpType = "mem";
3311 let mayLoad = 1;
3312 let AccessBytes = bytes;
2671 } 3313 }
2672 3314
2673 class BinaryRXY<string mnemonic, bits<16> opcode, SDPatternOperator operator, 3315 class BinaryRXY<string mnemonic, bits<16> opcode, SDPatternOperator operator,
2674 RegisterOperand cls, SDPatternOperator load, bits<5> bytes, 3316 RegisterOperand cls, SDPatternOperator load, bits<5> bytes,
2675 AddressingMode mode = bdxaddr20only> 3317 AddressingMode mode = bdxaddr20only>
2724 let DispSize = "20" in 3366 let DispSize = "20" in
2725 def Y : BinarySIY<mnemonic#"y", siyOpcode, operator, imm, bdaddr20pair>; 3367 def Y : BinarySIY<mnemonic#"y", siyOpcode, operator, imm, bdaddr20pair>;
2726 } 3368 }
2727 } 3369 }
2728 3370
3371 class BinarySSF<string mnemonic, bits<12> opcode, RegisterOperand cls>
3372 : InstSSF<opcode, (outs cls:$R3), (ins bdaddr12pair:$BD1, bdaddr12pair:$BD2),
3373 mnemonic#"\t$R3, $BD1, $BD2", []> {
3374 let mayLoad = 1;
3375 }
3376
2729 class BinaryVRIb<string mnemonic, bits<16> opcode, SDPatternOperator operator, 3377 class BinaryVRIb<string mnemonic, bits<16> opcode, SDPatternOperator operator,
2730 TypedReg tr, bits<4> type> 3378 TypedReg tr, bits<4> type>
2731 : InstVRIb<opcode, (outs tr.op:$V1), (ins imm32zx8:$I2, imm32zx8:$I3), 3379 : InstVRIb<opcode, (outs tr.op:$V1), (ins imm32zx8:$I2, imm32zx8:$I3),
2732 mnemonic#"\t$V1, $I2, $I3", 3380 mnemonic#"\t$V1, $I2, $I3",
2733 [(set tr.op:$V1, (tr.vt (operator imm32zx8:$I2, imm32zx8:$I3)))]> { 3381 [(set tr.op:$V1, (tr.vt (operator imm32zx8:$I2, imm32zx8:$I3)))]> {
2765 3413
2766 class BinaryVRIeFloatGeneric<string mnemonic, bits<16> opcode> 3414 class BinaryVRIeFloatGeneric<string mnemonic, bits<16> opcode>
2767 : InstVRIe<opcode, (outs VR128:$V1), 3415 : InstVRIe<opcode, (outs VR128:$V1),
2768 (ins VR128:$V2, imm32zx12:$I3, imm32zx4:$M4, imm32zx4:$M5), 3416 (ins VR128:$V2, imm32zx12:$I3, imm32zx4:$M4, imm32zx4:$M5),
2769 mnemonic#"\t$V1, $V2, $I3, $M4, $M5", []>; 3417 mnemonic#"\t$V1, $V2, $I3, $M4, $M5", []>;
3418
3419 class BinaryVRIh<string mnemonic, bits<16> opcode>
3420 : InstVRIh<opcode, (outs VR128:$V1),
3421 (ins imm32zx16:$I2, imm32zx4:$I3),
3422 mnemonic#"\t$V1, $I2, $I3", []>;
2770 3423
2771 class BinaryVRRa<string mnemonic, bits<16> opcode, SDPatternOperator operator, 3424 class BinaryVRRa<string mnemonic, bits<16> opcode, SDPatternOperator operator,
2772 TypedReg tr1, TypedReg tr2, bits<4> type = 0, bits<4> m4 = 0> 3425 TypedReg tr1, TypedReg tr2, bits<4> type = 0, bits<4> m4 = 0>
2773 : InstVRRa<opcode, (outs tr1.op:$V1), (ins tr2.op:$V2, imm32zx4:$M5), 3426 : InstVRRa<opcode, (outs tr1.op:$V1), (ins tr2.op:$V2, imm32zx4:$M5),
2774 mnemonic#"\t$V1, $V2, $M5", 3427 mnemonic#"\t$V1, $V2, $M5",
2894 TypedReg tr> 3547 TypedReg tr>
2895 : InstVRRf<opcode, (outs tr.op:$V1), (ins GR64:$R2, GR64:$R3), 3548 : InstVRRf<opcode, (outs tr.op:$V1), (ins GR64:$R2, GR64:$R3),
2896 mnemonic#"\t$V1, $R2, $R3", 3549 mnemonic#"\t$V1, $R2, $R3",
2897 [(set tr.op:$V1, (tr.vt (operator GR64:$R2, GR64:$R3)))]>; 3550 [(set tr.op:$V1, (tr.vt (operator GR64:$R2, GR64:$R3)))]>;
2898 3551
3552 class BinaryVRRi<string mnemonic, bits<16> opcode, RegisterOperand cls>
3553 : InstVRRi<opcode, (outs cls:$R1), (ins VR128:$V2, imm32zx4:$M3),
3554 mnemonic#"\t$R1, $V2, $M3", []>;
3555
2899 class BinaryVRSa<string mnemonic, bits<16> opcode, SDPatternOperator operator, 3556 class BinaryVRSa<string mnemonic, bits<16> opcode, SDPatternOperator operator,
2900 TypedReg tr1, TypedReg tr2, bits<4> type> 3557 TypedReg tr1, TypedReg tr2, bits<4> type>
2901 : InstVRSa<opcode, (outs tr1.op:$V1), (ins tr2.op:$V3, shift12only:$BD2), 3558 : InstVRSa<opcode, (outs tr1.op:$V1), (ins tr2.op:$V3, shift12only:$BD2),
2902 mnemonic#"\t$V1, $V3, $BD2", 3559 mnemonic#"\t$V1, $V3, $BD2",
2903 [(set tr1.op:$V1, (tr1.vt (operator (tr2.vt tr2.op:$V3), 3560 [(set tr1.op:$V1, (tr1.vt (operator (tr2.vt tr2.op:$V3),
2931 class BinaryVRScGeneric<string mnemonic, bits<16> opcode> 3588 class BinaryVRScGeneric<string mnemonic, bits<16> opcode>
2932 : InstVRSc<opcode, (outs GR64:$R1), 3589 : InstVRSc<opcode, (outs GR64:$R1),
2933 (ins VR128:$V3, shift12only:$BD2, imm32zx4: $M4), 3590 (ins VR128:$V3, shift12only:$BD2, imm32zx4: $M4),
2934 mnemonic#"\t$R1, $V3, $BD2, $M4", []>; 3591 mnemonic#"\t$R1, $V3, $BD2, $M4", []>;
2935 3592
3593 class BinaryVRSd<string mnemonic, bits<16> opcode, SDPatternOperator operator,
3594 bits<5> bytes>
3595 : InstVRSd<opcode, (outs VR128:$V1), (ins GR32:$R3, bdaddr12only:$BD2),
3596 mnemonic#"\t$V1, $R3, $BD2",
3597 [(set VR128:$V1, (operator GR32:$R3, bdaddr12only:$BD2))]> {
3598 let mayLoad = 1;
3599 let AccessBytes = bytes;
3600 }
3601
2936 class BinaryVRX<string mnemonic, bits<16> opcode, SDPatternOperator operator, 3602 class BinaryVRX<string mnemonic, bits<16> opcode, SDPatternOperator operator,
2937 TypedReg tr, bits<5> bytes> 3603 TypedReg tr, bits<5> bytes>
2938 : InstVRX<opcode, (outs VR128:$V1), (ins bdxaddr12only:$XBD2, imm32zx4:$M3), 3604 : InstVRX<opcode, (outs VR128:$V1), (ins bdxaddr12only:$XBD2, imm32zx4:$M3),
2939 mnemonic#"\t$V1, $XBD2, $M3", 3605 mnemonic#"\t$V1, $XBD2, $M3",
2940 [(set tr.op:$V1, (tr.vt (operator bdxaddr12only:$XBD2, 3606 [(set tr.op:$V1, (tr.vt (operator bdxaddr12only:$XBD2,
2941 imm32zx4:$M3)))]> { 3607 imm32zx4:$M3)))]> {
3608 let mayLoad = 1;
3609 let AccessBytes = bytes;
3610 }
3611
3612 class StoreBinaryRS<string mnemonic, bits<8> opcode, RegisterOperand cls,
3613 bits<5> bytes, AddressingMode mode = bdaddr12only>
3614 : InstRSb<opcode, (outs), (ins cls:$R1, imm32zx4:$M3, mode:$BD2),
3615 mnemonic#"\t$R1, $M3, $BD2", []> {
3616 let mayStore = 1;
3617 let AccessBytes = bytes;
3618 }
3619
3620 class StoreBinaryRSY<string mnemonic, bits<16> opcode, RegisterOperand cls,
3621 bits<5> bytes, AddressingMode mode = bdaddr20only>
3622 : InstRSYb<opcode, (outs), (ins cls:$R1, imm32zx4:$M3, mode:$BD2),
3623 mnemonic#"\t$R1, $M3, $BD2", []> {
3624 let mayStore = 1;
3625 let AccessBytes = bytes;
3626 }
3627
3628 multiclass StoreBinaryRSPair<string mnemonic, bits<8> rsOpcode,
3629 bits<16> rsyOpcode, RegisterOperand cls,
3630 bits<5> bytes> {
3631 let DispKey = mnemonic ## #cls in {
3632 let DispSize = "12" in
3633 def "" : StoreBinaryRS<mnemonic, rsOpcode, cls, bytes, bdaddr12pair>;
3634 let DispSize = "20" in
3635 def Y : StoreBinaryRSY<mnemonic#"y", rsyOpcode, cls, bytes,
3636 bdaddr20pair>;
3637 }
3638 }
3639
3640 class StoreBinaryRSL<string mnemonic, bits<16> opcode, RegisterOperand cls>
3641 : InstRSLb<opcode, (outs),
3642 (ins cls:$R1, bdladdr12onlylen8:$BDL2, imm32zx4:$M3),
3643 mnemonic#"\t$R1, $BDL2, $M3", []> {
3644 let mayStore = 1;
3645 }
3646
3647 class BinaryVSI<string mnemonic, bits<16> opcode, SDPatternOperator operator,
3648 bits<5> bytes>
3649 : InstVSI<opcode, (outs VR128:$V1), (ins bdaddr12only:$BD2, imm32zx8:$I3),
3650 mnemonic#"\t$V1, $BD2, $I3",
3651 [(set VR128:$V1, (operator imm32zx8:$I3, bdaddr12only:$BD2))]> {
2942 let mayLoad = 1; 3652 let mayLoad = 1;
2943 let AccessBytes = bytes; 3653 let AccessBytes = bytes;
2944 } 3654 }
2945 3655
2946 class StoreBinaryVRV<string mnemonic, bits<16> opcode, bits<5> bytes, 3656 class StoreBinaryVRV<string mnemonic, bits<16> opcode, bits<5> bytes,
3066 def Y : CompareRXY<mnemonic#"y", rxyOpcode, operator, cls, 3776 def Y : CompareRXY<mnemonic#"y", rxyOpcode, operator, cls,
3067 load, bytes, bdxaddr20pair>; 3777 load, bytes, bdxaddr20pair>;
3068 } 3778 }
3069 } 3779 }
3070 3780
3781 class CompareRS<string mnemonic, bits<8> opcode, RegisterOperand cls,
3782 bits<5> bytes, AddressingMode mode = bdaddr12only>
3783 : InstRSb<opcode, (outs), (ins cls:$R1, imm32zx4:$M3, mode:$BD2),
3784 mnemonic#"\t$R1, $M3, $BD2", []> {
3785 let mayLoad = 1;
3786 let AccessBytes = bytes;
3787 }
3788
3789 class CompareRSY<string mnemonic, bits<16> opcode, RegisterOperand cls,
3790 bits<5> bytes, AddressingMode mode = bdaddr20only>
3791 : InstRSYb<opcode, (outs), (ins cls:$R1, imm32zx4:$M3, mode:$BD2),
3792 mnemonic#"\t$R1, $M3, $BD2", []> {
3793 let mayLoad = 1;
3794 let AccessBytes = bytes;
3795 }
3796
3797 multiclass CompareRSPair<string mnemonic, bits<8> rsOpcode, bits<16> rsyOpcode,
3798 RegisterOperand cls, bits<5> bytes> {
3799 let DispKey = mnemonic ## #cls in {
3800 let DispSize = "12" in
3801 def "" : CompareRS<mnemonic, rsOpcode, cls, bytes, bdaddr12pair>;
3802 let DispSize = "20" in
3803 def Y : CompareRSY<mnemonic#"y", rsyOpcode, cls, bytes, bdaddr20pair>;
3804 }
3805 }
3806
3807 class CompareSSb<string mnemonic, bits<8> opcode>
3808 : InstSSb<opcode,
3809 (outs), (ins bdladdr12onlylen4:$BDL1, bdladdr12onlylen4:$BDL2),
3810 mnemonic##"\t$BDL1, $BDL2", []> {
3811 let isCompare = 1;
3812 let mayLoad = 1;
3813 }
3814
3071 class CompareSI<string mnemonic, bits<8> opcode, SDPatternOperator operator, 3815 class CompareSI<string mnemonic, bits<8> opcode, SDPatternOperator operator,
3072 SDPatternOperator load, Immediate imm, 3816 SDPatternOperator load, Immediate imm,
3073 AddressingMode mode = bdaddr12only> 3817 AddressingMode mode = bdaddr12only>
3074 : InstSI<opcode, (outs), (ins mode:$BD1, imm:$I2), 3818 : InstSI<opcode, (outs), (ins mode:$BD1, imm:$I2),
3075 mnemonic#"\t$BD1, $I2", 3819 mnemonic#"\t$BD1, $I2",
3134 mnemonic#"\t$V1, $V2, $M3, $M4", []> { 3878 mnemonic#"\t$V1, $V2, $M3, $M4", []> {
3135 let isCompare = 1; 3879 let isCompare = 1;
3136 let M5 = 0; 3880 let M5 = 0;
3137 } 3881 }
3138 3882
3883 class CompareVRRh<string mnemonic, bits<16> opcode>
3884 : InstVRRh<opcode, (outs), (ins VR128:$V1, VR128:$V2, imm32zx4:$M3),
3885 mnemonic#"\t$V1, $V2, $M3", []> {
3886 let isCompare = 1;
3887 }
3888
3139 class TestRXE<string mnemonic, bits<16> opcode, SDPatternOperator operator, 3889 class TestRXE<string mnemonic, bits<16> opcode, SDPatternOperator operator,
3140 RegisterOperand cls> 3890 RegisterOperand cls>
3141 : InstRXE<opcode, (outs), (ins cls:$R1, bdxaddr12only:$XBD2), 3891 : InstRXE<opcode, (outs), (ins cls:$R1, bdxaddr12only:$XBD2),
3142 mnemonic#"\t$R1, $XBD2", 3892 mnemonic#"\t$R1, $XBD2",
3143 [(operator cls:$R1, bdxaddr12only:$XBD2)]> { 3893 [(operator cls:$R1, bdxaddr12only:$XBD2)]> {
3144 let M3 = 0; 3894 let M3 = 0;
3145 } 3895 }
3146 3896
3897 class TestRSL<string mnemonic, bits<16> opcode>
3898 : InstRSLa<opcode, (outs), (ins bdladdr12onlylen4:$BDL1),
3899 mnemonic#"\t$BDL1", []> {
3900 let mayLoad = 1;
3901 }
3902
3903 class TestVRRg<string mnemonic, bits<16> opcode>
3904 : InstVRRg<opcode, (outs), (ins VR128:$V1),
3905 mnemonic#"\t$V1", []>;
3906
3907 class SideEffectTernarySSc<string mnemonic, bits<8> opcode>
3908 : InstSSc<opcode, (outs), (ins bdladdr12onlylen4:$BDL1,
3909 shift12only:$BD2, imm32zx4:$I3),
3910 mnemonic##"\t$BDL1, $BD2, $I3", []>;
3911
3912 class SideEffectTernaryRRFa<string mnemonic, bits<16> opcode,
3913 RegisterOperand cls1, RegisterOperand cls2,
3914 RegisterOperand cls3>
3915 : InstRRFa<opcode, (outs), (ins cls1:$R1, cls2:$R2, cls3:$R3),
3916 mnemonic#"\t$R1, $R2, $R3", []> {
3917 let M4 = 0;
3918 }
3919
3920 class SideEffectTernaryRRFb<string mnemonic, bits<16> opcode,
3921 RegisterOperand cls1, RegisterOperand cls2,
3922 RegisterOperand cls3>
3923 : InstRRFb<opcode, (outs), (ins cls1:$R1, cls2:$R2, cls3:$R3),
3924 mnemonic#"\t$R1, $R3, $R2", []> {
3925 let M4 = 0;
3926 }
3927
3928 class SideEffectTernaryMemMemMemRRFb<string mnemonic, bits<16> opcode,
3929 RegisterOperand cls1,
3930 RegisterOperand cls2,
3931 RegisterOperand cls3>
3932 : InstRRFb<opcode, (outs cls1:$R1, cls2:$R2, cls3:$R3),
3933 (ins cls1:$R1src, cls2:$R2src, cls3:$R3src),
3934 mnemonic#"\t$R1, $R3, $R2", []> {
3935 let Constraints = "$R1 = $R1src, $R2 = $R2src, $R3 = $R3src";
3936 let DisableEncoding = "$R1src, $R2src, $R3src";
3937 let M4 = 0;
3938 }
3939
3147 class SideEffectTernaryRRFc<string mnemonic, bits<16> opcode, 3940 class SideEffectTernaryRRFc<string mnemonic, bits<16> opcode,
3148 RegisterOperand cls1, RegisterOperand cls2, 3941 RegisterOperand cls1, RegisterOperand cls2,
3149 Immediate imm> 3942 Immediate imm>
3150 : InstRRFc<opcode, (outs), (ins cls1:$R1, cls2:$R2, imm:$M3), 3943 : InstRRFc<opcode, (outs), (ins cls1:$R1, cls2:$R2, imm:$M3),
3944 mnemonic#"\t$R1, $R2, $M3", []>;
3945
3946 multiclass SideEffectTernaryRRFcOpt<string mnemonic, bits<16> opcode,
3947 RegisterOperand cls1,
3948 RegisterOperand cls2> {
3949 def "" : SideEffectTernaryRRFc<mnemonic, opcode, cls1, cls2, imm32zx4>;
3950 def Opt : SideEffectBinaryRRFc<mnemonic, opcode, cls1, cls2>;
3951 }
3952
3953 class SideEffectTernaryMemMemRRFc<string mnemonic, bits<16> opcode,
3954 RegisterOperand cls1, RegisterOperand cls2,
3955 Immediate imm>
3956 : InstRRFc<opcode, (outs cls1:$R1, cls2:$R2),
3957 (ins cls1:$R1src, cls2:$R2src, imm:$M3),
3151 mnemonic#"\t$R1, $R2, $M3", []> { 3958 mnemonic#"\t$R1, $R2, $M3", []> {
3152 let hasSideEffects = 1; 3959 let Constraints = "$R1 = $R1src, $R2 = $R2src";
3960 let DisableEncoding = "$R1src, $R2src";
3961 }
3962
3963 multiclass SideEffectTernaryMemMemRRFcOpt<string mnemonic, bits<16> opcode,
3964 RegisterOperand cls1,
3965 RegisterOperand cls2> {
3966 def "" : SideEffectTernaryMemMemRRFc<mnemonic, opcode, cls1, cls2, imm32zx4>;
3967 def Opt : SideEffectBinaryMemMemRRFc<mnemonic, opcode, cls1, cls2>;
3153 } 3968 }
3154 3969
3155 class SideEffectTernarySSF<string mnemonic, bits<12> opcode, 3970 class SideEffectTernarySSF<string mnemonic, bits<12> opcode,
3156 RegisterOperand cls> 3971 RegisterOperand cls>
3157 : InstSSF<opcode, (outs), 3972 : InstSSF<opcode, (outs),
3158 (ins bdaddr12only:$BD1, bdaddr12only:$BD2, cls:$R3), 3973 (ins bdaddr12only:$BD1, bdaddr12only:$BD2, cls:$R3),
3159 mnemonic#"\t$BD1, $BD2, $R3", []> { 3974 mnemonic#"\t$BD1, $BD2, $R3", []>;
3160 let hasSideEffects = 1; 3975
3976 class TernaryRRFa<string mnemonic, bits<16> opcode,
3977 RegisterOperand cls1, RegisterOperand cls2,
3978 RegisterOperand cls3>
3979 : InstRRFa<opcode, (outs cls1:$R1), (ins cls2:$R2, cls3:$R3, imm32zx4:$M4),
3980 mnemonic#"\t$R1, $R2, $R3, $M4", []>;
3981
3982 class TernaryRRFb<string mnemonic, bits<16> opcode,
3983 RegisterOperand cls1, RegisterOperand cls2,
3984 RegisterOperand cls3>
3985 : InstRRFb<opcode, (outs cls1:$R1, cls3:$R3),
3986 (ins cls1:$R1src, cls2:$R2, imm32zx4:$M4),
3987 mnemonic#"\t$R1, $R3, $R2, $M4", []> {
3988 let Constraints = "$R1 = $R1src";
3989 let DisableEncoding = "$R1src";
3161 } 3990 }
3162 3991
3163 class TernaryRRFe<string mnemonic, bits<16> opcode, RegisterOperand cls1, 3992 class TernaryRRFe<string mnemonic, bits<16> opcode, RegisterOperand cls1,
3164 RegisterOperand cls2> 3993 RegisterOperand cls2>
3165 : InstRRFe<opcode, (outs cls1:$R1), 3994 : InstRRFe<opcode, (outs cls1:$R1),
3166 (ins imm32zx4:$M3, cls2:$R2, imm32zx4:$M4), 3995 (ins imm32zx4:$M3, cls2:$R2, imm32zx4:$M4),
3167 mnemonic#"\t$R1, $M3, $R2, $M4", []>; 3996 mnemonic#"\t$R1, $M3, $R2, $M4", []>;
3168 3997
3169 class TernaryRRD<string mnemonic, bits<16> opcode, 3998 class TernaryRRD<string mnemonic, bits<16> opcode, SDPatternOperator operator,
3170 SDPatternOperator operator, RegisterOperand cls> 3999 RegisterOperand cls1, RegisterOperand cls2>
3171 : InstRRD<opcode, (outs cls:$R1), (ins cls:$R1src, cls:$R3, cls:$R2), 4000 : InstRRD<opcode, (outs cls1:$R1), (ins cls2:$R1src, cls2:$R3, cls2:$R2),
3172 mnemonic#"\t$R1, $R3, $R2", 4001 mnemonic#"\t$R1, $R3, $R2",
3173 [(set cls:$R1, (operator cls:$R1src, cls:$R3, cls:$R2))]> { 4002 [(set cls1:$R1, (operator cls2:$R1src, cls2:$R3, cls2:$R2))]> {
3174 let OpKey = mnemonic#cls; 4003 let OpKey = mnemonic#cls;
3175 let OpType = "reg"; 4004 let OpType = "reg";
3176 let Constraints = "$R1 = $R1src"; 4005 let Constraints = "$R1 = $R1src";
3177 let DisableEncoding = "$R1src"; 4006 let DisableEncoding = "$R1src";
3178 } 4007 }
3209 let DispSize = "20" in 4038 let DispSize = "20" in
3210 def Y : TernaryRSY<mnemonic#"y", rsyOpcode, cls, bytes, bdaddr20pair>; 4039 def Y : TernaryRSY<mnemonic#"y", rsyOpcode, cls, bytes, bdaddr20pair>;
3211 } 4040 }
3212 } 4041 }
3213 4042
4043 class SideEffectTernaryRS<string mnemonic, bits<8> opcode,
4044 RegisterOperand cls1, RegisterOperand cls2>
4045 : InstRSa<opcode, (outs),
4046 (ins cls1:$R1, cls2:$R3, bdaddr12only:$BD2),
4047 mnemonic#"\t$R1, $R3, $BD2", []>;
4048
4049 class SideEffectTernaryRSY<string mnemonic, bits<16> opcode,
4050 RegisterOperand cls1, RegisterOperand cls2>
4051 : InstRSYa<opcode, (outs),
4052 (ins cls1:$R1, cls2:$R3, bdaddr20only:$BD2),
4053 mnemonic#"\t$R1, $R3, $BD2", []>;
4054
4055 class SideEffectTernaryMemMemRS<string mnemonic, bits<8> opcode,
4056 RegisterOperand cls1, RegisterOperand cls2>
4057 : InstRSa<opcode, (outs cls1:$R1, cls2:$R3),
4058 (ins cls1:$R1src, cls2:$R3src, shift12only:$BD2),
4059 mnemonic#"\t$R1, $R3, $BD2", []> {
4060 let Constraints = "$R1 = $R1src, $R3 = $R3src";
4061 let DisableEncoding = "$R1src, $R3src";
4062 }
4063
4064 class SideEffectTernaryMemMemRSY<string mnemonic, bits<16> opcode,
4065 RegisterOperand cls1, RegisterOperand cls2>
4066 : InstRSYa<opcode, (outs cls1:$R1, cls2:$R3),
4067 (ins cls1:$R1src, cls2:$R3src, shift20only:$BD2),
4068 mnemonic#"\t$R1, $R3, $BD2", []> {
4069 let Constraints = "$R1 = $R1src, $R3 = $R3src";
4070 let DisableEncoding = "$R1src, $R3src";
4071 }
4072
3214 class TernaryRXF<string mnemonic, bits<16> opcode, SDPatternOperator operator, 4073 class TernaryRXF<string mnemonic, bits<16> opcode, SDPatternOperator operator,
3215 RegisterOperand cls, SDPatternOperator load, bits<5> bytes> 4074 RegisterOperand cls1, RegisterOperand cls2,
3216 : InstRXF<opcode, (outs cls:$R1), 4075 SDPatternOperator load, bits<5> bytes>
3217 (ins cls:$R1src, cls:$R3, bdxaddr12only:$XBD2), 4076 : InstRXF<opcode, (outs cls1:$R1),
4077 (ins cls2:$R1src, cls2:$R3, bdxaddr12only:$XBD2),
3218 mnemonic#"\t$R1, $R3, $XBD2", 4078 mnemonic#"\t$R1, $R3, $XBD2",
3219 [(set cls:$R1, (operator cls:$R1src, cls:$R3, 4079 [(set cls1:$R1, (operator cls2:$R1src, cls2:$R3,
3220 (load bdxaddr12only:$XBD2)))]> { 4080 (load bdxaddr12only:$XBD2)))]> {
3221 let OpKey = mnemonic#"r"#cls; 4081 let OpKey = mnemonic#"r"#cls;
3222 let OpType = "mem"; 4082 let OpType = "mem";
3223 let Constraints = "$R1 = $R1src"; 4083 let Constraints = "$R1 = $R1src";
3224 let DisableEncoding = "$R1src"; 4084 let DisableEncoding = "$R1src";
3225 let mayLoad = 1; 4085 let mayLoad = 1;
3244 [(set tr1.op:$V1, (tr1.vt (operator (tr2.vt tr2.op:$V2), 4104 [(set tr1.op:$V1, (tr1.vt (operator (tr2.vt tr2.op:$V2),
3245 (tr2.vt tr2.op:$V3), 4105 (tr2.vt tr2.op:$V3),
3246 imm32zx8:$I4)))]> { 4106 imm32zx8:$I4)))]> {
3247 let M5 = type; 4107 let M5 = type;
3248 } 4108 }
4109
4110 class TernaryVRIi<string mnemonic, bits<16> opcode, RegisterOperand cls>
4111 : InstVRIi<opcode, (outs VR128:$V1),
4112 (ins cls:$R2, imm32zx8:$I3, imm32zx4:$M4),
4113 mnemonic#"\t$V1, $R2, $I3, $M4", []>;
3249 4114
3250 class TernaryVRRa<string mnemonic, bits<16> opcode, SDPatternOperator operator, 4115 class TernaryVRRa<string mnemonic, bits<16> opcode, SDPatternOperator operator,
3251 TypedReg tr1, TypedReg tr2, bits<4> type, bits<4> m4or> 4116 TypedReg tr1, TypedReg tr2, bits<4> type, bits<4> m4or>
3252 : InstVRRa<opcode, (outs tr1.op:$V1), 4117 : InstVRRa<opcode, (outs tr1.op:$V1),
3253 (ins tr2.op:$V2, imm32zx4:$M4, imm32zx4:$M5), 4118 (ins tr2.op:$V2, imm32zx4:$M4, imm32zx4:$M5),
3317 imm32zx4:$M4)))]> { 4182 imm32zx4:$M4)))]> {
3318 let M5 = 0; 4183 let M5 = 0;
3319 let M6 = 0; 4184 let M6 = 0;
3320 } 4185 }
3321 4186
4187 class TernaryVRRcFloat<string mnemonic, bits<16> opcode,
4188 SDPatternOperator operator, TypedReg tr1, TypedReg tr2,
4189 bits<4> type = 0, bits<4> m5 = 0>
4190 : InstVRRc<opcode, (outs tr1.op:$V1),
4191 (ins tr2.op:$V2, tr2.op:$V3, imm32zx4:$M6),
4192 mnemonic#"\t$V1, $V2, $V3, $M6",
4193 [(set tr1.op:$V1, (tr1.vt (operator (tr2.vt tr2.op:$V2),
4194 (tr2.vt tr2.op:$V3),
4195 imm32zx4:$M6)))]> {
4196 let M4 = type;
4197 let M5 = m5;
4198 }
4199
4200 class TernaryVRRcFloatGeneric<string mnemonic, bits<16> opcode>
4201 : InstVRRc<opcode, (outs VR128:$V1),
4202 (ins VR128:$V2, VR128:$V3, imm32zx4:$M4, imm32zx4:$M5,
4203 imm32zx4:$M6),
4204 mnemonic#"\t$V1, $V2, $V3, $M4, $M5, $M6", []>;
4205
3322 class TernaryVRRd<string mnemonic, bits<16> opcode, SDPatternOperator operator, 4206 class TernaryVRRd<string mnemonic, bits<16> opcode, SDPatternOperator operator,
3323 TypedReg tr1, TypedReg tr2, bits<4> type = 0> 4207 TypedReg tr1, TypedReg tr2, bits<4> type = 0>
3324 : InstVRRd<opcode, (outs tr1.op:$V1), 4208 : InstVRRd<opcode, (outs tr1.op:$V1),
3325 (ins tr2.op:$V2, tr2.op:$V3, tr1.op:$V4), 4209 (ins tr2.op:$V2, tr2.op:$V3, tr1.op:$V4),
3326 mnemonic#"\t$V1, $V2, $V3, $V4", 4210 mnemonic#"\t$V1, $V2, $V3, $V4",
3422 mnemonic#"\t$V1, $V2, $V3, $I4, $M5", []> { 4306 mnemonic#"\t$V1, $V2, $V3, $I4, $M5", []> {
3423 let Constraints = "$V1 = $V1src"; 4307 let Constraints = "$V1 = $V1src";
3424 let DisableEncoding = "$V1src"; 4308 let DisableEncoding = "$V1src";
3425 } 4309 }
3426 4310
4311 class QuaternaryVRIf<string mnemonic, bits<16> opcode>
4312 : InstVRIf<opcode, (outs VR128:$V1),
4313 (ins VR128:$V2, VR128:$V3,
4314 imm32zx8:$I4, imm32zx4:$M5),
4315 mnemonic#"\t$V1, $V2, $V3, $I4, $M5", []>;
4316
4317 class QuaternaryVRIg<string mnemonic, bits<16> opcode>
4318 : InstVRIg<opcode, (outs VR128:$V1),
4319 (ins VR128:$V2, imm32zx8:$I3,
4320 imm32zx8:$I4, imm32zx4:$M5),
4321 mnemonic#"\t$V1, $V2, $I3, $I4, $M5", []>;
4322
3427 class QuaternaryVRRd<string mnemonic, bits<16> opcode, 4323 class QuaternaryVRRd<string mnemonic, bits<16> opcode,
3428 SDPatternOperator operator, TypedReg tr1, TypedReg tr2, 4324 SDPatternOperator operator, TypedReg tr1, TypedReg tr2,
3429 bits<4> type, SDPatternOperator m6mask, bits<4> m6or> 4325 TypedReg tr3, TypedReg tr4, bits<4> type,
4326 SDPatternOperator m6mask = imm32zx4, bits<4> m6or = 0>
3430 : InstVRRd<opcode, (outs tr1.op:$V1), 4327 : InstVRRd<opcode, (outs tr1.op:$V1),
3431 (ins tr2.op:$V2, tr2.op:$V3, tr2.op:$V4, m6mask:$M6), 4328 (ins tr2.op:$V2, tr3.op:$V3, tr4.op:$V4, m6mask:$M6),
3432 mnemonic#"\t$V1, $V2, $V3, $V4, $M6", 4329 mnemonic#"\t$V1, $V2, $V3, $V4, $M6",
3433 [(set tr1.op:$V1, (tr1.vt (operator (tr2.vt tr2.op:$V2), 4330 [(set tr1.op:$V1, (tr1.vt (operator (tr2.vt tr2.op:$V2),
3434 (tr2.vt tr2.op:$V3), 4331 (tr3.vt tr3.op:$V3),
3435 (tr2.vt tr2.op:$V4), 4332 (tr4.vt tr4.op:$V4),
3436 m6mask:$M6)))], 4333 m6mask:$M6)))],
3437 m6or> { 4334 m6or> {
3438 let M5 = type; 4335 let M5 = type;
3439 } 4336 }
4337
4338 class QuaternaryVRRdGeneric<string mnemonic, bits<16> opcode>
4339 : InstVRRd<opcode, (outs VR128:$V1),
4340 (ins VR128:$V2, VR128:$V3, VR128:$V4, imm32zx4:$M5, imm32zx4:$M6),
4341 mnemonic#"\t$V1, $V2, $V3, $V4, $M5, $M6", []>;
3440 4342
3441 // Declare a pair of instructions, one which sets CC and one which doesn't. 4343 // Declare a pair of instructions, one which sets CC and one which doesn't.
3442 // The CC-setting form ends with "S" and sets the low bit of M6. 4344 // The CC-setting form ends with "S" and sets the low bit of M6.
3443 // Also create aliases to make use of M6 operand optional in assembler. 4345 // Also create aliases to make use of M6 operand optional in assembler.
3444 multiclass QuaternaryOptVRRdSPair<string mnemonic, bits<16> opcode, 4346 multiclass QuaternaryOptVRRdSPair<string mnemonic, bits<16> opcode,
3445 SDPatternOperator operator, 4347 SDPatternOperator operator,
3446 SDPatternOperator operator_cc, 4348 SDPatternOperator operator_cc,
3447 TypedReg tr1, TypedReg tr2, bits<4> type, 4349 TypedReg tr1, TypedReg tr2, bits<4> type,
3448 bits<4> modifier = 0> { 4350 bits<4> modifier = 0> {
3449 def "" : QuaternaryVRRd<mnemonic, opcode, operator, tr1, tr2, type, 4351 def "" : QuaternaryVRRd<mnemonic, opcode, operator,
4352 tr1, tr2, tr2, tr2, type,
3450 imm32zx4even, !and (modifier, 14)>; 4353 imm32zx4even, !and (modifier, 14)>;
3451 def : InstAlias<mnemonic#"\t$V1, $V2, $V3, $V4", 4354 def : InstAlias<mnemonic#"\t$V1, $V2, $V3, $V4",
3452 (!cast<Instruction>(NAME) tr1.op:$V1, tr2.op:$V2, 4355 (!cast<Instruction>(NAME) tr1.op:$V1, tr2.op:$V2,
3453 tr2.op:$V3, tr2.op:$V4, 0)>; 4356 tr2.op:$V3, tr2.op:$V4, 0)>;
3454 let Defs = [CC] in 4357 let Defs = [CC] in
3455 def S : QuaternaryVRRd<mnemonic##"s", opcode, operator_cc, tr1, tr2, type, 4358 def S : QuaternaryVRRd<mnemonic##"s", opcode, operator_cc,
4359 tr1, tr2, tr2, tr2, type,
3456 imm32zx4even, !add (!and (modifier, 14), 1)>; 4360 imm32zx4even, !add (!and (modifier, 14), 1)>;
3457 def : InstAlias<mnemonic#"s\t$V1, $V2, $V3, $V4", 4361 def : InstAlias<mnemonic#"s\t$V1, $V2, $V3, $V4",
3458 (!cast<Instruction>(NAME#"S") tr1.op:$V1, tr2.op:$V2, 4362 (!cast<Instruction>(NAME#"S") tr1.op:$V1, tr2.op:$V2,
3459 tr2.op:$V3, tr2.op:$V4, 0)>; 4363 tr2.op:$V3, tr2.op:$V4, 0)>;
3460 } 4364 }
3461 4365
3462 multiclass QuaternaryOptVRRdSPairGeneric<string mnemonic, bits<16> opcode> { 4366 multiclass QuaternaryOptVRRdSPairGeneric<string mnemonic, bits<16> opcode> {
3463 def "" : InstVRRd<opcode, (outs VR128:$V1), 4367 def "" : QuaternaryVRRdGeneric<mnemonic, opcode>;
3464 (ins VR128:$V2, VR128:$V3, VR128:$V4,
3465 imm32zx4:$M5, imm32zx4:$M6),
3466 mnemonic#"\t$V1, $V2, $V3, $V4, $M5, $M6", []>;
3467 def : InstAlias<mnemonic#"\t$V1, $V2, $V3, $V4, $M5", 4368 def : InstAlias<mnemonic#"\t$V1, $V2, $V3, $V4, $M5",
3468 (!cast<Instruction>(NAME) VR128:$V1, VR128:$V2, VR128:$V3, 4369 (!cast<Instruction>(NAME) VR128:$V1, VR128:$V2, VR128:$V3,
3469 VR128:$V4, imm32zx4:$M5, 0)>; 4370 VR128:$V4, imm32zx4:$M5, 0)>;
3470 } 4371 }
4372
4373 class SideEffectQuaternaryRRFa<string mnemonic, bits<16> opcode,
4374 RegisterOperand cls1, RegisterOperand cls2,
4375 RegisterOperand cls3>
4376 : InstRRFa<opcode, (outs), (ins cls1:$R1, cls2:$R2, cls3:$R3, imm32zx4:$M4),
4377 mnemonic#"\t$R1, $R2, $R3, $M4", []>;
4378
4379 multiclass SideEffectQuaternaryRRFaOptOpt<string mnemonic, bits<16> opcode,
4380 RegisterOperand cls1,
4381 RegisterOperand cls2,
4382 RegisterOperand cls3> {
4383 def "" : SideEffectQuaternaryRRFa<mnemonic, opcode, cls1, cls2, cls3>;
4384 def Opt : SideEffectTernaryRRFa<mnemonic, opcode, cls1, cls2, cls3>;
4385 def OptOpt : SideEffectBinaryRRFa<mnemonic, opcode, cls1, cls2>;
4386 }
4387
4388 class SideEffectQuaternaryRRFb<string mnemonic, bits<16> opcode,
4389 RegisterOperand cls1, RegisterOperand cls2,
4390 RegisterOperand cls3>
4391 : InstRRFb<opcode, (outs), (ins cls1:$R1, cls2:$R2, cls3:$R3, imm32zx4:$M4),
4392 mnemonic#"\t$R1, $R3, $R2, $M4", []>;
4393
4394 multiclass SideEffectQuaternaryRRFbOpt<string mnemonic, bits<16> opcode,
4395 RegisterOperand cls1,
4396 RegisterOperand cls2,
4397 RegisterOperand cls3> {
4398 def "" : SideEffectQuaternaryRRFb<mnemonic, opcode, cls1, cls2, cls3>;
4399 def Opt : SideEffectTernaryRRFb<mnemonic, opcode, cls1, cls2, cls3>;
4400 }
4401
4402 class SideEffectQuaternarySSe<string mnemonic, bits<8> opcode,
4403 RegisterOperand cls>
4404 : InstSSe<opcode, (outs),
4405 (ins cls:$R1, bdaddr12only:$BD2, cls:$R3, bdaddr12only:$BD4),
4406 mnemonic#"\t$R1, $BD2, $R3, $BD4", []>;
3471 4407
3472 class LoadAndOpRSY<string mnemonic, bits<16> opcode, SDPatternOperator operator, 4408 class LoadAndOpRSY<string mnemonic, bits<16> opcode, SDPatternOperator operator,
3473 RegisterOperand cls, AddressingMode mode = bdaddr20only> 4409 RegisterOperand cls, AddressingMode mode = bdaddr20only>
3474 : InstRSYa<opcode, (outs cls:$R1), (ins cls:$R3, mode:$BD2), 4410 : InstRSYa<opcode, (outs cls:$R1), (ins cls:$R3, mode:$BD2),
3475 mnemonic#"\t$R1, $R3, $BD2", 4411 mnemonic#"\t$R1, $R3, $BD2",
3476 [(set cls:$R1, (operator mode:$BD2, cls:$R3))]> { 4412 [(set cls:$R1, (operator mode:$BD2, cls:$R3))]> {
4413 let mayLoad = 1;
4414 let mayStore = 1;
4415 }
4416
4417 class CmpSwapRRE<string mnemonic, bits<16> opcode,
4418 RegisterOperand cls1, RegisterOperand cls2>
4419 : InstRRE<opcode, (outs cls1:$R1), (ins cls1:$R1src, cls2:$R2),
4420 mnemonic#"\t$R1, $R2", []> {
4421 let Constraints = "$R1 = $R1src";
4422 let DisableEncoding = "$R1src";
3477 let mayLoad = 1; 4423 let mayLoad = 1;
3478 let mayStore = 1; 4424 let mayStore = 1;
3479 } 4425 }
3480 4426
3481 class CmpSwapRS<string mnemonic, bits<8> opcode, SDPatternOperator operator, 4427 class CmpSwapRS<string mnemonic, bits<8> opcode, SDPatternOperator operator,
3533 // We want PC-relative addresses to be tried ahead of BD and BDX addresses. 4479 // We want PC-relative addresses to be tried ahead of BD and BDX addresses.
3534 // However, BDXs have two extra operands and are therefore 6 units more 4480 // However, BDXs have two extra operands and are therefore 6 units more
3535 // complex. 4481 // complex.
3536 let AddedComplexity = 7; 4482 let AddedComplexity = 7;
3537 } 4483 }
4484
4485 class BranchPreloadSMI<string mnemonic, bits<8> opcode>
4486 : InstSMI<opcode, (outs),
4487 (ins imm32zx4:$M1, brtarget16bpp:$RI2, bdxaddr12only:$BD3),
4488 mnemonic#"\t$M1, $RI2, $BD3", []>;
4489
4490 class BranchPreloadMII<string mnemonic, bits<8> opcode>
4491 : InstMII<opcode, (outs),
4492 (ins imm32zx4:$M1, brtarget12bpp:$RI2, brtarget24bpp:$RI3),
4493 mnemonic#"\t$M1, $RI2, $RI3", []>;
3538 4494
3539 // A floating-point load-and test operation. Create both a normal unary 4495 // A floating-point load-and test operation. Create both a normal unary
3540 // operation and one that acts as a comparison against zero. 4496 // operation and one that acts as a comparison against zero.
3541 // Note that the comparison against zero operation is not available if we 4497 // Note that the comparison against zero operation is not available if we
3542 // have vector support, since load-and-test instructions will partially 4498 // have vector support, since load-and-test instructions will partially
3565 } 4521 }
3566 4522
3567 // Like SideEffectBinarySIL, but expanded later. 4523 // Like SideEffectBinarySIL, but expanded later.
3568 class SideEffectBinarySILPseudo<SDPatternOperator operator, Immediate imm> 4524 class SideEffectBinarySILPseudo<SDPatternOperator operator, Immediate imm>
3569 : Pseudo<(outs), (ins bdaddr12only:$BD1, imm:$I2), 4525 : Pseudo<(outs), (ins bdaddr12only:$BD1, imm:$I2),
3570 [(operator bdaddr12only:$BD1, imm:$I2)]> { 4526 [(operator bdaddr12only:$BD1, imm:$I2)]>;
3571 let hasSideEffects = 1;
3572 }
3573 4527
3574 // Like UnaryRI, but expanded after RA depending on the choice of register. 4528 // Like UnaryRI, but expanded after RA depending on the choice of register.
3575 class UnaryRIPseudo<SDPatternOperator operator, RegisterOperand cls, 4529 class UnaryRIPseudo<SDPatternOperator operator, RegisterOperand cls,
3576 Immediate imm> 4530 Immediate imm>
3577 : Pseudo<(outs cls:$R1), (ins imm:$I2), 4531 : Pseudo<(outs cls:$R1), (ins imm:$I2),
3628 } 4582 }
3629 4583
3630 // Like CompareRI, but expanded after RA depending on the choice of register. 4584 // Like CompareRI, but expanded after RA depending on the choice of register.
3631 class CompareRIPseudo<SDPatternOperator operator, RegisterOperand cls, 4585 class CompareRIPseudo<SDPatternOperator operator, RegisterOperand cls,
3632 Immediate imm> 4586 Immediate imm>
3633 : Pseudo<(outs), (ins cls:$R1, imm:$I2), [(operator cls:$R1, imm:$I2)]>; 4587 : Pseudo<(outs), (ins cls:$R1, imm:$I2), [(operator cls:$R1, imm:$I2)]> {
4588 let isCompare = 1;
4589 }
3634 4590
3635 // Like CompareRXY, but expanded after RA depending on the choice of register. 4591 // Like CompareRXY, but expanded after RA depending on the choice of register.
3636 class CompareRXYPseudo<SDPatternOperator operator, RegisterOperand cls, 4592 class CompareRXYPseudo<SDPatternOperator operator, RegisterOperand cls,
3637 SDPatternOperator load, bits<5> bytes, 4593 SDPatternOperator load, bits<5> bytes,
3638 AddressingMode mode = bdxaddr20only> 4594 AddressingMode mode = bdxaddr20only>
3640 [(operator cls:$R1, (load mode:$XBD2))]> { 4596 [(operator cls:$R1, (load mode:$XBD2))]> {
3641 let mayLoad = 1; 4597 let mayLoad = 1;
3642 let Has20BitOffset = 1; 4598 let Has20BitOffset = 1;
3643 let HasIndex = 1; 4599 let HasIndex = 1;
3644 let AccessBytes = bytes; 4600 let AccessBytes = bytes;
4601 }
4602
4603 // Like CondBinaryRRF, but expanded after RA depending on the choice of
4604 // register.
4605 class CondBinaryRRFPseudo<RegisterOperand cls1, RegisterOperand cls2>
4606 : Pseudo<(outs cls1:$R1),
4607 (ins cls1:$R1src, cls2:$R2, cond4:$valid, cond4:$M3), []> {
4608 let Constraints = "$R1 = $R1src";
4609 let DisableEncoding = "$R1src";
4610 let CCMaskLast = 1;
4611 }
4612
4613 // Like CondBinaryRIE, but expanded after RA depending on the choice of
4614 // register.
4615 class CondBinaryRIEPseudo<RegisterOperand cls, Immediate imm>
4616 : Pseudo<(outs cls:$R1),
4617 (ins cls:$R1src, imm:$I2, cond4:$valid, cond4:$M3),
4618 [(set cls:$R1, (z_select_ccmask imm:$I2, cls:$R1src,
4619 cond4:$valid, cond4:$M3))]> {
4620 let Constraints = "$R1 = $R1src";
4621 let DisableEncoding = "$R1src";
4622 let CCMaskLast = 1;
4623 }
4624
4625 // Like CondUnaryRSY, but expanded after RA depending on the choice of
4626 // register.
4627 class CondUnaryRSYPseudo<SDPatternOperator operator, RegisterOperand cls,
4628 bits<5> bytes, AddressingMode mode = bdaddr20only>
4629 : Pseudo<(outs cls:$R1),
4630 (ins cls:$R1src, mode:$BD2, cond4:$valid, cond4:$R3),
4631 [(set cls:$R1,
4632 (z_select_ccmask (operator mode:$BD2), cls:$R1src,
4633 cond4:$valid, cond4:$R3))]> {
4634 let Constraints = "$R1 = $R1src";
4635 let DisableEncoding = "$R1src";
4636 let mayLoad = 1;
4637 let AccessBytes = bytes;
4638 let CCMaskLast = 1;
4639 }
4640
4641 // Like CondStoreRSY, but expanded after RA depending on the choice of
4642 // register.
4643 class CondStoreRSYPseudo<RegisterOperand cls, bits<5> bytes,
4644 AddressingMode mode = bdaddr20only>
4645 : Pseudo<(outs), (ins cls:$R1, mode:$BD2, cond4:$valid, cond4:$R3), []> {
4646 let mayStore = 1;
4647 let AccessBytes = bytes;
4648 let CCMaskLast = 1;
3645 } 4649 }
3646 4650
3647 // Like StoreRXY, but expanded after RA depending on the choice of register. 4651 // Like StoreRXY, but expanded after RA depending on the choice of register.
3648 class StoreRXYPseudo<SDPatternOperator operator, RegisterOperand cls, 4652 class StoreRXYPseudo<SDPatternOperator operator, RegisterOperand cls,
3649 bits<5> bytes, AddressingMode mode = bdxaddr20only> 4653 bits<5> bytes, AddressingMode mode = bdxaddr20only>
3666 let DisableEncoding = "$R1src"; 4670 let DisableEncoding = "$R1src";
3667 } 4671 }
3668 4672
3669 // Implements "$dst = $cc & (8 >> CC) ? $src1 : $src2", where CC is 4673 // Implements "$dst = $cc & (8 >> CC) ? $src1 : $src2", where CC is
3670 // the value of the PSW's 2-bit condition code field. 4674 // the value of the PSW's 2-bit condition code field.
3671 class SelectWrapper<RegisterOperand cls> 4675 class SelectWrapper<ValueType vt, RegisterOperand cls>
3672 : Pseudo<(outs cls:$dst), 4676 : Pseudo<(outs cls:$dst),
3673 (ins cls:$src1, cls:$src2, imm32zx4:$valid, imm32zx4:$cc), 4677 (ins cls:$src1, cls:$src2, imm32zx4:$valid, imm32zx4:$cc),
3674 [(set cls:$dst, (z_select_ccmask cls:$src1, cls:$src2, 4678 [(set (vt cls:$dst), (z_select_ccmask cls:$src1, cls:$src2,
3675 imm32zx4:$valid, imm32zx4:$cc))]> { 4679 imm32zx4:$valid, imm32zx4:$cc))]> {
3676 let usesCustomInserter = 1; 4680 let usesCustomInserter = 1;
3677 // Although the instructions used by these nodes do not in themselves 4681 // Although the instructions used by these nodes do not in themselves
3678 // change CC, the insertion requires new blocks, and CC cannot be live 4682 // change CC, the insertion requires new blocks, and CC cannot be live
3679 // across them. 4683 // across them.
3750 // The Sequence form uses a straight-line sequence of instructions and 4754 // The Sequence form uses a straight-line sequence of instructions and
3751 // the Loop form uses a loop of length-256 instructions followed by 4755 // the Loop form uses a loop of length-256 instructions followed by
3752 // another instruction to handle the excess. 4756 // another instruction to handle the excess.
3753 multiclass MemorySS<string mnemonic, bits<8> opcode, 4757 multiclass MemorySS<string mnemonic, bits<8> opcode,
3754 SDPatternOperator sequence, SDPatternOperator loop> { 4758 SDPatternOperator sequence, SDPatternOperator loop> {
3755 def "" : InstSSa<opcode, (outs), (ins bdladdr12onlylen8:$BDL1, 4759 def "" : SideEffectBinarySSa<mnemonic, opcode>;
3756 bdaddr12only:$BD2),
3757 mnemonic##"\t$BDL1, $BD2", []>;
3758 let usesCustomInserter = 1, hasNoSchedulingInfo = 1 in { 4760 let usesCustomInserter = 1, hasNoSchedulingInfo = 1 in {
3759 def Sequence : Pseudo<(outs), (ins bdaddr12only:$dest, bdaddr12only:$src, 4761 def Sequence : Pseudo<(outs), (ins bdaddr12only:$dest, bdaddr12only:$src,
3760 imm64:$length), 4762 imm64:$length),
3761 [(sequence bdaddr12only:$dest, bdaddr12only:$src, 4763 [(sequence bdaddr12only:$dest, bdaddr12only:$src,
3762 imm64:$length)]>; 4764 imm64:$length)]>;
3772 // number of bytes at a time and sets CC to 3 if the instruction needs 4774 // number of bytes at a time and sets CC to 3 if the instruction needs
3773 // to be repeated. Also define a pseudo instruction that represents 4775 // to be repeated. Also define a pseudo instruction that represents
3774 // the full loop (the main instruction plus the branch on CC==3). 4776 // the full loop (the main instruction plus the branch on CC==3).
3775 multiclass StringRRE<string mnemonic, bits<16> opcode, 4777 multiclass StringRRE<string mnemonic, bits<16> opcode,
3776 SDPatternOperator operator> { 4778 SDPatternOperator operator> {
3777 def "" : InstRRE<opcode, (outs GR64:$R1, GR64:$R2), 4779 let Uses = [R0L] in
3778 (ins GR64:$R1src, GR64:$R2src), 4780 def "" : SideEffectBinaryMemMemRRE<mnemonic, opcode, GR64, GR64>;
3779 mnemonic#"\t$R1, $R2", []> {
3780 let Uses = [R0L];
3781 let Constraints = "$R1 = $R1src, $R2 = $R2src";
3782 let DisableEncoding = "$R1src, $R2src";
3783 }
3784 let usesCustomInserter = 1, hasNoSchedulingInfo = 1 in 4781 let usesCustomInserter = 1, hasNoSchedulingInfo = 1 in
3785 def Loop : Pseudo<(outs GR64:$end), 4782 def Loop : Pseudo<(outs GR64:$end),
3786 (ins GR64:$start1, GR64:$start2, GR32:$char), 4783 (ins GR64:$start1, GR64:$start2, GR32:$char),
3787 [(set GR64:$end, (operator GR64:$start1, GR64:$start2, 4784 [(set GR64:$end, (operator GR64:$start1, GR64:$start2,
3788 GR32:$char))]>; 4785 GR32:$char))]>;