32 #define DEBUG_TYPE "aarch64-disassembler" 40 unsigned RegNo, uint64_t Address,
65 unsigned RegNo, uint64_t Address,
71 unsigned RegNo, uint64_t Address,
102 const void *Decoder);
105 const void *Decoder);
108 const void *Decoder);
111 const void *Decoder);
114 const void *Decoder);
118 const void *Decoder);
121 const void *Decoder);
123 uint64_t Address,
const void *Decoder);
125 uint64_t Address,
const void *Decoder);
127 uint64_t Address,
const void *Decoder);
129 uint64_t Address,
const void *Decoder);
132 const void *Decoder);
135 const void *Decoder);
138 const void *Decoder);
141 const void *Decoder);
144 const void *Decoder);
147 const void *Decoder);
150 const void *Decoder);
153 const void *Decoder);
156 const void *Decoder);
159 const void *Decoder);
161 uint64_t Address,
const void *Decoder);
163 uint64_t Address,
const void *Decoder);
166 const void *Decoder);
169 const void *Decoder);
171 uint64_t Address,
const void *Decoder);
175 const void *Decoder);
177 uint64_t Addr,
const void *Decoder);
180 const void *Decoder);
182 uint64_t Addr,
const void *Decoder);
185 const void *Decoder);
187 uint64_t Addr,
const void *Decoder);
190 const void *Decoder);
192 uint64_t Addr,
const void *Decoder);
194 uint64_t Addr,
const void *Decoder);
196 uint64_t Addr,
const void *Decoder);
198 uint64_t Addr,
const void *Decoder);
200 uint64_t Addr,
const void *Decoder);
204 const void *Decoder);
208 const void *Decoder);
212 const void *Decoder);
215 uint64_t Address,
const void *Decoder);
216 template <
int ElementW
idth>
218 uint64_t Addr,
const void *Decoder);
220 uint64_t Addr,
const void *Decoder);
237 #include "AArch64GenDisassemblerTables.inc" 238 #include "AArch64GenInstrInfo.inc" 240 #define Success MCDisassembler::Success 241 #define Fail MCDisassembler::Fail 242 #define SoftFail MCDisassembler::SoftFail 259 if (Bytes.
size() < 4)
265 (Bytes[3] << 24) | (Bytes[2] << 16) | (Bytes[1] << 8) | (Bytes[0] << 0);
275 std::unique_ptr<MCRelocationInfo> &&RelInfo) {
277 SymbolLookUp, DisInfo);
297 AArch64::Q0, AArch64::Q1, AArch64::Q2, AArch64::Q3, AArch64::Q4,
298 AArch64::Q5, AArch64::Q6, AArch64::Q7, AArch64::Q8, AArch64::Q9,
299 AArch64::Q10, AArch64::Q11, AArch64::Q12, AArch64::Q13, AArch64::Q14,
300 AArch64::Q15, AArch64::Q16, AArch64::Q17, AArch64::Q18, AArch64::Q19,
301 AArch64::Q20, AArch64::Q21, AArch64::Q22, AArch64::Q23, AArch64::Q24,
302 AArch64::Q25, AArch64::Q26, AArch64::Q27, AArch64::Q28, AArch64::Q29,
303 AArch64::Q30, AArch64::Q31
308 const void *Decoder) {
312 unsigned Register = FPR128DecoderTable[RegNo];
319 const void *Decoder) {
326 AArch64::D0, AArch64::D1, AArch64::D2, AArch64::D3, AArch64::D4,
327 AArch64::D5, AArch64::D6, AArch64::D7, AArch64::D8, AArch64::D9,
328 AArch64::D10, AArch64::D11, AArch64::D12, AArch64::D13, AArch64::D14,
329 AArch64::D15, AArch64::D16, AArch64::D17, AArch64::D18, AArch64::D19,
330 AArch64::D20, AArch64::D21, AArch64::D22, AArch64::D23, AArch64::D24,
331 AArch64::D25, AArch64::D26, AArch64::D27, AArch64::D28, AArch64::D29,
332 AArch64::D30, AArch64::D31
337 const void *Decoder) {
341 unsigned Register = FPR64DecoderTable[RegNo];
347 AArch64::S0, AArch64::S1, AArch64::S2, AArch64::S3, AArch64::S4,
348 AArch64::S5, AArch64::S6, AArch64::S7, AArch64::S8, AArch64::S9,
349 AArch64::S10, AArch64::S11, AArch64::S12, AArch64::S13, AArch64::S14,
350 AArch64::S15, AArch64::S16, AArch64::S17, AArch64::S18, AArch64::S19,
351 AArch64::S20, AArch64::S21, AArch64::S22, AArch64::S23, AArch64::S24,
352 AArch64::S25, AArch64::S26, AArch64::S27, AArch64::S28, AArch64::S29,
353 AArch64::S30, AArch64::S31
358 const void *Decoder) {
362 unsigned Register = FPR32DecoderTable[RegNo];
368 AArch64::H0, AArch64::H1, AArch64::H2, AArch64::H3, AArch64::H4,
369 AArch64::H5, AArch64::H6, AArch64::H7, AArch64::H8, AArch64::H9,
370 AArch64::H10, AArch64::H11, AArch64::H12, AArch64::H13, AArch64::H14,
371 AArch64::H15, AArch64::H16, AArch64::H17, AArch64::H18, AArch64::H19,
372 AArch64::H20, AArch64::H21, AArch64::H22, AArch64::H23, AArch64::H24,
373 AArch64::H25, AArch64::H26, AArch64::H27, AArch64::H28, AArch64::H29,
374 AArch64::H30, AArch64::H31
379 const void *Decoder) {
383 unsigned Register = FPR16DecoderTable[RegNo];
389 AArch64::B0, AArch64::B1, AArch64::B2, AArch64::B3, AArch64::B4,
390 AArch64::B5, AArch64::B6, AArch64::B7, AArch64::B8, AArch64::B9,
391 AArch64::B10, AArch64::B11, AArch64::B12, AArch64::B13, AArch64::B14,
392 AArch64::B15, AArch64::B16, AArch64::B17, AArch64::B18, AArch64::B19,
393 AArch64::B20, AArch64::B21, AArch64::B22, AArch64::B23, AArch64::B24,
394 AArch64::B25, AArch64::B26, AArch64::B27, AArch64::B28, AArch64::B29,
395 AArch64::B30, AArch64::B31
400 const void *Decoder) {
404 unsigned Register = FPR8DecoderTable[RegNo];
410 AArch64::X0, AArch64::X1, AArch64::X2, AArch64::X3, AArch64::X4,
411 AArch64::X5, AArch64::X6, AArch64::X7, AArch64::X8, AArch64::X9,
412 AArch64::X10, AArch64::X11, AArch64::X12, AArch64::X13, AArch64::X14,
413 AArch64::X15, AArch64::X16, AArch64::X17, AArch64::X18, AArch64::X19,
414 AArch64::X20, AArch64::X21, AArch64::X22, AArch64::X23, AArch64::X24,
415 AArch64::X25, AArch64::X26, AArch64::X27, AArch64::X28, AArch64::FP,
416 AArch64::LR, AArch64::XZR
421 const void *Decoder) {
425 unsigned Register = GPR64DecoderTable[RegNo];
432 const void *Decoder) {
436 unsigned Register = GPR64DecoderTable[RegNo];
443 const void *Decoder) {
446 unsigned Register = GPR64DecoderTable[RegNo];
447 if (Register == AArch64::XZR)
448 Register = AArch64::SP;
454 AArch64::W0, AArch64::W1, AArch64::W2, AArch64::W3, AArch64::W4,
455 AArch64::W5, AArch64::W6, AArch64::W7, AArch64::W8, AArch64::W9,
456 AArch64::W10, AArch64::W11, AArch64::W12, AArch64::W13, AArch64::W14,
457 AArch64::W15, AArch64::W16, AArch64::W17, AArch64::W18, AArch64::W19,
458 AArch64::W20, AArch64::W21, AArch64::W22, AArch64::W23, AArch64::W24,
459 AArch64::W25, AArch64::W26, AArch64::W27, AArch64::W28, AArch64::W29,
460 AArch64::W30, AArch64::WZR
465 const void *Decoder) {
469 unsigned Register = GPR32DecoderTable[RegNo];
476 const void *Decoder) {
480 unsigned Register = GPR32DecoderTable[RegNo];
481 if (Register == AArch64::WZR)
482 Register = AArch64::WSP;
487 AArch64::Z0, AArch64::Z1, AArch64::Z2, AArch64::Z3,
488 AArch64::Z4, AArch64::Z5, AArch64::Z6, AArch64::Z7,
489 AArch64::Z8, AArch64::Z9, AArch64::Z10, AArch64::Z11,
490 AArch64::Z12, AArch64::Z13, AArch64::Z14, AArch64::Z15,
491 AArch64::Z16, AArch64::Z17, AArch64::Z18, AArch64::Z19,
492 AArch64::Z20, AArch64::Z21, AArch64::Z22, AArch64::Z23,
493 AArch64::Z24, AArch64::Z25, AArch64::Z26, AArch64::Z27,
494 AArch64::Z28, AArch64::Z29, AArch64::Z30, AArch64::Z31
499 const void* Decoder) {
503 unsigned Register = ZPRDecoderTable[RegNo];
510 const void *Decoder) {
518 const void *Decoder) {
525 AArch64::Z0_Z1, AArch64::Z1_Z2, AArch64::Z2_Z3, AArch64::Z3_Z4,
526 AArch64::Z4_Z5, AArch64::Z5_Z6, AArch64::Z6_Z7, AArch64::Z7_Z8,
527 AArch64::Z8_Z9, AArch64::Z9_Z10, AArch64::Z10_Z11, AArch64::Z11_Z12,
528 AArch64::Z12_Z13, AArch64::Z13_Z14, AArch64::Z14_Z15, AArch64::Z15_Z16,
529 AArch64::Z16_Z17, AArch64::Z17_Z18, AArch64::Z18_Z19, AArch64::Z19_Z20,
530 AArch64::Z20_Z21, AArch64::Z21_Z22, AArch64::Z22_Z23, AArch64::Z23_Z24,
531 AArch64::Z24_Z25, AArch64::Z25_Z26, AArch64::Z26_Z27, AArch64::Z27_Z28,
532 AArch64::Z28_Z29, AArch64::Z29_Z30, AArch64::Z30_Z31, AArch64::Z31_Z0
537 const void* Decoder) {
540 unsigned Register = ZZDecoderTable[RegNo];
546 AArch64::Z0_Z1_Z2, AArch64::Z1_Z2_Z3, AArch64::Z2_Z3_Z4,
547 AArch64::Z3_Z4_Z5, AArch64::Z4_Z5_Z6, AArch64::Z5_Z6_Z7,
548 AArch64::Z6_Z7_Z8, AArch64::Z7_Z8_Z9, AArch64::Z8_Z9_Z10,
549 AArch64::Z9_Z10_Z11, AArch64::Z10_Z11_Z12, AArch64::Z11_Z12_Z13,
550 AArch64::Z12_Z13_Z14, AArch64::Z13_Z14_Z15, AArch64::Z14_Z15_Z16,
551 AArch64::Z15_Z16_Z17, AArch64::Z16_Z17_Z18, AArch64::Z17_Z18_Z19,
552 AArch64::Z18_Z19_Z20, AArch64::Z19_Z20_Z21, AArch64::Z20_Z21_Z22,
553 AArch64::Z21_Z22_Z23, AArch64::Z22_Z23_Z24, AArch64::Z23_Z24_Z25,
554 AArch64::Z24_Z25_Z26, AArch64::Z25_Z26_Z27, AArch64::Z26_Z27_Z28,
555 AArch64::Z27_Z28_Z29, AArch64::Z28_Z29_Z30, AArch64::Z29_Z30_Z31,
556 AArch64::Z30_Z31_Z0, AArch64::Z31_Z0_Z1
561 const void* Decoder) {
564 unsigned Register = ZZZDecoderTable[RegNo];
570 AArch64::Z0_Z1_Z2_Z3, AArch64::Z1_Z2_Z3_Z4, AArch64::Z2_Z3_Z4_Z5,
571 AArch64::Z3_Z4_Z5_Z6, AArch64::Z4_Z5_Z6_Z7, AArch64::Z5_Z6_Z7_Z8,
572 AArch64::Z6_Z7_Z8_Z9, AArch64::Z7_Z8_Z9_Z10, AArch64::Z8_Z9_Z10_Z11,
573 AArch64::Z9_Z10_Z11_Z12, AArch64::Z10_Z11_Z12_Z13, AArch64::Z11_Z12_Z13_Z14,
574 AArch64::Z12_Z13_Z14_Z15, AArch64::Z13_Z14_Z15_Z16, AArch64::Z14_Z15_Z16_Z17,
575 AArch64::Z15_Z16_Z17_Z18, AArch64::Z16_Z17_Z18_Z19, AArch64::Z17_Z18_Z19_Z20,
576 AArch64::Z18_Z19_Z20_Z21, AArch64::Z19_Z20_Z21_Z22, AArch64::Z20_Z21_Z22_Z23,
577 AArch64::Z21_Z22_Z23_Z24, AArch64::Z22_Z23_Z24_Z25, AArch64::Z23_Z24_Z25_Z26,
578 AArch64::Z24_Z25_Z26_Z27, AArch64::Z25_Z26_Z27_Z28, AArch64::Z26_Z27_Z28_Z29,
579 AArch64::Z27_Z28_Z29_Z30, AArch64::Z28_Z29_Z30_Z31, AArch64::Z29_Z30_Z31_Z0,
580 AArch64::Z30_Z31_Z0_Z1, AArch64::Z31_Z0_Z1_Z2
585 const void* Decoder) {
588 unsigned Register = ZZZZDecoderTable[RegNo];
594 AArch64::P0, AArch64::P1, AArch64::P2, AArch64::P3,
595 AArch64::P4, AArch64::P5, AArch64::P6, AArch64::P7,
596 AArch64::P8, AArch64::P9, AArch64::P10, AArch64::P11,
597 AArch64::P12, AArch64::P13, AArch64::P14, AArch64::P15
601 uint64_t Addr,
const void *Decoder) {
605 unsigned Register = PPRDecoderTable[RegNo];
612 const void* Decoder) {
621 AArch64::Q0, AArch64::Q1, AArch64::Q2, AArch64::Q3, AArch64::Q4,
622 AArch64::Q5, AArch64::Q6, AArch64::Q7, AArch64::Q8, AArch64::Q9,
623 AArch64::Q10, AArch64::Q11, AArch64::Q12, AArch64::Q13, AArch64::Q14,
624 AArch64::Q15, AArch64::Q16, AArch64::Q17, AArch64::Q18, AArch64::Q19,
625 AArch64::Q20, AArch64::Q21, AArch64::Q22, AArch64::Q23, AArch64::Q24,
626 AArch64::Q25, AArch64::Q26, AArch64::Q27, AArch64::Q28, AArch64::Q29,
627 AArch64::Q30, AArch64::Q31
632 const void *Decoder) {
636 unsigned Register = VectorDecoderTable[RegNo];
642 AArch64::Q0_Q1, AArch64::Q1_Q2, AArch64::Q2_Q3, AArch64::Q3_Q4,
643 AArch64::Q4_Q5, AArch64::Q5_Q6, AArch64::Q6_Q7, AArch64::Q7_Q8,
644 AArch64::Q8_Q9, AArch64::Q9_Q10, AArch64::Q10_Q11, AArch64::Q11_Q12,
645 AArch64::Q12_Q13, AArch64::Q13_Q14, AArch64::Q14_Q15, AArch64::Q15_Q16,
646 AArch64::Q16_Q17, AArch64::Q17_Q18, AArch64::Q18_Q19, AArch64::Q19_Q20,
647 AArch64::Q20_Q21, AArch64::Q21_Q22, AArch64::Q22_Q23, AArch64::Q23_Q24,
648 AArch64::Q24_Q25, AArch64::Q25_Q26, AArch64::Q26_Q27, AArch64::Q27_Q28,
649 AArch64::Q28_Q29, AArch64::Q29_Q30, AArch64::Q30_Q31, AArch64::Q31_Q0
653 uint64_t Addr,
const void *Decoder) {
656 unsigned Register = QQDecoderTable[RegNo];
662 AArch64::Q0_Q1_Q2, AArch64::Q1_Q2_Q3, AArch64::Q2_Q3_Q4,
663 AArch64::Q3_Q4_Q5, AArch64::Q4_Q5_Q6, AArch64::Q5_Q6_Q7,
664 AArch64::Q6_Q7_Q8, AArch64::Q7_Q8_Q9, AArch64::Q8_Q9_Q10,
665 AArch64::Q9_Q10_Q11, AArch64::Q10_Q11_Q12, AArch64::Q11_Q12_Q13,
666 AArch64::Q12_Q13_Q14, AArch64::Q13_Q14_Q15, AArch64::Q14_Q15_Q16,
667 AArch64::Q15_Q16_Q17, AArch64::Q16_Q17_Q18, AArch64::Q17_Q18_Q19,
668 AArch64::Q18_Q19_Q20, AArch64::Q19_Q20_Q21, AArch64::Q20_Q21_Q22,
669 AArch64::Q21_Q22_Q23, AArch64::Q22_Q23_Q24, AArch64::Q23_Q24_Q25,
670 AArch64::Q24_Q25_Q26, AArch64::Q25_Q26_Q27, AArch64::Q26_Q27_Q28,
671 AArch64::Q27_Q28_Q29, AArch64::Q28_Q29_Q30, AArch64::Q29_Q30_Q31,
672 AArch64::Q30_Q31_Q0, AArch64::Q31_Q0_Q1
676 uint64_t Addr,
const void *Decoder) {
679 unsigned Register = QQQDecoderTable[RegNo];
685 AArch64::Q0_Q1_Q2_Q3, AArch64::Q1_Q2_Q3_Q4, AArch64::Q2_Q3_Q4_Q5,
686 AArch64::Q3_Q4_Q5_Q6, AArch64::Q4_Q5_Q6_Q7, AArch64::Q5_Q6_Q7_Q8,
687 AArch64::Q6_Q7_Q8_Q9, AArch64::Q7_Q8_Q9_Q10, AArch64::Q8_Q9_Q10_Q11,
688 AArch64::Q9_Q10_Q11_Q12, AArch64::Q10_Q11_Q12_Q13, AArch64::Q11_Q12_Q13_Q14,
689 AArch64::Q12_Q13_Q14_Q15, AArch64::Q13_Q14_Q15_Q16, AArch64::Q14_Q15_Q16_Q17,
690 AArch64::Q15_Q16_Q17_Q18, AArch64::Q16_Q17_Q18_Q19, AArch64::Q17_Q18_Q19_Q20,
691 AArch64::Q18_Q19_Q20_Q21, AArch64::Q19_Q20_Q21_Q22, AArch64::Q20_Q21_Q22_Q23,
692 AArch64::Q21_Q22_Q23_Q24, AArch64::Q22_Q23_Q24_Q25, AArch64::Q23_Q24_Q25_Q26,
693 AArch64::Q24_Q25_Q26_Q27, AArch64::Q25_Q26_Q27_Q28, AArch64::Q26_Q27_Q28_Q29,
694 AArch64::Q27_Q28_Q29_Q30, AArch64::Q28_Q29_Q30_Q31, AArch64::Q29_Q30_Q31_Q0,
695 AArch64::Q30_Q31_Q0_Q1, AArch64::Q31_Q0_Q1_Q2
700 const void *Decoder) {
703 unsigned Register = QQQQDecoderTable[RegNo];
709 AArch64::D0_D1, AArch64::D1_D2, AArch64::D2_D3, AArch64::D3_D4,
710 AArch64::D4_D5, AArch64::D5_D6, AArch64::D6_D7, AArch64::D7_D8,
711 AArch64::D8_D9, AArch64::D9_D10, AArch64::D10_D11, AArch64::D11_D12,
712 AArch64::D12_D13, AArch64::D13_D14, AArch64::D14_D15, AArch64::D15_D16,
713 AArch64::D16_D17, AArch64::D17_D18, AArch64::D18_D19, AArch64::D19_D20,
714 AArch64::D20_D21, AArch64::D21_D22, AArch64::D22_D23, AArch64::D23_D24,
715 AArch64::D24_D25, AArch64::D25_D26, AArch64::D26_D27, AArch64::D27_D28,
716 AArch64::D28_D29, AArch64::D29_D30, AArch64::D30_D31, AArch64::D31_D0
720 uint64_t Addr,
const void *Decoder) {
723 unsigned Register = DDDecoderTable[RegNo];
729 AArch64::D0_D1_D2, AArch64::D1_D2_D3, AArch64::D2_D3_D4,
730 AArch64::D3_D4_D5, AArch64::D4_D5_D6, AArch64::D5_D6_D7,
731 AArch64::D6_D7_D8, AArch64::D7_D8_D9, AArch64::D8_D9_D10,
732 AArch64::D9_D10_D11, AArch64::D10_D11_D12, AArch64::D11_D12_D13,
733 AArch64::D12_D13_D14, AArch64::D13_D14_D15, AArch64::D14_D15_D16,
734 AArch64::D15_D16_D17, AArch64::D16_D17_D18, AArch64::D17_D18_D19,
735 AArch64::D18_D19_D20, AArch64::D19_D20_D21, AArch64::D20_D21_D22,
736 AArch64::D21_D22_D23, AArch64::D22_D23_D24, AArch64::D23_D24_D25,
737 AArch64::D24_D25_D26, AArch64::D25_D26_D27, AArch64::D26_D27_D28,
738 AArch64::D27_D28_D29, AArch64::D28_D29_D30, AArch64::D29_D30_D31,
739 AArch64::D30_D31_D0, AArch64::D31_D0_D1
743 uint64_t Addr,
const void *Decoder) {
746 unsigned Register = DDDDecoderTable[RegNo];
752 AArch64::D0_D1_D2_D3, AArch64::D1_D2_D3_D4, AArch64::D2_D3_D4_D5,
753 AArch64::D3_D4_D5_D6, AArch64::D4_D5_D6_D7, AArch64::D5_D6_D7_D8,
754 AArch64::D6_D7_D8_D9, AArch64::D7_D8_D9_D10, AArch64::D8_D9_D10_D11,
755 AArch64::D9_D10_D11_D12, AArch64::D10_D11_D12_D13, AArch64::D11_D12_D13_D14,
756 AArch64::D12_D13_D14_D15, AArch64::D13_D14_D15_D16, AArch64::D14_D15_D16_D17,
757 AArch64::D15_D16_D17_D18, AArch64::D16_D17_D18_D19, AArch64::D17_D18_D19_D20,
758 AArch64::D18_D19_D20_D21, AArch64::D19_D20_D21_D22, AArch64::D20_D21_D22_D23,
759 AArch64::D21_D22_D23_D24, AArch64::D22_D23_D24_D25, AArch64::D23_D24_D25_D26,
760 AArch64::D24_D25_D26_D27, AArch64::D25_D26_D27_D28, AArch64::D26_D27_D28_D29,
761 AArch64::D27_D28_D29_D30, AArch64::D28_D29_D30_D31, AArch64::D29_D30_D31_D0,
762 AArch64::D30_D31_D0_D1, AArch64::D31_D0_D1_D2
767 const void *Decoder) {
770 unsigned Register = DDDDDecoderTable[RegNo];
777 const void *Decoder) {
786 const void *Decoder) {
792 uint64_t Addr,
const void *Decoder) {
793 int64_t ImmVal = Imm;
798 if (ImmVal & (1 << (19 - 1)))
799 ImmVal |= ~((1LL << 19) - 1);
802 Inst.
getOpcode() != AArch64::LDRXl, 0, 4))
808 uint64_t
Address,
const void *Decoder) {
816 const void *Decoder) {
826 const void *Decoder) {
834 const void *Decoder) {
837 unsigned Rd = fieldFromInstruction(Insn, 0, 5);
838 unsigned Rn = fieldFromInstruction(Insn, 5, 5);
839 unsigned IsToVec = fieldFromInstruction(Insn, 16, 1);
868 uint64_t Addr,
const void *Decoder) {
874 const void *Decoder) {
879 uint64_t Addr,
const void *Decoder) {
885 const void *Decoder) {
890 uint64_t Addr,
const void *Decoder) {
896 const void *Decoder) {
901 uint64_t Addr,
const void *Decoder) {
906 uint64_t Addr,
const void *Decoder) {
911 uint64_t Addr,
const void *Decoder) {
916 uint64_t Addr,
const void *Decoder) {
921 uint64_t Addr,
const void *Decoder) {
927 const void *Decoder) {
928 unsigned Rd = fieldFromInstruction(insn, 0, 5);
929 unsigned Rn = fieldFromInstruction(insn, 5, 5);
930 unsigned Rm = fieldFromInstruction(insn, 16, 5);
931 unsigned shiftHi = fieldFromInstruction(insn, 22, 2);
932 unsigned shiftLo = fieldFromInstruction(insn, 10, 6);
933 unsigned shift = (shiftHi << 6) | shiftLo;
937 case AArch64::ADDWrs:
938 case AArch64::ADDSWrs:
939 case AArch64::SUBWrs:
940 case AArch64::SUBSWrs:
945 case AArch64::ANDWrs:
946 case AArch64::ANDSWrs:
947 case AArch64::BICWrs:
948 case AArch64::BICSWrs:
949 case AArch64::ORRWrs:
950 case AArch64::ORNWrs:
951 case AArch64::EORWrs:
952 case AArch64::EONWrs: {
954 if (shiftLo >> 5 == 1)
961 case AArch64::ADDXrs:
962 case AArch64::ADDSXrs:
963 case AArch64::SUBXrs:
964 case AArch64::SUBSXrs:
969 case AArch64::ANDXrs:
970 case AArch64::ANDSXrs:
971 case AArch64::BICXrs:
972 case AArch64::BICSXrs:
973 case AArch64::ORRXrs:
974 case AArch64::ORNXrs:
975 case AArch64::EORXrs:
976 case AArch64::EONXrs:
989 const void *Decoder) {
990 unsigned Rd = fieldFromInstruction(insn, 0, 5);
991 unsigned imm = fieldFromInstruction(insn, 5, 16);
992 unsigned shift = fieldFromInstruction(insn, 21, 2);
997 case AArch64::MOVZWi:
998 case AArch64::MOVNWi:
999 case AArch64::MOVKWi:
1000 if (shift & (1U << 5))
1004 case AArch64::MOVZXi:
1005 case AArch64::MOVNXi:
1006 case AArch64::MOVKXi:
1011 if (Inst.
getOpcode() == AArch64::MOVKWi ||
1022 const void *Decoder) {
1023 unsigned Rt = fieldFromInstruction(insn, 0, 5);
1024 unsigned Rn = fieldFromInstruction(insn, 5, 5);
1025 unsigned offset = fieldFromInstruction(insn, 10, 12);
1032 case AArch64::PRFMui:
1036 case AArch64::STRBBui:
1037 case AArch64::LDRBBui:
1038 case AArch64::LDRSBWui:
1039 case AArch64::STRHHui:
1040 case AArch64::LDRHHui:
1041 case AArch64::LDRSHWui:
1042 case AArch64::STRWui:
1043 case AArch64::LDRWui:
1046 case AArch64::LDRSBXui:
1047 case AArch64::LDRSHXui:
1048 case AArch64::LDRSWui:
1049 case AArch64::STRXui:
1050 case AArch64::LDRXui:
1053 case AArch64::LDRQui:
1054 case AArch64::STRQui:
1057 case AArch64::LDRDui:
1058 case AArch64::STRDui:
1061 case AArch64::LDRSui:
1062 case AArch64::STRSui:
1065 case AArch64::LDRHui:
1066 case AArch64::STRHui:
1069 case AArch64::LDRBui:
1070 case AArch64::STRBui:
1083 const void *Decoder) {
1084 unsigned Rt = fieldFromInstruction(insn, 0, 5);
1085 unsigned Rn = fieldFromInstruction(insn, 5, 5);
1086 int64_t offset = fieldFromInstruction(insn, 12, 9);
1090 if (offset & (1 << (9 - 1)))
1091 offset |= ~((1LL << 9) - 1);
1097 case AArch64::LDRSBWpre:
1098 case AArch64::LDRSHWpre:
1099 case AArch64::STRBBpre:
1100 case AArch64::LDRBBpre:
1101 case AArch64::STRHHpre:
1102 case AArch64::LDRHHpre:
1103 case AArch64::STRWpre:
1104 case AArch64::LDRWpre:
1105 case AArch64::LDRSBWpost:
1106 case AArch64::LDRSHWpost:
1107 case AArch64::STRBBpost:
1108 case AArch64::LDRBBpost:
1109 case AArch64::STRHHpost:
1110 case AArch64::LDRHHpost:
1111 case AArch64::STRWpost:
1112 case AArch64::LDRWpost:
1113 case AArch64::LDRSBXpre:
1114 case AArch64::LDRSHXpre:
1115 case AArch64::STRXpre:
1116 case AArch64::LDRSWpre:
1117 case AArch64::LDRXpre:
1118 case AArch64::LDRSBXpost:
1119 case AArch64::LDRSHXpost:
1120 case AArch64::STRXpost:
1121 case AArch64::LDRSWpost:
1122 case AArch64::LDRXpost:
1123 case AArch64::LDRQpre:
1124 case AArch64::STRQpre:
1125 case AArch64::LDRQpost:
1126 case AArch64::STRQpost:
1127 case AArch64::LDRDpre:
1128 case AArch64::STRDpre:
1129 case AArch64::LDRDpost:
1130 case AArch64::STRDpost:
1131 case AArch64::LDRSpre:
1132 case AArch64::STRSpre:
1133 case AArch64::LDRSpost:
1134 case AArch64::STRSpost:
1135 case AArch64::LDRHpre:
1136 case AArch64::STRHpre:
1137 case AArch64::LDRHpost:
1138 case AArch64::STRHpost:
1139 case AArch64::LDRBpre:
1140 case AArch64::STRBpre:
1141 case AArch64::LDRBpost:
1142 case AArch64::STRBpost:
1150 case AArch64::PRFUMi:
1154 case AArch64::STURBBi:
1155 case AArch64::LDURBBi:
1156 case AArch64::LDURSBWi:
1157 case AArch64::STURHHi:
1158 case AArch64::LDURHHi:
1159 case AArch64::LDURSHWi:
1160 case AArch64::STURWi:
1161 case AArch64::LDURWi:
1162 case AArch64::LDTRSBWi:
1163 case AArch64::LDTRSHWi:
1164 case AArch64::STTRWi:
1165 case AArch64::LDTRWi:
1166 case AArch64::STTRHi:
1167 case AArch64::LDTRHi:
1168 case AArch64::LDTRBi:
1169 case AArch64::STTRBi:
1170 case AArch64::LDRSBWpre:
1171 case AArch64::LDRSHWpre:
1172 case AArch64::STRBBpre:
1173 case AArch64::LDRBBpre:
1174 case AArch64::STRHHpre:
1175 case AArch64::LDRHHpre:
1176 case AArch64::STRWpre:
1177 case AArch64::LDRWpre:
1178 case AArch64::LDRSBWpost:
1179 case AArch64::LDRSHWpost:
1180 case AArch64::STRBBpost:
1181 case AArch64::LDRBBpost:
1182 case AArch64::STRHHpost:
1183 case AArch64::LDRHHpost:
1184 case AArch64::STRWpost:
1185 case AArch64::LDRWpost:
1186 case AArch64::STLURBi:
1187 case AArch64::STLURHi:
1188 case AArch64::STLURWi:
1189 case AArch64::LDAPURBi:
1190 case AArch64::LDAPURSBWi:
1191 case AArch64::LDAPURHi:
1192 case AArch64::LDAPURSHWi:
1193 case AArch64::LDAPURi:
1196 case AArch64::LDURSBXi:
1197 case AArch64::LDURSHXi:
1198 case AArch64::LDURSWi:
1199 case AArch64::STURXi:
1200 case AArch64::LDURXi:
1201 case AArch64::LDTRSBXi:
1202 case AArch64::LDTRSHXi:
1203 case AArch64::LDTRSWi:
1204 case AArch64::STTRXi:
1205 case AArch64::LDTRXi:
1206 case AArch64::LDRSBXpre:
1207 case AArch64::LDRSHXpre:
1208 case AArch64::STRXpre:
1209 case AArch64::LDRSWpre:
1210 case AArch64::LDRXpre:
1211 case AArch64::LDRSBXpost:
1212 case AArch64::LDRSHXpost:
1213 case AArch64::STRXpost:
1214 case AArch64::LDRSWpost:
1215 case AArch64::LDRXpost:
1216 case AArch64::LDAPURSWi:
1217 case AArch64::LDAPURSHXi:
1218 case AArch64::LDAPURSBXi:
1219 case AArch64::STLURXi:
1220 case AArch64::LDAPURXi:
1223 case AArch64::LDURQi:
1224 case AArch64::STURQi:
1225 case AArch64::LDRQpre:
1226 case AArch64::STRQpre:
1227 case AArch64::LDRQpost:
1228 case AArch64::STRQpost:
1231 case AArch64::LDURDi:
1232 case AArch64::STURDi:
1233 case AArch64::LDRDpre:
1234 case AArch64::STRDpre:
1235 case AArch64::LDRDpost:
1236 case AArch64::STRDpost:
1239 case AArch64::LDURSi:
1240 case AArch64::STURSi:
1241 case AArch64::LDRSpre:
1242 case AArch64::STRSpre:
1243 case AArch64::LDRSpost:
1244 case AArch64::STRSpost:
1247 case AArch64::LDURHi:
1248 case AArch64::STURHi:
1249 case AArch64::LDRHpre:
1250 case AArch64::STRHpre:
1251 case AArch64::LDRHpost:
1252 case AArch64::STRHpost:
1255 case AArch64::LDURBi:
1256 case AArch64::STURBi:
1257 case AArch64::LDRBpre:
1258 case AArch64::STRBpre:
1259 case AArch64::LDRBpost:
1260 case AArch64::STRBpost:
1268 bool IsLoad = fieldFromInstruction(insn, 22, 1);
1269 bool IsIndexed = fieldFromInstruction(insn, 10, 2) != 0;
1270 bool IsFP = fieldFromInstruction(insn, 26, 1);
1273 if (IsLoad && IsIndexed && !IsFP && Rn != 31 && Rt == Rn)
1281 const void *Decoder) {
1282 unsigned Rt = fieldFromInstruction(insn, 0, 5);
1283 unsigned Rn = fieldFromInstruction(insn, 5, 5);
1284 unsigned Rt2 = fieldFromInstruction(insn, 10, 5);
1285 unsigned Rs = fieldFromInstruction(insn, 16, 5);
1291 case AArch64::STLXRW:
1292 case AArch64::STLXRB:
1293 case AArch64::STLXRH:
1294 case AArch64::STXRW:
1295 case AArch64::STXRB:
1296 case AArch64::STXRH:
1299 case AArch64::LDARW:
1300 case AArch64::LDARB:
1301 case AArch64::LDARH:
1302 case AArch64::LDAXRW:
1303 case AArch64::LDAXRB:
1304 case AArch64::LDAXRH:
1305 case AArch64::LDXRW:
1306 case AArch64::LDXRB:
1307 case AArch64::LDXRH:
1308 case AArch64::STLRW:
1309 case AArch64::STLRB:
1310 case AArch64::STLRH:
1311 case AArch64::STLLRW:
1312 case AArch64::STLLRB:
1313 case AArch64::STLLRH:
1314 case AArch64::LDLARW:
1315 case AArch64::LDLARB:
1316 case AArch64::LDLARH:
1319 case AArch64::STLXRX:
1320 case AArch64::STXRX:
1323 case AArch64::LDARX:
1324 case AArch64::LDAXRX:
1325 case AArch64::LDXRX:
1326 case AArch64::STLRX:
1327 case AArch64::LDLARX:
1328 case AArch64::STLLRX:
1331 case AArch64::STLXPW:
1332 case AArch64::STXPW:
1335 case AArch64::LDAXPW:
1336 case AArch64::LDXPW:
1340 case AArch64::STLXPX:
1341 case AArch64::STXPX:
1344 case AArch64::LDAXPX:
1345 case AArch64::LDXPX:
1354 if ((Opcode == AArch64::LDAXPW || Opcode == AArch64::LDXPW ||
1355 Opcode == AArch64::LDAXPX || Opcode == AArch64::LDXPX) &&
1364 const void *Decoder) {
1365 unsigned Rt = fieldFromInstruction(insn, 0, 5);
1366 unsigned Rn = fieldFromInstruction(insn, 5, 5);
1367 unsigned Rt2 = fieldFromInstruction(insn, 10, 5);
1368 int64_t offset = fieldFromInstruction(insn, 15, 7);
1369 bool IsLoad = fieldFromInstruction(insn, 22, 1);
1373 if (offset & (1 << (7 - 1)))
1374 offset |= ~((1LL << 7) - 1);
1377 bool NeedsDisjointWritebackTransfer =
false;
1383 case AArch64::LDPXpost:
1384 case AArch64::STPXpost:
1385 case AArch64::LDPSWpost:
1386 case AArch64::LDPXpre:
1387 case AArch64::STPXpre:
1388 case AArch64::LDPSWpre:
1389 case AArch64::LDPWpost:
1390 case AArch64::STPWpost:
1391 case AArch64::LDPWpre:
1392 case AArch64::STPWpre:
1393 case AArch64::LDPQpost:
1394 case AArch64::STPQpost:
1395 case AArch64::LDPQpre:
1396 case AArch64::STPQpre:
1397 case AArch64::LDPDpost:
1398 case AArch64::STPDpost:
1399 case AArch64::LDPDpre:
1400 case AArch64::STPDpre:
1401 case AArch64::LDPSpost:
1402 case AArch64::STPSpost:
1403 case AArch64::LDPSpre:
1404 case AArch64::STPSpre:
1412 case AArch64::LDPXpost:
1413 case AArch64::STPXpost:
1414 case AArch64::LDPSWpost:
1415 case AArch64::LDPXpre:
1416 case AArch64::STPXpre:
1417 case AArch64::LDPSWpre:
1418 NeedsDisjointWritebackTransfer =
true;
1420 case AArch64::LDNPXi:
1421 case AArch64::STNPXi:
1422 case AArch64::LDPXi:
1423 case AArch64::STPXi:
1424 case AArch64::LDPSWi:
1428 case AArch64::LDPWpost:
1429 case AArch64::STPWpost:
1430 case AArch64::LDPWpre:
1431 case AArch64::STPWpre:
1432 NeedsDisjointWritebackTransfer =
true;
1434 case AArch64::LDNPWi:
1435 case AArch64::STNPWi:
1436 case AArch64::LDPWi:
1437 case AArch64::STPWi:
1441 case AArch64::LDNPQi:
1442 case AArch64::STNPQi:
1443 case AArch64::LDPQpost:
1444 case AArch64::STPQpost:
1445 case AArch64::LDPQi:
1446 case AArch64::STPQi:
1447 case AArch64::LDPQpre:
1448 case AArch64::STPQpre:
1452 case AArch64::LDNPDi:
1453 case AArch64::STNPDi:
1454 case AArch64::LDPDpost:
1455 case AArch64::STPDpost:
1456 case AArch64::LDPDi:
1457 case AArch64::STPDi:
1458 case AArch64::LDPDpre:
1459 case AArch64::STPDpre:
1463 case AArch64::LDNPSi:
1464 case AArch64::STNPSi:
1465 case AArch64::LDPSpost:
1466 case AArch64::STPSpost:
1467 case AArch64::LDPSi:
1468 case AArch64::STPSi:
1469 case AArch64::LDPSpre:
1470 case AArch64::STPSpre:
1480 if (IsLoad && Rt == Rt2)
1485 if (NeedsDisjointWritebackTransfer && Rn != 31 && (Rt == Rn || Rt2 == Rn))
1493 const void *Decoder) {
1494 unsigned Rd = fieldFromInstruction(insn, 0, 5);
1495 unsigned Rn = fieldFromInstruction(insn, 5, 5);
1496 unsigned Rm = fieldFromInstruction(insn, 16, 5);
1497 unsigned extend = fieldFromInstruction(insn, 10, 6);
1499 unsigned shift = extend & 0x7;
1506 case AArch64::ADDWrx:
1507 case AArch64::SUBWrx:
1512 case AArch64::ADDSWrx:
1513 case AArch64::SUBSWrx:
1518 case AArch64::ADDXrx:
1519 case AArch64::SUBXrx:
1524 case AArch64::ADDSXrx:
1525 case AArch64::SUBSXrx:
1530 case AArch64::ADDXrx64:
1531 case AArch64::SUBXrx64:
1536 case AArch64::SUBSXrx64:
1537 case AArch64::ADDSXrx64:
1550 const void *Decoder) {
1551 unsigned Rd = fieldFromInstruction(insn, 0, 5);
1552 unsigned Rn = fieldFromInstruction(insn, 5, 5);
1553 unsigned Datasize = fieldFromInstruction(insn, 31, 1);
1557 if (Inst.
getOpcode() == AArch64::ANDSXri)
1562 imm = fieldFromInstruction(insn, 10, 13);
1566 if (Inst.
getOpcode() == AArch64::ANDSWri)
1571 imm = fieldFromInstruction(insn, 10, 12);
1581 const void *Decoder) {
1582 unsigned Rd = fieldFromInstruction(insn, 0, 5);
1583 unsigned cmode = fieldFromInstruction(insn, 12, 4);
1584 unsigned imm = fieldFromInstruction(insn, 16, 3) << 5;
1585 imm |= fieldFromInstruction(insn, 5, 5);
1597 case AArch64::MOVIv4i16:
1598 case AArch64::MOVIv8i16:
1599 case AArch64::MVNIv4i16:
1600 case AArch64::MVNIv8i16:
1601 case AArch64::MOVIv2i32:
1602 case AArch64::MOVIv4i32:
1603 case AArch64::MVNIv2i32:
1604 case AArch64::MVNIv4i32:
1607 case AArch64::MOVIv2s_msl:
1608 case AArch64::MOVIv4s_msl:
1609 case AArch64::MVNIv2s_msl:
1610 case AArch64::MVNIv4s_msl:
1620 const void *Decoder) {
1621 unsigned Rd = fieldFromInstruction(insn, 0, 5);
1622 unsigned cmode = fieldFromInstruction(insn, 12, 4);
1623 unsigned imm = fieldFromInstruction(insn, 16, 3) << 5;
1624 imm |= fieldFromInstruction(insn, 5, 5);
1637 uint64_t Addr,
const void *Decoder) {
1638 unsigned Rd = fieldFromInstruction(insn, 0, 5);
1639 int64_t imm = fieldFromInstruction(insn, 5, 19) << 2;
1640 imm |= fieldFromInstruction(insn, 29, 2);
1645 if (imm & (1 << (21 - 1)))
1646 imm |= ~((1LL << 21) - 1);
1656 uint64_t Addr,
const void *Decoder) {
1657 unsigned Rd = fieldFromInstruction(insn, 0, 5);
1658 unsigned Rn = fieldFromInstruction(insn, 5, 5);
1659 unsigned Imm = fieldFromInstruction(insn, 10, 14);
1660 unsigned S = fieldFromInstruction(insn, 29, 1);
1661 unsigned Datasize = fieldFromInstruction(insn, 31, 1);
1663 unsigned ShifterVal = (Imm >> 12) & 3;
1664 unsigned ImmVal = Imm & 0xFFF;
1668 if (ShifterVal != 0 && ShifterVal != 1)
1693 const void *Decoder) {
1694 int64_t imm = fieldFromInstruction(insn, 0, 26);
1699 if (imm & (1 << (26 - 1)))
1700 imm |= ~((1LL << 26) - 1);
1710 const void *Decoder) {
1711 uint64_t op1 = fieldFromInstruction(insn, 16, 3);
1712 uint64_t op2 = fieldFromInstruction(insn, 5, 3);
1713 uint64_t crm = fieldFromInstruction(insn, 8, 4);
1715 uint64_t pstate_field = (op1 << 3) | op2;
1717 if ((pstate_field == AArch64PState::PAN ||
1718 pstate_field == AArch64PState::UAO) && crm > 1)
1726 auto PState = AArch64PState::lookupPStateByEncoding(pstate_field);
1733 uint64_t Addr,
const void *Decoder) {
1734 uint64_t Rt = fieldFromInstruction(insn, 0, 5);
1735 uint64_t bit = fieldFromInstruction(insn, 31, 1) << 5;
1736 bit |= fieldFromInstruction(insn, 19, 5);
1737 int64_t dst = fieldFromInstruction(insn, 5, 14);
1742 if (dst & (1 << (14 - 1)))
1743 dst |= ~((1LL << 14) - 1);
1745 if (fieldFromInstruction(insn, 31, 1) == 0)
1757 unsigned RegClassID,
1760 const void *Decoder) {
1765 unsigned Register = AArch64MCRegisterClasses[RegClassID].getRegister(RegNo);
1773 const void *Decoder) {
1775 AArch64::WSeqPairsClassRegClassID,
1776 RegNo, Addr, Decoder);
1782 const void *Decoder) {
1784 AArch64::XSeqPairsClassRegClassID,
1785 RegNo, Addr, Decoder);
1791 const void *Decoder) {
1792 unsigned Zdn = fieldFromInstruction(insn, 0, 5);
1793 unsigned imm = fieldFromInstruction(insn, 5, 13);
1799 if (Inst.
getOpcode() != AArch64::DUPM_ZI)
1807 uint64_t
Address,
const void *Decoder) {
1808 if (Imm & ~((1LL <<
Bits) - 1))
1812 if (Imm & (1 << (
Bits - 1)))
1813 Imm |= ~((1LL <<
Bits) - 1);
1820 template <
int ElementW
idth>
1822 uint64_t Addr,
const void *Decoder) {
1823 unsigned Val = (uint8_t)Imm;
1824 unsigned Shift = (Imm & 0x100) ? 8 : 0;
1825 if (ElementWidth == 8 && Shift)
1834 uint64_t Addr,
const void *Decoder) {
static const unsigned FPR32DecoderTable[]
static DecodeStatus DecodeSystemPStateInstruction(MCInst &Inst, uint32_t insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeModImmInstruction(MCInst &Inst, uint32_t insn, uint64_t Address, const void *Decoder)
static bool Check(DecodeStatus &Out, DecodeStatus In)
static const unsigned ZZZDecoderTable[]
static DecodeStatus DecodeDDDDRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
Target & getTheAArch64beTarget()
static DecodeStatus DecodeModImmTiedInstruction(MCInst &Inst, uint32_t insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeGPR64RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVecShiftL16Imm(MCInst &Inst, unsigned Imm, uint64_t Addr, const void *Decoder)
static DecodeStatus DecodeFMOVLaneInstruction(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeQQRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeMSRSystemRegister(MCInst &Inst, unsigned Imm, uint64_t Address, const void *Decoder)
Compute iterated dominance frontiers using a linear time algorithm.
static DecodeStatus DecodeGPR64spRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodePPR_3bRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
DecodeStatus
Ternary decode status.
static DecodeStatus DecodeFPR128RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
Target & getTheAArch64leTarget()
Superclass for all disassemblers.
raw_ostream * CommentStream
bool tryAddingSymbolicOperand(MCInst &Inst, int64_t Value, uint64_t Address, bool IsBranch, uint64_t Offset, uint64_t InstSize) const
static DecodeStatus DecodeVecShiftR32ImmNarrow(MCInst &Inst, unsigned Imm, uint64_t Addr, const void *Decoder)
static DecodeStatus DecodeImm8OptLsl(MCInst &Inst, unsigned Imm, uint64_t Addr, const void *Decoder)
static DecodeStatus DecodePairLdStInstruction(MCInst &Inst, uint32_t insn, uint64_t Address, const void *Decoder)
static void RegisterMCDisassembler(Target &T, Target::MCDisassemblerCtorTy Fn)
RegisterMCDisassembler - Register a MCDisassembler implementation for the given target.
static DecodeStatus DecodeVecShiftLImm(MCInst &Inst, unsigned Imm, unsigned Add)
static DecodeStatus DecodeFPR64RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeXSeqPairsClassRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Addr, const void *Decoder)
static DecodeStatus DecodeUnconditionalBranch(MCInst &Inst, uint32_t insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeAddSubERegInstruction(MCInst &Inst, uint32_t insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeSVELogicalImmInstruction(llvm::MCInst &Inst, uint32_t insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeGPR64commonRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeExclusiveLdStInstruction(MCInst &Inst, uint32_t insn, uint64_t Address, const void *Decoder)
static const unsigned QQQDecoderTable[]
static DecodeStatus DecodeVecShiftL64Imm(MCInst &Inst, unsigned Imm, uint64_t Addr, const void *Decoder)
static const unsigned VectorDecoderTable[]
static const unsigned GPR64DecoderTable[]
static const unsigned ZZDecoderTable[]
static DecodeStatus DecodeMoveImmInstruction(MCInst &Inst, uint32_t insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeZPR4RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeDDDRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static MCOperand createReg(unsigned Reg)
static DecodeStatus DecodeGPR32spRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
const FeatureBitset & getFeatureBits() const
static DecodeStatus DecodeZPR_3bRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVectorRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Addr, const void *Decoder)
Target & getTheARM64Target()
static const unsigned FPR128DecoderTable[]
int(* LLVMOpInfoCallback)(void *DisInfo, uint64_t PC, uint64_t Offset, uint64_t Size, int TagType, void *TagBuf)
The type for the operand information call back function.
static DecodeStatus DecodeBaseAddSubImm(MCInst &Inst, uint32_t insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeSImm(llvm::MCInst &Inst, uint64_t Imm, uint64_t Address, const void *Decoder)
Context object for machine code objects.
static DecodeStatus DecodeZPR3RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
const MCSubtargetInfo & STI
static DecodeStatus DecodeQQQQRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
int decodeInstruction(InternalInstruction *insn, byteReader_t reader, const void *readerArg, dlog_t logger, void *loggerArg, const void *miiArg, uint64_t startLoc, DisassemblerMode mode)
Decode one instruction and store the decoding results in a buffer provided by the consumer...
static DecodeStatus DecodeGPRSeqPairsClassRegisterClass(MCInst &Inst, unsigned RegClassID, unsigned RegNo, uint64_t Addr, const void *Decoder)
void LLVMInitializeAArch64Disassembler()
static const unsigned FPR8DecoderTable[]
static const unsigned PPRDecoderTable[]
static DecodeStatus DecodeFixedPointScaleImm32(MCInst &Inst, unsigned Imm, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeZPR_4bRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
Instances of this class represent a single low-level machine instruction.
static DecodeStatus DecodeVecShiftL32Imm(MCInst &Inst, unsigned Imm, uint64_t Addr, const void *Decoder)
static DecodeStatus DecodeVecShiftR64ImmNarrow(MCInst &Inst, unsigned Imm, uint64_t Addr, const void *Decoder)
static const unsigned QQQQDecoderTable[]
static const unsigned FPR16DecoderTable[]
Symbolize and annotate disassembled instructions.
size_t size() const
size - Get the array size.
static const unsigned GPR32DecoderTable[]
static const unsigned FPR64DecoderTable[]
static DecodeStatus DecodeUnsignedLdStInstruction(MCInst &Inst, uint32_t insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodePCRelLabel19(MCInst &Inst, unsigned Imm, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeMRSSystemRegister(MCInst &Inst, unsigned Imm, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeZPR2RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Triple - Helper class for working with autoconf configuration names.
static DecodeStatus DecodeTestAndBranch(MCInst &Inst, uint32_t insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVecShiftRImm(MCInst &Inst, unsigned Imm, unsigned Add)
static const unsigned ZPRDecoderTable[]
static const unsigned DDDDecoderTable[]
static DecodeStatus DecodeVecShiftL8Imm(MCInst &Inst, unsigned Imm, uint64_t Addr, const void *Decoder)
MCDisassembler::DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size, ArrayRef< uint8_t > Bytes, uint64_t Address, raw_ostream &VStream, raw_ostream &CStream) const override
Returns the disassembly of a single instruction.
static DecodeStatus DecodeAdrInstruction(MCInst &Inst, uint32_t insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVecShiftR32Imm(MCInst &Inst, unsigned Imm, uint64_t Addr, const void *Decoder)
static DecodeStatus DecodePPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeMemExtend(MCInst &Inst, unsigned Imm, uint64_t Address, const void *Decoder)
static const unsigned DDDDDecoderTable[]
static MCSymbolizer * createAArch64ExternalSymbolizer(const Triple &TT, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp, void *DisInfo, MCContext *Ctx, std::unique_ptr< MCRelocationInfo > &&RelInfo)
const MCOperand & getOperand(unsigned i) const
static const unsigned QQDecoderTable[]
Promote Memory to Register
static DecodeStatus DecodeGPR32RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeLogicalImmInstruction(MCInst &Inst, uint32_t insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeSignedLdStInstruction(MCInst &Inst, uint32_t insn, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeFPR16RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
Target - Wrapper for Target specific information.
static DecodeStatus DecodeZPRRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeDDRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVecShiftR64Imm(MCInst &Inst, unsigned Imm, uint64_t Addr, const void *Decoder)
static DecodeStatus DecodeQQQRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeFPR128_loRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeThreeAddrSRegInstruction(MCInst &Inst, uint32_t insn, uint64_t Address, const void *Decoder)
static const unsigned DDDecoderTable[]
Generic base class for all target subtargets.
static const unsigned ZZZZDecoderTable[]
static DecodeStatus DecodeSVEIncDecImm(MCInst &Inst, unsigned Imm, uint64_t Addr, const void *Decoder)
static DecodeStatus DecodeFixedPointScaleImm64(MCInst &Inst, unsigned Imm, uint64_t Address, const void *Decoder)
static bool isValidDecodeLogicalImmediate(uint64_t val, unsigned regSize)
isValidDecodeLogicalImmediate - Check to see if the logical immediate value in the form "N:immr:imms"...
static void RegisterMCSymbolizer(Target &T, Target::MCSymbolizerCtorTy Fn)
RegisterMCSymbolizer - Register an MCSymbolizer implementation for the given target.
static DecodeStatus DecodeVecShiftR16ImmNarrow(MCInst &Inst, unsigned Imm, uint64_t Addr, const void *Decoder)
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.
static DecodeStatus DecodeVecShiftR8Imm(MCInst &Inst, unsigned Imm, uint64_t Addr, const void *Decoder)
const MCSubtargetInfo & getSubtargetInfo() const
This class implements an extremely fast bulk output stream that can only output to a stream...
static MCDisassembler * createAArch64Disassembler(const Target &T, const MCSubtargetInfo &STI, MCContext &Ctx)
#define LLVM_FALLTHROUGH
LLVM_FALLTHROUGH - Mark fallthrough cases in switch statements.
void addOperand(const MCOperand &Op)
unsigned getOpcode() const
const char *(* LLVMSymbolLookupCallback)(void *DisInfo, uint64_t ReferenceValue, uint64_t *ReferenceType, uint64_t ReferencePC, const char **ReferenceName)
The type for the symbol lookup function.
static MCOperand createImm(int64_t Val)
static DecodeStatus DecodeFPR32RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus DecodeVecShiftR16Imm(MCInst &Inst, unsigned Imm, uint64_t Addr, const void *Decoder)
static DecodeStatus DecodeWSeqPairsClassRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Addr, const void *Decoder)
static DecodeStatus DecodeFPR8RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)