@@ -487,18 +487,6 @@ DecodeStatus AMDGPUDisassembler::tryDecodeInst(const uint8_t *Table, MCInst &MI,
487487 return MCDisassembler::Fail;
488488}
489489
490- template <typename InsnType>
491- DecodeStatus
492- AMDGPUDisassembler::tryDecodeInst (const uint8_t *Table1, const uint8_t *Table2,
493- MCInst &MI, InsnType Inst, uint64_t Address,
494- raw_ostream &Comments) const {
495- for (const uint8_t *T : {Table1, Table2}) {
496- if (DecodeStatus Res = tryDecodeInst (T, MI, Inst, Address, Comments))
497- return Res;
498- }
499- return MCDisassembler::Fail;
500- }
501-
502490template <typename T> static inline T eatBytes (ArrayRef<uint8_t >& Bytes) {
503491 assert (Bytes.size () >= sizeof (T));
504492 const auto Res =
@@ -617,18 +605,15 @@ DecodeStatus AMDGPUDisassembler::getInstruction(MCInst &MI, uint64_t &Size,
617605 std::bitset<96 > DecW = eat12Bytes (Bytes);
618606
619607 if (isGFX11 () &&
620- tryDecodeInst (DecoderTableGFX1196, DecoderTableGFX11_FAKE1696, MI,
621- DecW, Address, CS))
608+ tryDecodeInst (DecoderTableGFX1196, MI, DecW, Address, CS))
622609 break ;
623610
624611 if (isGFX1250 () &&
625- tryDecodeInst (DecoderTableGFX125096, DecoderTableGFX1250_FAKE1696, MI,
626- DecW, Address, CS))
612+ tryDecodeInst (DecoderTableGFX125096, MI, DecW, Address, CS))
627613 break ;
628614
629615 if (isGFX12 () &&
630- tryDecodeInst (DecoderTableGFX1296, DecoderTableGFX12_FAKE1696, MI,
631- DecW, Address, CS))
616+ tryDecodeInst (DecoderTableGFX1296, MI, DecW, Address, CS))
632617 break ;
633618
634619 if (isGFX12 () &&
@@ -698,18 +683,13 @@ DecodeStatus AMDGPUDisassembler::getInstruction(MCInst &MI, uint64_t &Size,
698683 break ;
699684
700685 if (isGFX1250 () &&
701- tryDecodeInst (DecoderTableGFX125064, DecoderTableGFX1250_FAKE1664, MI,
702- QW, Address, CS))
686+ tryDecodeInst (DecoderTableGFX125064, MI, QW, Address, CS))
703687 break ;
704688
705- if (isGFX12 () &&
706- tryDecodeInst (DecoderTableGFX1264, DecoderTableGFX12_FAKE1664, MI, QW,
707- Address, CS))
689+ if (isGFX12 () && tryDecodeInst (DecoderTableGFX1264, MI, QW, Address, CS))
708690 break ;
709691
710- if (isGFX11 () &&
711- tryDecodeInst (DecoderTableGFX1164, DecoderTableGFX11_FAKE1664, MI, QW,
712- Address, CS))
692+ if (isGFX11 () && tryDecodeInst (DecoderTableGFX1164, MI, QW, Address, CS))
713693 break ;
714694
715695 if (isGFX11 () &&
@@ -753,19 +733,14 @@ DecodeStatus AMDGPUDisassembler::getInstruction(MCInst &MI, uint64_t &Size,
753733 if (isGFX10 () && tryDecodeInst (DecoderTableGFX1032, MI, DW, Address, CS))
754734 break ;
755735
756- if (isGFX11 () &&
757- tryDecodeInst (DecoderTableGFX1132, DecoderTableGFX11_FAKE1632, MI, DW,
758- Address, CS))
736+ if (isGFX11 () && tryDecodeInst (DecoderTableGFX1132, MI, DW, Address, CS))
759737 break ;
760738
761739 if (isGFX1250 () &&
762- tryDecodeInst (DecoderTableGFX125032, DecoderTableGFX1250_FAKE1632, MI,
763- DW, Address, CS))
740+ tryDecodeInst (DecoderTableGFX125032, MI, DW, Address, CS))
764741 break ;
765742
766- if (isGFX12 () &&
767- tryDecodeInst (DecoderTableGFX1232, DecoderTableGFX12_FAKE1632, MI, DW,
768- Address, CS))
743+ if (isGFX12 () && tryDecodeInst (DecoderTableGFX1232, MI, DW, Address, CS))
769744 break ;
770745 }
771746
0 commit comments