1 // RUN: llvm-tblgen -gen-disassembler -I %p/../../include %s | FileCheck %s
3 // Test for OPC_ExtractField/OPC_CheckField with start bit > 255.
4 // These large start values may arise for architectures with long instruction
7 include "llvm/Target/Target.td"
9 def archInstrInfo : InstrInfo { }
12 let InstructionSet = archInstrInfo;
15 class TestInstruction : Instruction {
17 let OutOperandList = (outs);
18 let InOperandList = (ins);
20 field bits<512> SoftFail = 0;
23 def InstA : TestInstruction {
24 let Inst{509-502} = {0,0,0,0,?,?,?,?};
25 let AsmString = "InstA";
28 def InstB : TestInstruction {
29 let Inst{509-502} = {0,0,0,0,0,0,?,?};
30 let AsmString = "InstB";
31 let DecoderMethod = "DecodeInstB";
32 let hasCompleteDecoder = 0;
36 // 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,
43 // CHECK: if (!Check(S, DecodeInstB(MI, insn, Address, Decoder))) { DecodeComplete = false; return MCDisassembler::Fail; }