Skip to content

Commit a82cfbd

Browse files
committed
Fixes
1 parent dda3726 commit a82cfbd

File tree

8 files changed

+108
-54
lines changed

8 files changed

+108
-54
lines changed

llvm/lib/Target/AArch64/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ tablegen(LLVM AArch64GenAsmWriter.inc -gen-asm-writer)
77
tablegen(LLVM AArch64GenAsmWriter1.inc -gen-asm-writer -asmwriternum=1)
88
tablegen(LLVM AArch64GenCallingConv.inc -gen-callingconv)
99
tablegen(LLVM AArch64GenDAGISel.inc -gen-dag-isel)
10-
tablegen(LLVM AArch64GenDisassemblerTables.inc -gen-disassembler --num-to-skip-size=3)
10+
tablegen(LLVM AArch64GenDisassemblerTables.inc -gen-disassembler
11+
--large-decoder-table)
1112
tablegen(LLVM AArch64GenFastISel.inc -gen-fast-isel)
1213
tablegen(LLVM AArch64GenGlobalISel.inc -gen-global-isel)
1314
tablegen(LLVM AArch64GenO0PreLegalizeGICombiner.inc -gen-global-isel-combiner

llvm/test/TableGen/VarLenDecoder.td

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: llvm-tblgen -gen-disassembler -I %p/../../include %s | FileCheck %s
1+
// RUN: llvm-tblgen -gen-disassembler -I %p/../../include %s | FileCheck %s --check-prefixes=CHECK,CHECK-SMALL
2+
// RUN: llvm-tblgen -gen-disassembler --large-decoder-table -I %p/../../include %s | FileCheck %s --check-prefixes=CHECK,CHECK-LARGE
23

34
include "llvm/Target/Target.td"
45

@@ -46,12 +47,19 @@ def FOO32 : MyVarInst<MemOp32> {
4647
);
4748
}
4849

49-
// CHECK: MCD::OPC_ExtractField, 3, 5, // Inst{7-3} ...
50-
// CHECK-NEXT: MCD::OPC_FilterValue, 8, 4, 0, // Skip to: 11
51-
// CHECK-NEXT: MCD::OPC_Decode, {{[0-9]+}}, {{[0-9]+}}, 0, // Opcode: FOO16
52-
// CHECK-NEXT: MCD::OPC_FilterValue, 9, 4, 0, // Skip to: 19
53-
// CHECK-NEXT: MCD::OPC_Decode, {{[0-9]+}}, {{[0-9]+}}, 1, // Opcode: FOO32
54-
// CHECK-NEXT: MCD::OPC_Fail,
50+
// CHECK-SMALL: MCD::OPC_ExtractField, 3, 5, // Inst{7-3} ...
51+
// CHECK-SMALL-NEXT: MCD::OPC_FilterValue, 8, 4, 0, // Skip to: 11
52+
// CHECK-SMALL-NEXT: MCD::OPC_Decode, {{[0-9]+}}, {{[0-9]+}}, 0, // Opcode: FOO16
53+
// CHECK-SMALL-NEXT: MCD::OPC_FilterValue, 9, 4, 0, // Skip to: 19
54+
// CHECK-SMALL-NEXT: MCD::OPC_Decode, {{[0-9]+}}, {{[0-9]+}}, 1, // Opcode: FOO32
55+
// CHECK-SMALL-NEXT: MCD::OPC_Fail,
56+
57+
// CHECK-LARGE: /* 0 */ MCD::OPC_ExtractField, 3, 5, // Inst{7-3} ...
58+
// CHECK-LARGE-NEXT: /* 3 */ MCD::OPC_FilterValue, 8, 4, 0, 0, // Skip to: 12
59+
// CHECK-LARGE-NEXT: /* 8 */ MCD::OPC_Decode, 178, 2, 0, // Opcode: FOO16
60+
// CHECK-LARGE-NEXT: /* 12 */ MCD::OPC_FilterValue, 9, 4, 0, 0, // Skip to: 21
61+
// CHECK-LARGE-NEXT: /* 17 */ MCD::OPC_Decode, 179, 2, 1, // Opcode: FOO32
62+
// CHECK-LARGE-NEXT: /* 21 */ MCD::OPC_Fail,
5563

5664
// Instruction length table
5765
// CHECK: 27,

llvm/test/TableGen/trydecode-emission.td

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: llvm-tblgen -gen-disassembler -I %p/../../include %s | FileCheck %s
2+
// RUN: llvm-tblgen -gen-disassembler --large-decoder-table -I %p/../../include %s | FileCheck %s --check-prefix=CHECK-LARGE
23

34
// Check that if decoding of an instruction fails and the instruction does not
45
// have a complete decoder method that can determine if the bitpattern is valid
@@ -41,3 +42,21 @@ def InstB : TestInstruction {
4142
// CHECK-NEXT: /* 23 */ MCD::OPC_Fail,
4243

4344
// CHECK: if (!Check(S, DecodeInstB(MI, insn, Address, Decoder))) { DecodeComplete = false; return MCDisassembler::Fail; }
45+
46+
// CHECK: unsigned NumToSkip = *Ptr++;
47+
// CHECK-NEXT: NumToSkip |= (*Ptr++) << 8;
48+
// CHECK-NEXT: return NumToSkip;
49+
50+
// CHECK-LARGE: /* 0 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ...
51+
// CHECK-LARGE-NEXT: /* 3 */ MCD::OPC_FilterValue, 0, 18, 0, 0, // Skip to: 26
52+
// CHECK-LARGE-NEXT: /* 8 */ MCD::OPC_CheckField, 2, 2, 0, 7, 0, 0, // Skip to: 22
53+
// CHECK-LARGE-NEXT: /* 15 */ MCD::OPC_TryDecode, 179, 2, 0, 0, 0, 0, // Opcode: InstB, skip to: 22
54+
// CHECK-LARGE-NEXT: /* 22 */ MCD::OPC_Decode, 178, 2, 1, // Opcode: InstA
55+
// CHECK-LARGE-NEXT: /* 26 */ MCD::OPC_Fail,
56+
57+
// CHECK-LARGE: if (!Check(S, DecodeInstB(MI, insn, Address, Decoder))) { DecodeComplete = false; return MCDisassembler::Fail; }
58+
59+
// CHECK-LARGE: unsigned NumToSkip = *Ptr++;
60+
// CHECK-LARGE-NEXT: NumToSkip |= (*Ptr++) << 8;
61+
// CHECK-LARGE-NEXT: NumToSkip |= (*Ptr++) << 16;
62+
// CHECK-LARGE-NEXT: return NumToSkip;

llvm/test/TableGen/trydecode-emission2.td

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: llvm-tblgen -gen-disassembler -I %p/../../include %s | FileCheck %s
2+
// RUN: llvm-tblgen -gen-disassembler --large-decoder-table -I %p/../../include %s | FileCheck %s --check-prefix=CHECK-LARGE
23

34
include "llvm/Target/Target.td"
45

@@ -42,3 +43,16 @@ def InstB : TestInstruction {
4243

4344
// CHECK: if (!Check(S, DecodeInstB(MI, insn, Address, Decoder))) { DecodeComplete = false; return MCDisassembler::Fail; }
4445
// CHECK: if (!Check(S, DecodeInstA(MI, insn, Address, Decoder))) { DecodeComplete = false; return MCDisassembler::Fail; }
46+
47+
// CHECK-LARGE: /* 0 */ MCD::OPC_ExtractField, 2, 1, // Inst{2} ...
48+
// CHECK-LARGE-NEXT: /* 3 */ MCD::OPC_FilterValue, 0, 36, 0, 0, // Skip to: 44
49+
// CHECK-LARGE-NEXT: /* 8 */ MCD::OPC_ExtractField, 5, 3, // Inst{7-5} ...
50+
// CHECK-LARGE-NEXT: /* 11 */ MCD::OPC_FilterValue, 0, 28, 0, 0, // Skip to: 44
51+
// CHECK-LARGE-NEXT: /* 16 */ MCD::OPC_CheckField, 0, 2, 3, 7, 0, 0, // Skip to: 30
52+
// CHECK-LARGE-NEXT: /* 23 */ MCD::OPC_TryDecode, 179, 2, 0, 0, 0, 0, // Opcode: InstB, skip to: 30
53+
// CHECK-LARGE-NEXT: /* 30 */ MCD::OPC_CheckField, 3, 2, 0, 7, 0, 0, // Skip to: 44
54+
// CHECK-LARGE-NEXT: /* 37 */ MCD::OPC_TryDecode, 178, 2, 1, 0, 0, 0, // Opcode: InstA, skip to: 44
55+
// CHECK-LARGE-NEXT: /* 44 */ MCD::OPC_Fail,
56+
57+
// CHECK-LARGE: if (!Check(S, DecodeInstB(MI, insn, Address, Decoder))) { DecodeComplete = false; return MCDisassembler::Fail; }
58+
// CHECK-LARGE: if (!Check(S, DecodeInstA(MI, insn, Address, Decoder))) { DecodeComplete = false; return MCDisassembler::Fail; }

llvm/test/TableGen/trydecode-emission3.td

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: llvm-tblgen -gen-disassembler --num-to-skip-size=3 -I %p/../../include %s | FileCheck %s
1+
// RUN: llvm-tblgen -gen-disassembler -I %p/../../include %s | FileCheck %s
2+
// RUN: llvm-tblgen -gen-disassembler --large-decoder-table -I %p/../../include %s | FileCheck %s --check-prefix=CHECK-LARGE
23

34
include "llvm/Target/Target.td"
45

@@ -35,10 +36,19 @@ def InstB : TestInstruction {
3536
}
3637

3738
// CHECK: /* 0 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ...
38-
// CHECK-NEXT: /* 3 */ MCD::OPC_FilterValue, 0, 18, 0, 0, // Skip to: 26
39-
// CHECK-NEXT: /* 8 */ MCD::OPC_CheckField, 2, 2, 0, 7, 0, 0, // Skip to: 22
40-
// CHECK-NEXT: /* 15 */ MCD::OPC_TryDecode, {{[0-9]+}}, {{[0-9]+}}, 0, 0, 0, 0, // Opcode: InstB, skip to: 22
41-
// CHECK-NEXT: /* 22 */ MCD::OPC_Decode, {{[0-9]+}}, {{[0-9]+}}, 1, // Opcode: InstA
42-
// CHECK-NEXT: /* 26 */ MCD::OPC_Fail,
39+
// CHECK-NEXT: /* 3 */ MCD::OPC_FilterValue, 0, 16, 0, // Skip to: 23
40+
// CHECK-NEXT: /* 7 */ MCD::OPC_CheckField, 2, 2, 0, 6, 0, // Skip to: 19
41+
// CHECK-NEXT: /* 13 */ MCD::OPC_TryDecode, 179, 2, 0, 0, 0, // Opcode: InstB, skip to: 19
42+
// CHECK-NEXT: /* 19 */ MCD::OPC_Decode, 178, 2, 1, // Opcode: InstA
43+
// CHECK-NEXT: /* 23 */ MCD::OPC_Fail,
4344

4445
// CHECK: if (!Check(S, DecodeInstBOp(MI, tmp, Address, Decoder))) { DecodeComplete = false; return MCDisassembler::Fail; }
46+
47+
// CHECK-LARGE: /* 0 */ MCD::OPC_ExtractField, 4, 4, // Inst{7-4} ...
48+
// CHECK-LARGE-NEXT: /* 3 */ MCD::OPC_FilterValue, 0, 18, 0, 0, // Skip to: 26
49+
// CHECK-LARGE-NEXT: /* 8 */ MCD::OPC_CheckField, 2, 2, 0, 7, 0, 0, // Skip to: 22
50+
// CHECK-LARGE-NEXT: /* 15 */ MCD::OPC_TryDecode, {{[0-9]+}}, {{[0-9]+}}, 0, 0, 0, 0, // Opcode: InstB, skip to: 22
51+
// CHECK-LARGE-NEXT: /* 22 */ MCD::OPC_Decode, {{[0-9]+}}, {{[0-9]+}}, 1, // Opcode: InstA
52+
// CHECK-LARGE-NEXT: /* 26 */ MCD::OPC_Fail,
53+
54+
// CHECK-LARGE: if (!Check(S, DecodeInstBOp(MI, tmp, Address, Decoder))) { DecodeComplete = false; return MCDisassembler::Fail; }

llvm/test/TableGen/trydecode-emission4.td

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: llvm-tblgen -gen-disassembler --num-to-skip-size=3 -I %p/../../include %s | FileCheck %s
1+
// RUN: llvm-tblgen -gen-disassembler -I %p/../../include %s | FileCheck %s
2+
// RUN: llvm-tblgen -gen-disassembler --large-decoder-table -I %p/../../include %s | FileCheck %s --check-prefix=CHECK-LARGE
23

34
// Test for OPC_ExtractField/OPC_CheckField with start bit > 255.
45
// These large start values may arise for architectures with long instruction
@@ -32,13 +33,22 @@ def InstB : TestInstruction {
3233
let hasCompleteDecoder = 0;
3334
}
3435

35-
3636
// CHECK: /* 0 */ MCD::OPC_ExtractField, 250, 3, 4, // Inst{509-506} ...
37-
// CHECK-NEXT: /* 4 */ MCD::OPC_FilterValue, 0, 19, 0, 0, // Skip to: 28
38-
// CHECK-NEXT: /* 9 */ MCD::OPC_CheckField, 248, 3, 2, 0, 7, 0, 0, // Skip to: 24
39-
// CHECK-NEXT: /* 17 */ MCD::OPC_TryDecode, {{[0-9]+}}, {{[0-9]+}}, 0, 0, 0, 0, // Opcode: InstB, skip to: 24
40-
// CHECK-NEXT: /* 24 */ MCD::OPC_Decode, {{[0-9]+}}, {{[0-9]+}}, 1, // Opcode: InstA
41-
// CHECK-NEXT: /* 28 */ MCD::OPC_Fail,
37+
// CHECK-NEXT: /* 4 */ MCD::OPC_FilterValue, 0, 17, 0, // Skip to: 25
38+
// CHECK-NEXT: /* 8 */ MCD::OPC_CheckField, 248, 3, 2, 0, 6, 0, // Skip to: 21
39+
// CHECK-NEXT: /* 15 */ MCD::OPC_TryDecode, 179, 2, 0, 0, 0, // Opcode: InstB, skip to: 21
40+
// CHECK-NEXT: /* 21 */ MCD::OPC_Decode, 178, 2, 1, // Opcode: InstA
41+
// CHECK-NEXT: /* 25 */ MCD::OPC_Fail,
4242

4343
// CHECK: if (!Check(S, DecodeInstB(MI, insn, Address, Decoder))) { DecodeComplete = false; return MCDisassembler::Fail; }
4444

45+
46+
// CHECK-LARGE: /* 0 */ MCD::OPC_ExtractField, 250, 3, 4, // Inst{509-506} ...
47+
// CHECK-LARGE-NEXT: /* 4 */ MCD::OPC_FilterValue, 0, 19, 0, 0, // Skip to: 28
48+
// CHECK-LARGE-NEXT: /* 9 */ MCD::OPC_CheckField, 248, 3, 2, 0, 7, 0, 0, // Skip to: 24
49+
// CHECK-LARGE-NEXT: /* 17 */ MCD::OPC_TryDecode, {{[0-9]+}}, {{[0-9]+}}, 0, 0, 0, 0, // Opcode: InstB, skip to: 24
50+
// CHECK-LARGE-NEXT: /* 24 */ MCD::OPC_Decode, {{[0-9]+}}, {{[0-9]+}}, 1, // Opcode: InstA
51+
// CHECK-LARGE-NEXT: /* 28 */ MCD::OPC_Fail,
52+
53+
// CHECK-LARGE: if (!Check(S, DecodeInstB(MI, insn, Address, Decoder))) { DecodeComplete = false; return MCDisassembler::Fail; }
54+

llvm/utils/TableGen/DecoderEmitter.cpp

Lines changed: 24 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ static cl::opt<SuppressLevel> DecoderEmitterSuppressDuplicates(
7878
"significantly reducing Table Duplications")),
7979
cl::init(SUPPRESSION_DISABLE), cl::cat(DisassemblerEmitterCat));
8080

81-
static cl::opt<uint32_t>
82-
NumToSkipSizeInBytes("num-to-skip-size",
83-
cl::desc("number of bytes to use for num-to-skip "
84-
"entries in the decoder table (2 or 3)"),
85-
cl::init(2), cl::cat(DisassemblerEmitterCat));
81+
static cl::opt<bool> LargeTable(
82+
"large-decoder-table",
83+
cl::desc("Use large decoder table format. This uses 24 bits for offset\n"
84+
"in the table instead of the default 16 bits."),
85+
cl::init(false), cl::cat(DisassemblerEmitterCat));
8686

8787
STATISTIC(NumEncodings, "Number of encodings considered");
8888
STATISTIC(NumEncodingsLackingDisasm,
@@ -93,6 +93,8 @@ STATISTIC(NumEncodingsOmitted, "Number of encodings omitted");
9393

9494
namespace {
9595

96+
unsigned getNumToSkipInBytes() { return LargeTable ? 3 : 2; }
97+
9698
struct EncodingField {
9799
unsigned Base, Width, Offset;
98100
EncodingField(unsigned B, unsigned W, unsigned O)
@@ -138,25 +140,25 @@ struct DecoderTable : public std::vector<uint8_t> {
138140
// in the table for patching.
139141
size_t insertNumToSkip() {
140142
size_t Size = size();
141-
insert(end(), NumToSkipSizeInBytes, 0);
143+
insert(end(), getNumToSkipInBytes(), 0);
142144
return Size;
143145
}
144146

145147
void patchNumToSkip(size_t FixupIdx, uint32_t DestIdx) {
146148
// Calculate the distance from the byte following the fixup entry byte
147149
// to the destination. The Target is calculated from after the
148-
// `NumToSkipSizeInBytes`-byte NumToSkip entry itself, so subtract
149-
// `NumToSkipSizeInBytes` from the displacement here to account for that.
150-
assert(DestIdx >= FixupIdx + NumToSkipSizeInBytes &&
150+
// `getNumToSkipInBytes()`-byte NumToSkip entry itself, so subtract
151+
// `getNumToSkipInBytes()` from the displacement here to account for that.
152+
assert(DestIdx >= FixupIdx + getNumToSkipInBytes() &&
151153
"Expecting a forward jump in the decoding table");
152-
uint32_t Delta = DestIdx - FixupIdx - NumToSkipSizeInBytes;
153-
if (!isUIntN(8 * NumToSkipSizeInBytes, Delta))
154+
uint32_t Delta = DestIdx - FixupIdx - getNumToSkipInBytes();
155+
if (!isUIntN(8 * getNumToSkipInBytes(), Delta))
154156
PrintFatalError(
155-
"disassembler decoding table too large, try --num-to-skip-size=3");
157+
"disassembler decoding table too large, try --large-decoder-table");
156158

157159
(*this)[FixupIdx] = static_cast<uint8_t>(Delta);
158160
(*this)[FixupIdx + 1] = static_cast<uint8_t>(Delta >> 8);
159-
if (NumToSkipSizeInBytes == 3)
161+
if (getNumToSkipInBytes() == 3)
160162
(*this)[FixupIdx + 2] = static_cast<uint8_t>(Delta >> 16);
161163
}
162164
};
@@ -824,7 +826,7 @@ void DecoderEmitter::emitTable(formatted_raw_ostream &OS, DecoderTable &Table,
824826
OS << (unsigned)*I++ << ", ";
825827
};
826828

827-
// Emit `NumToSkipSizeInBytes`-byte numtoskip value to OS, returning the
829+
// Emit `getNumToSkipInBytes()`-byte numtoskip value to OS, returning the
828830
// NumToSkip value.
829831
auto emitNumToSkip = [](DecoderTable::const_iterator &I,
830832
formatted_raw_ostream &OS) {
@@ -834,7 +836,7 @@ void DecoderEmitter::emitTable(formatted_raw_ostream &OS, DecoderTable &Table,
834836
Byte = *I++;
835837
OS << (unsigned)Byte << ", ";
836838
NumToSkip |= Byte << 8;
837-
if (NumToSkipSizeInBytes == 3) {
839+
if (getNumToSkipInBytes() == 3) {
838840
Byte = *I++;
839841
OS << (unsigned)(Byte) << ", ";
840842
NumToSkip |= Byte << 16;
@@ -879,7 +881,6 @@ void DecoderEmitter::emitTable(formatted_raw_ostream &OS, DecoderTable &Table,
879881
// The filter value is ULEB128 encoded.
880882
emitULEB128(I, OS);
881883

882-
// numtoskip value.
883884
uint32_t NumToSkip = emitNumToSkip(I, OS);
884885
OS << "// Skip to: " << ((I - Table.begin()) + NumToSkip) << "\n";
885886
break;
@@ -894,7 +895,6 @@ void DecoderEmitter::emitTable(formatted_raw_ostream &OS, DecoderTable &Table,
894895
// ULEB128 encoded field value.
895896
emitULEB128(I, OS);
896897

897-
// numtoskip value.
898898
uint32_t NumToSkip = emitNumToSkip(I, OS);
899899
OS << "// Skip to: " << ((I - Table.begin()) + NumToSkip) << "\n";
900900
break;
@@ -903,7 +903,6 @@ void DecoderEmitter::emitTable(formatted_raw_ostream &OS, DecoderTable &Table,
903903
OS << Indent << "MCD::OPC_CheckPredicate, ";
904904
emitULEB128(I, OS);
905905

906-
// numtoskip value.
907906
uint32_t NumToSkip = emitNumToSkip(I, OS);
908907
OS << "// Skip to: " << ((I - Table.begin()) + NumToSkip) << "\n";
909908
break;
@@ -933,7 +932,6 @@ void DecoderEmitter::emitTable(formatted_raw_ostream &OS, DecoderTable &Table,
933932

934933
// Fallthrough for OPC_TryDecode.
935934

936-
// numtoskip value.
937935
uint32_t NumToSkip = emitNumToSkip(I, OS);
938936

939937
OS << "// Opcode: " << NumberedEncodings[EncodingID]
@@ -1405,9 +1403,8 @@ void FilterChooser::emitSingletonTableEntry(DecoderTableInfo &TableInfo,
14051403
TableInfo.Table.push_back(NumBits);
14061404
TableInfo.Table.insertULEB128(Ilnd.FieldVal);
14071405

1408-
// Allocate space in the table for fixup (NumToSkipSizeInBytes) so all
1409-
// our relative position calculations work OK even before we fully
1410-
// resolve the real value here.
1406+
// Allocate space in the table for fixup so all our relative position
1407+
// calculations work OK even before we fully resolve the real value here.
14111408

14121409
// Push location for NumToSkip backpatching.
14131410
TableInfo.FixupStack.back().push_back(TableInfo.Table.insertNumToSkip());
@@ -2151,16 +2148,14 @@ insertBits(InsnType &field, uint64_t bits, unsigned startBit, unsigned numBits)
21512148
// decodeInstruction().
21522149
static void emitDecodeInstruction(formatted_raw_ostream &OS,
21532150
bool IsVarLenInst) {
2154-
OS << formatv("\nconstexpr unsigned NumToSkipSizeInBytes = {};\n",
2155-
NumToSkipSizeInBytes);
2156-
21572151
OS << R"(
2158-
inline unsigned decodeNumToSkip(const uint8_t *&Ptr) {
2152+
static unsigned decodeNumToSkip(const uint8_t *&Ptr) {
21592153
unsigned NumToSkip = *Ptr++;
21602154
NumToSkip |= (*Ptr++) << 8;
2161-
if constexpr (NumToSkipSizeInBytes == 3)
2162-
NumToSkip |= (*Ptr++) << 16;
2163-
return NumToSkip;
2155+
)";
2156+
if (getNumToSkipInBytes() == 3)
2157+
OS << " NumToSkip |= (*Ptr++) << 16;\n";
2158+
OS << R"( return NumToSkip;
21642159
}
21652160
21662161
template <typename InsnType>
@@ -2399,9 +2394,6 @@ handleHwModesUnrelatedEncodings(const CodeGenInstruction *Instr,
23992394

24002395
// Emits disassembler code for instruction decoding.
24012396
void DecoderEmitter::run(raw_ostream &o) {
2402-
if (NumToSkipSizeInBytes != 2 && NumToSkipSizeInBytes != 3)
2403-
PrintFatalError("Invalid value for num-to-skip-size, must be 2 or 3");
2404-
24052397
formatted_raw_ostream OS(o);
24062398
OS << R"(
24072399
#include "llvm/MC/MCInst.h"

utils/bazel/llvm-project-overlay/llvm/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2148,7 +2148,7 @@ llvm_target_lib_list = [lib for lib in [
21482148
"lib/Target/AArch64/AArch64GenSubtargetInfo.inc",
21492149
),
21502150
(
2151-
["-gen-disassembler"],
2151+
["-gen-disassembler", "--large-decoder-table"],
21522152
"lib/Target/AArch64/AArch64GenDisassemblerTables.inc",
21532153
),
21542154
(

0 commit comments

Comments
 (0)