1 // RUN: llvm-tblgen -gen-asm-writer -I %p/../../include %s | FileCheck %s
3 include "llvm/Target/Target.td"
5 def ArchInstrInfo : InstrInfo { }
8 let InstructionSet = ArchInstrInfo;
11 def R0 : Register<"r0">;
12 def Reg : RegisterClass<"Reg", [i32], 0, (add R0)>;
14 def IntOperand: Operand<i32>;
16 def PCRelOperand : Operand<i32> {
17 let OperandType = "OPERAND_PCREL";
20 def foo : Instruction {
21 let OutOperandList = (outs);
22 let InOperandList = (ins Reg:$reg, IntOperand:$imm);
23 let AsmString = "foo $reg, $imm";
26 def bar : Instruction {
27 let OutOperandList = (outs);
28 let InOperandList = (ins Reg:$reg, PCRelOperand:$imm);
29 let AsmString = "bar $reg, $imm";
32 // CHECK: ArchInstPrinter::printInstruction(
34 // CHECK-NEXT: printOperand(MI, 0, O);
36 // CHECK-NEXT: printOperand(MI, 1, O);
38 // CHECK-NEXT: printOperand(MI, Address, 1, O);