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 Reg : Register<"reg">;
13 def RegClass : RegisterClass<"foo", [i32], 0, (add Reg)>;
15 def IntOperand: Operand<i32>;
17 def foo : Instruction {
19 let OutOperandList = (outs);
20 let InOperandList = (ins IntOperand:$imm);
21 let AsmString = "foo $imm";
22 let Namespace = "Arch";
25 def FooBraces : InstAlias<"foo \\{$imm\\}", (foo IntOperand:$imm)>;
27 // CHECK: static const char AsmStrings[] =
28 // CHECK-NEXT: /* 0 */ "foo {$\x01}\0"