diff --git a/llvm/include/llvm/MC/MCDecoderOps.h b/llvm/include/llvm/MC/MCDecoderOps.h index dea5b6931250f..d2e7cbf27b04b 100644 --- a/llvm/include/llvm/MC/MCDecoderOps.h +++ b/llvm/include/llvm/MC/MCDecoderOps.h @@ -30,7 +30,6 @@ enum DecoderOps { // nts_t NumToSkip) OPC_TryDecodeOrFail, // OPC_TryDecodeOrFail(uleb128 Opcode, uleb128 DIdx) OPC_SoftFail, // OPC_SoftFail(uleb128 PMask, uleb128 NMask) - OPC_Fail // OPC_Fail() }; } // namespace llvm::MCD diff --git a/llvm/test/TableGen/FixedLenDecoderEmitter/additional-encoding.td b/llvm/test/TableGen/FixedLenDecoderEmitter/additional-encoding.td index 192cb3c3f5858..503822c37371e 100644 --- a/llvm/test/TableGen/FixedLenDecoderEmitter/additional-encoding.td +++ b/llvm/test/TableGen/FixedLenDecoderEmitter/additional-encoding.td @@ -47,7 +47,6 @@ class I : Instruction { // CHECK-NEXT: /* 59 */ MCD::OPC_CheckField, 6, 6, 0, 4, 0, // Skip to: 69 // CHECK-NEXT: /* 65 */ MCD::OPC_Decode, {{[0-9]+}}, 2, 0, // Opcode: {{.*}}:NOP // CHECK-NEXT: /* 69 */ MCD::OPC_TryDecodeOrFail, {{[0-9]+}}, 2, 1, -// CHECK-NEXT: /* 73 */ MCD::OPC_Fail, class SHIFT opc> : I<(outs), (ins ShAmtOp:$shamt)>, EncSHIFT; def SHIFT0 : SHIFT<0>; diff --git a/llvm/test/TableGen/FixedLenDecoderEmitter/big-filter.td b/llvm/test/TableGen/FixedLenDecoderEmitter/big-filter.td index e525b4e7219df..7e2cda1bae9ed 100644 --- a/llvm/test/TableGen/FixedLenDecoderEmitter/big-filter.td +++ b/llvm/test/TableGen/FixedLenDecoderEmitter/big-filter.td @@ -11,7 +11,7 @@ class I : Instruction { // Check that a 64-bit filter with all bits set does not confuse DecoderEmitter. // -// CHECK-LABEL: static const uint8_t DecoderTable128[35] = { +// CHECK-LABEL: static const uint8_t DecoderTable128[34] = { // CHECK-NEXT: MCD::OPC_ExtractField, 0, 64, // CHECK-NEXT: MCD::OPC_FilterValue, 1, 8, 0, // CHECK-NEXT: MCD::OPC_CheckFieldOrFail, 127, 1, 1, @@ -19,7 +19,6 @@ class I : Instruction { // CHECK-NEXT: MCD::OPC_FilterValueOrFail, 255, 255, 255, 255, 255, 255, 255, 255, 255, 1, // CHECK-NEXT: MCD::OPC_CheckFieldOrFail, 127, 1, 0, // CHECK-NEXT: MCD::OPC_Decode, 186, 2, 0, -// CHECK-NEXT: MCD::OPC_Fail, // CHECK-NEXT: }; def I1 : I { diff --git a/llvm/test/TableGen/HwModeEncodeDecode.td b/llvm/test/TableGen/HwModeEncodeDecode.td index 991054f8a279f..a5cae61997bc5 100644 --- a/llvm/test/TableGen/HwModeEncodeDecode.td +++ b/llvm/test/TableGen/HwModeEncodeDecode.td @@ -70,10 +70,10 @@ def baz : Instruction { } } -// DECODER-LABEL: DecoderTable_ModeA32[22] = +// DECODER-LABEL: DecoderTable_ModeA32 // DECODER-DAG: Opcode: fooTypeEncA:foo // DECODER-DAG: Opcode: bar -// DECODER-LABEL: DecoderTable_ModeB32[30] = +// DECODER-LABEL: DecoderTable_ModeB32 // DECODER-DAG: Opcode: fooTypeEncB:foo // DECODER-DAG: Opcode: fooTypeEncA:baz // DECODER-DAG: Opcode: bar diff --git a/llvm/test/TableGen/HwModeEncodeDecode2.td b/llvm/test/TableGen/HwModeEncodeDecode2.td index a62d723837c8f..8e65fcfcb4a1b 100644 --- a/llvm/test/TableGen/HwModeEncodeDecode2.td +++ b/llvm/test/TableGen/HwModeEncodeDecode2.td @@ -93,26 +93,26 @@ let OutOperandList = (outs) in { } } -// DECODER-LABEL: DecoderTable_ModeA32[22] = +// DECODER-LABEL: DecoderTable_ModeA32 // DECODER-DAG: Opcode: fooTypeEncA:foo // DECODER-DAG: Opcode: bar -// DECODER-LABEL: DecoderTable_ModeB32[30] = +// DECODER-LABEL: DecoderTable_ModeB32 // DECODER-DAG: Opcode: fooTypeEncB:foo // DECODER-DAG: Opcode: fooTypeEncA:baz // DECODER-DAG: Opcode: bar -// DECODER-LABEL: DecoderTableAlt_ModeA32[9] = +// DECODER-LABEL: DecoderTableAlt_ModeA32 // DECODER-DAG: Opcode: unrelated -// DECODER-LABEL: DecoderTableAlt_ModeB32[9] = +// DECODER-LABEL: DecoderTableAlt_ModeB32 // DECODER-DAG: Opcode: unrelated -// DECODER-SUPPRESS-LABEL: DecoderTable32[9] = +// DECODER-SUPPRESS-LABEL: DecoderTable32 // DECODER-SUPPRESS-DAG: Opcode: bar -// DECODER-SUPPRESS-LABEL: DecoderTable_ModeA32[9] = +// DECODER-SUPPRESS-LABEL: DecoderTable_ModeA32 // DECODER-SUPPRESS-DAG: Opcode: fooTypeEncA:foo // DECODER-SUPPRESS-NOT: Opcode: bar -// DECODER-SUPPRESS-LABEL: DecoderTable_ModeB32[22] = +// DECODER-SUPPRESS-LABEL: DecoderTable_ModeB32 // DECODER-SUPPRESS-DAG: Opcode: fooTypeEncB:foo // DECODER-SUPPRESS-DAG: Opcode: fooTypeEncA:baz // DECODER-SUPPRESS-NOT: Opcode: bar -// DECODER-SUPPRESS-LABEL: DecoderTableAlt32[9] = +// DECODER-SUPPRESS-LABEL: DecoderTableAlt32 // DECODER-SUPPRESS-DAG: Opcode: unrelated diff --git a/llvm/test/TableGen/HwModeEncodeDecode3.td b/llvm/test/TableGen/HwModeEncodeDecode3.td index a7366949f4017..dbbf866f057e5 100644 --- a/llvm/test/TableGen/HwModeEncodeDecode3.td +++ b/llvm/test/TableGen/HwModeEncodeDecode3.td @@ -116,46 +116,46 @@ def unrelated: Instruction { // significant duplication of DecoderTables. The four tables ‘DecoderTableAlt32’, // ‘DecoderTableAlt_ModeA32’, ‘DecoderTableAlt_ModeB32’ and 'DecoderTable_ModeC32' are // exact duplicates and could effectively be merged into one. -// DECODER-LABEL: DecoderTable32[9] = +// DECODER-LABEL: DecoderTable32 // DECODER-DAG: Opcode: bar -// DECODER-LABEL: DecoderTable64[9] = +// DECODER-LABEL: DecoderTable64 // DECODER-DAG: Opcode: fooTypeEncDefault:foo -// DECODER-LABEL: DecoderTable_ModeA32[22] = +// DECODER-LABEL: DecoderTable_ModeA32 // DECODER-DAG: Opcode: fooTypeEncA:foo // DECODER-DAG: Opcode: bar -// DECODER-LABEL: DecoderTable_ModeB32[30] = +// DECODER-LABEL: DecoderTable_ModeB32 // DECODER-DAG: Opcode: fooTypeEncB:foo // DECODER-DAG: Opcode: fooTypeEncA:baz // DECODER-DAG: Opcode: bar -// DECODER-LABEL: DecoderTable_ModeC32[22] = +// DECODER-LABEL: DecoderTable_ModeC32 // DECODER-DAG: Opcode: fooTypeEncC:foo // DECODER-DAG: Opcode: bar -// DECODER-LABEL: DecoderTableAlt32[9] = +// DECODER-LABEL: DecoderTableAlt32 // DECODER-DAG: Opcode: unrelated -// DECODER-LABEL: DecoderTableAlt_ModeA32[9] = +// DECODER-LABEL: DecoderTableAlt_ModeA32 // DECODER-DAG: Opcode: unrelated -// DECODER-LABEL: DecoderTableAlt_ModeB32[9] = +// DECODER-LABEL: DecoderTableAlt_ModeB32 // DECODER-DAG: Opcode: unrelated -// DECODER-LABEL: DecoderTableAlt_ModeC32[9] = +// DECODER-LABEL: DecoderTableAlt_ModeC32 // DECODER-DAG: Opcode: unrelated // Under the 'O1' optimization level, unnecessary duplicate tables will be eliminated, // reducing the four ‘Alt’ tables down to just one. -// DECODER-SUPPRESS-O1-LABEL: DecoderTable32[9] = +// DECODER-SUPPRESS-O1-LABEL: DecoderTable32 // DECODER-SUPPRESS-O1-DAG: Opcode: bar -// DECODER-SUPPRESS-O1-LABEL: DecoderTable64[9] = +// DECODER-SUPPRESS-O1-LABEL: DecoderTable64 // DECODER-SUPPRESS-O1-DAG: Opcode: fooTypeEncDefault:foo -// DECODER-SUPPRESS-O1-LABEL: DecoderTable_ModeA32[22] = +// DECODER-SUPPRESS-O1-LABEL: DecoderTable_ModeA32 // DECODER-SUPPRESS-O1-DAG: Opcode: fooTypeEncA:foo // DECODER-SUPPRESS-O1-DAG: Opcode: bar -// DECODER-SUPPRESS-O1-LABEL: DecoderTable_ModeB32[30] = +// DECODER-SUPPRESS-O1-LABEL: DecoderTable_ModeB32 // DECODER-SUPPRESS-O1-DAG: Opcode: fooTypeEncB:foo // DECODER-SUPPRESS-O1-DAG: Opcode: fooTypeEncA:baz // DECODER-SUPPRESS-O1-DAG: Opcode: bar -// DECODER-SUPPRESS-O1-LABEL: DecoderTable_ModeC32[22] = +// DECODER-SUPPRESS-O1-LABEL: DecoderTable_ModeC32 // DECODER-SUPPRESS-O1-DAG: Opcode: fooTypeEncC:foo // DECODER-SUPPRESS-O1-DAG: Opcode: bar -// DECODER-SUPPRESS-O1-LABEL: DecoderTableAlt32[9] = +// DECODER-SUPPRESS-O1-LABEL: DecoderTableAlt32 // DECODER-SUPPRESS-O1-DAG: Opcode: unrelated // Under the 'O2' optimization condition, instructions possessing the 'EncodingByHwMode' @@ -164,22 +164,22 @@ def unrelated: Instruction { // attribute but are within the same DecoderNamespace will be stored in the 'Default' table. This // approach will significantly reduce instruction redundancy, but it necessitates users to thoroughly // consider the interplay between HwMode and DecoderNamespace for their instructions. -// DECODER-SUPPRESS-O2-LABEL: DecoderTable32[9] = +// DECODER-SUPPRESS-O2-LABEL: DecoderTable32 // DECODER-SUPPRESS-O2-DAG: Opcode: bar -// DECODER-SUPPRESS-O2-LABEL: DecoderTable64[9] = +// DECODER-SUPPRESS-O2-LABEL: DecoderTable64 // DECODER-SUPPRESS-O2-NOT: Opcode: bar // DECODER-SUPPRESS-O2-DAG: Opcode: fooTypeEncDefault:foo -// DECODER-SUPPRESS-O2-LABEL: DecoderTable_ModeA32[9] = +// DECODER-SUPPRESS-O2-LABEL: DecoderTable_ModeA32 // DECODER-SUPPRESS-O2-DAG: Opcode: fooTypeEncA:foo // DECODER-SUPPRESS-O2-NOT: Opcode: bar -// DECODER-SUPPRESS-O2-LABEL: DecoderTable_ModeB32[22] = +// DECODER-SUPPRESS-O2-LABEL: DecoderTable_ModeB32 // DECODER-SUPPRESS-O2-DAG: Opcode: fooTypeEncB:foo // DECODER-SUPPRESS-O2-DAG: Opcode: fooTypeEncA:baz // DECODER-SUPPRESS-O2-NOT: Opcode: bar -// DECODER-SUPPRESS-O2-LABEL: DecoderTable_ModeC32[13] = +// DECODER-SUPPRESS-O2-LABEL: DecoderTable_ModeC32 // DECODER-SUPPRESS-O2-DAG: Opcode: fooTypeEncC:foo // DECODER-SUPPRESS-O2-NOT: Opcode: bar -// DECODER-SUPPRESS-O2-LABEL: DecoderTableAlt32[9] = +// DECODER-SUPPRESS-O2-LABEL: DecoderTableAlt32 // DECODER-SUPPRESS-O2-DAG: Opcode: unrelated // For 'bar' and 'unrelated', we didn't assign any HwModes for them, diff --git a/llvm/test/TableGen/VarLenDecoder.td b/llvm/test/TableGen/VarLenDecoder.td index 06ff62294a196..769c5895ec3c1 100644 --- a/llvm/test/TableGen/VarLenDecoder.td +++ b/llvm/test/TableGen/VarLenDecoder.td @@ -52,14 +52,14 @@ def FOO32 : MyVarInst { // CHECK-SMALL-NEXT: /* 7 */ MCD::OPC_Decode, {{[0-9]+}}, {{[0-9]+}}, 0, // Opcode: FOO16 // CHECK-SMALL-NEXT: /* 11 */ MCD::OPC_FilterValueOrFail, 9, // CHECK-SMALL-NEXT: /* 13 */ MCD::OPC_Decode, {{[0-9]+}}, {{[0-9]+}}, 1, // Opcode: FOO32 -// CHECK-SMALL-NEXT: /* 17 */ MCD::OPC_Fail, +// CHECK-SMALL-NEXT: }; // CHECK-LARGE: /* 0 */ MCD::OPC_ExtractField, 3, 5, // Inst{7-3} ... // CHECK-LARGE-NEXT: /* 3 */ MCD::OPC_FilterValue, 8, 4, 0, 0, // Skip to: 12 // CHECK-LARGE-NEXT: /* 8 */ MCD::OPC_Decode, {{[0-9]+}}, {{[0-9]+}}, 0, // Opcode: FOO16 // CHECK-LARGE-NEXT: /* 12 */ MCD::OPC_FilterValueOrFail, 9, // CHECK-LARGE-NEXT: /* 14 */ MCD::OPC_Decode, {{[0-9]+}}, {{[0-9]+}}, 1, // Opcode: FOO32 -// CHECK-LARGE-NEXT: /* 18 */ MCD::OPC_Fail, +// CHECK-LARGE-NEXT: }; // Instruction length table // CHECK: 27, diff --git a/llvm/test/TableGen/trydecode-emission.td b/llvm/test/TableGen/trydecode-emission.td index c3178dd71cf4b..6e47909b8f09a 100644 --- a/llvm/test/TableGen/trydecode-emission.td +++ b/llvm/test/TableGen/trydecode-emission.td @@ -39,7 +39,7 @@ def InstB : TestInstruction { // CHECK-NEXT: /* 5 */ MCD::OPC_CheckField, 2, 2, 0, 6, 0, // Skip to: 17 // CHECK-NEXT: /* 11 */ MCD::OPC_TryDecode, {{[0-9]+}}, {{[0-9]+}}, 0, 0, 0, // Opcode: InstB, DecodeIdx: {{[0-9]+}}, Skip to: 17 // CHECK-NEXT: /* 17 */ MCD::OPC_Decode, {{[0-9]+}}, {{[0-9]+}}, 1, // Opcode: InstA, DecodeIdx: {{[0-9]+}} -// CHECK-NEXT: /* 21 */ MCD::OPC_Fail, +// CHECK-NEXT: }; // CHECK: if (!Check(S, DecodeInstB(MI, insn, Address, Decoder))) { DecodeComplete = false; return MCDisassembler::Fail; } @@ -52,7 +52,7 @@ def InstB : TestInstruction { // CHECK-LARGE-NEXT: /* 5 */ MCD::OPC_CheckField, 2, 2, 0, 7, 0, 0, // Skip to: 19 // CHECK-LARGE-NEXT: /* 12 */ MCD::OPC_TryDecode, {{[0-9]+}}, {{[0-9]+}}, 0, 0, 0, 0, // Opcode: InstB, DecodeIdx: {{[0-9]+}}, Skip to: 19 // CHECK-LARGE-NEXT: /* 19 */ MCD::OPC_Decode, {{[0-9]+}}, {{[0-9]+}}, 1, // Opcode: InstA, DecodeIdx: {{[0-9]+}} -// CHECK-LARGE-NEXT: /* 23 */ MCD::OPC_Fail, +// CHECK-LARGE-NEXT: }; // CHECK-LARGE: if (!Check(S, DecodeInstB(MI, insn, Address, Decoder))) { DecodeComplete = false; return MCDisassembler::Fail; } diff --git a/llvm/test/TableGen/trydecode-emission2.td b/llvm/test/TableGen/trydecode-emission2.td index 4c8a95eff5dd1..826b1715514f9 100644 --- a/llvm/test/TableGen/trydecode-emission2.td +++ b/llvm/test/TableGen/trydecode-emission2.td @@ -39,7 +39,7 @@ def InstB : TestInstruction { // CHECK-NEXT: /* 16 */ MCD::OPC_TryDecode, {{[0-9]+}}, {{[0-9]+}}, 0, 0, 0, // Opcode: InstB, DecodeIdx: {{[0-9]+}}, Skip to: 22 // CHECK-NEXT: /* 22 */ MCD::OPC_CheckFieldOrFail, 3, 2, 0, // CHECK-NEXT: /* 26 */ MCD::OPC_TryDecodeOrFail, {{[0-9]+}}, {{[0-9]+}}, 1, -// CHECK-NEXT: /* 30 */ MCD::OPC_Fail, +// CHECK-NEXT: }; // CHECK: if (!Check(S, DecodeInstB(MI, insn, Address, Decoder))) { DecodeComplete = false; return MCDisassembler::Fail; } // CHECK: if (!Check(S, DecodeInstA(MI, insn, Address, Decoder))) { DecodeComplete = false; return MCDisassembler::Fail; } @@ -52,7 +52,7 @@ def InstB : TestInstruction { // CHECK-LARGE-NEXT: /* 17 */ MCD::OPC_TryDecode, {{[0-9]+}}, {{[0-9]+}}, 0, 0, 0, 0, // Opcode: InstB, DecodeIdx: {{[0-9]+}}, Skip to: 24 // CHECK-LARGE-NEXT: /* 24 */ MCD::OPC_CheckFieldOrFail, 3, 2, 0, // CHECK-LARGE-NEXT: /* 28 */ MCD::OPC_TryDecodeOrFail, {{[0-9]+}}, {{[0-9]+}}, 1, -// CHECK-LARGE-NEXT: /* 32 */ MCD::OPC_Fail, +// CHECK-LARGE-NEXT: }; // CHECK-LARGE: if (!Check(S, DecodeInstB(MI, insn, Address, Decoder))) { DecodeComplete = false; return MCDisassembler::Fail; } // CHECK-LARGE: if (!Check(S, DecodeInstA(MI, insn, Address, Decoder))) { DecodeComplete = false; return MCDisassembler::Fail; } diff --git a/llvm/test/TableGen/trydecode-emission3.td b/llvm/test/TableGen/trydecode-emission3.td index f262bfab77c3b..039a37ba416f6 100644 --- a/llvm/test/TableGen/trydecode-emission3.td +++ b/llvm/test/TableGen/trydecode-emission3.td @@ -40,7 +40,7 @@ def InstB : TestInstruction { // CHECK-NEXT: /* 5 */ MCD::OPC_CheckField, 2, 2, 0, 6, 0, // Skip to: 17 // CHECK-NEXT: /* 11 */ MCD::OPC_TryDecode, {{[0-9]+}}, {{[0-9]+}}, 0, 0, 0, // Opcode: InstB, DecodeIdx: {{[0-9]+}}, Skip to: 17 // CHECK-NEXT: /* 17 */ MCD::OPC_Decode, {{[0-9]+}}, {{[0-9]+}}, 1, // Opcode: InstA -// CHECK-NEXT: /* 21 */ MCD::OPC_Fail, +// CHECK-NEXT: }; // CHECK: if (!Check(S, DecodeInstBOp(MI, tmp, Address, Decoder))) { DecodeComplete = false; return MCDisassembler::Fail; } @@ -49,6 +49,6 @@ def InstB : TestInstruction { // CHECK-LARGE-NEXT: /* 5 */ MCD::OPC_CheckField, 2, 2, 0, 7, 0, 0, // Skip to: 19 // CHECK-LARGE-NEXT: /* 12 */ MCD::OPC_TryDecode, {{[0-9]+}}, {{[0-9]+}}, 0, 0, 0, 0, // Opcode: InstB, DecodeIdx: {{[0-9]+}}, Skip to: 19 // CHECK-LARGE-NEXT: /* 19 */ MCD::OPC_Decode, {{[0-9]+}}, {{[0-9]+}}, 1, // Opcode: InstA, DecodeIdx: {{[0-9]+}} -// CHECK-LARGE-NEXT: /* 23 */ MCD::OPC_Fail, +// CHECK-LARGE-NEXT: }; // CHECK-LARGE: if (!Check(S, DecodeInstBOp(MI, tmp, Address, Decoder))) { DecodeComplete = false; return MCDisassembler::Fail; } diff --git a/llvm/test/TableGen/trydecode-emission4.td b/llvm/test/TableGen/trydecode-emission4.td index 2c63229c053a5..d00d17501f16f 100644 --- a/llvm/test/TableGen/trydecode-emission4.td +++ b/llvm/test/TableGen/trydecode-emission4.td @@ -38,7 +38,7 @@ def InstB : TestInstruction { // CHECK-NEXT: /* 6 */ MCD::OPC_CheckField, 248, 3, 2, 0, 6, 0, // Skip to: 19 // CHECK-NEXT: /* 13 */ MCD::OPC_TryDecode, {{[0-9]+}}, {{[0-9]+}}, 0, 0, 0, // Opcode: InstB, DecodeIdx: {{[0-9]+}}, Skip to: 19 // CHECK-NEXT: /* 19 */ MCD::OPC_Decode, {{[0-9]+}}, {{[0-9]+}}, 1, // Opcode: InstA, DecodeIdx: {{[0-9]+}} -// CHECK-NEXT: /* 23 */ MCD::OPC_Fail, +// CHECK-NEXT: }; // CHECK: if (!Check(S, DecodeInstB(MI, insn, Address, Decoder))) { DecodeComplete = false; return MCDisassembler::Fail; } @@ -48,7 +48,7 @@ def InstB : TestInstruction { // CHECK-LARGE-NEXT: /* 6 */ MCD::OPC_CheckField, 248, 3, 2, 0, 7, 0, 0, // Skip to: 21 // CHECK-LARGE-NEXT: /* 14 */ MCD::OPC_TryDecode, {{[0-9]+}}, {{[0-9]+}}, 0, 0, 0, 0, // Opcode: InstB, DecodeIdx: {{[0-9]+}}, Skip to: 21 // CHECK-LARGE-NEXT: /* 21 */ MCD::OPC_Decode, {{[0-9]+}}, {{[0-9]+}}, 1, // Opcode: InstA, DecodeIdx: {{[0-9]+}} -// CHECK-LARGE-NEXT: /* 25 */ MCD::OPC_Fail, +// CHECK-LARGE-NEXT: }; // CHECK-LARGE: if (!Check(S, DecodeInstB(MI, insn, Address, Decoder))) { DecodeComplete = false; return MCDisassembler::Fail; } diff --git a/llvm/utils/TableGen/DecoderEmitter.cpp b/llvm/utils/TableGen/DecoderEmitter.cpp index 4f6eeb3922f9a..34ad78f72db13 100644 --- a/llvm/utils/TableGen/DecoderEmitter.cpp +++ b/llvm/utils/TableGen/DecoderEmitter.cpp @@ -312,7 +312,7 @@ struct DecoderTableInfo { PredicateSet Predicates; DecoderSet Decoders; - bool isOutermostScope() const { return FixupStack.size() == 1; } + bool isOutermostScope() const { return FixupStack.empty(); } void pushScope() { FixupStack.emplace_back(); } @@ -770,8 +770,6 @@ unsigned DecoderEmitter::emitTable(formatted_raw_ostream &OS, uint32_t Index = ((I - Table.begin()) + NumToSkip); OS << (InComment ? ", " : "// "); OS << "Skip to: " << Index; - if (*(I + NumToSkip) == MCD::OPC_Fail) - OS << " (Fail)"; }; unsigned OpcodeMask = 0; @@ -910,9 +908,6 @@ unsigned DecoderEmitter::emitTable(formatted_raw_ostream &OS, OS << '\n'; break; } - case MCD::OPC_Fail: - OS << " MCD::OPC_Fail,\n"; - break; } } OS << "};\n\n"; @@ -2327,10 +2322,6 @@ static DecodeStatus decodeInstruction(const uint8_t DecodeTable[], MCInst &MI, })"; } OS << R"( - case MCD::OPC_Fail: { - LLVM_DEBUG(dbgs() << Loc << ": OPC_Fail\n"); - return MCDisassembler::Fail; - } } } llvm_unreachable("bogosity detected in disassembler state machine!"); @@ -2566,14 +2557,8 @@ namespace { // predicates and decoders themselves, however, are shared across all // decoders to give more opportunities for uniqueing. TableInfo.Table.clear(); - TableInfo.pushScope(); FC.emitTableEntries(TableInfo); - // Any NumToSkip fixups in the top level scope can resolve to the - // OPC_Fail at the end of the table. assert(TableInfo.isOutermostScope() && "fixup stack phasing error!"); - TableInfo.popScope(); - - TableInfo.Table.insertOpcode(MCD::OPC_Fail); // Print the table to the output stream. OpcodeMask |= emitTable(OS, TableInfo.Table, DecoderNamespace, HwModeID,