1 // RUN: llvm-tblgen -gen-register-info -I %p/../../include -I %p/Common %s | FileCheck %s
3 // Configure and test TSFlags for a target.
4 include "llvm/Target/Target.td"
6 let Namespace = "MyTarget" in {
12 class MyClass <int size, list<ValueType> types, dag regList>
13 : RegisterClass <"MyTarget", types, size, regList> {
14 // Define the target bitfields.
18 // Associate the defined bitfields to unique bit positions in TSFlags.
23 // Default value for TSFlags.
24 def MyRegs : MyClass<32, [i32], (add R)>;
26 def SRegs : MyClass<32, [i32], (add S)> {
30 def DRegs : MyClass<32, [i32], (add D)>{
34 def SDRegs : MyClass<32, [i32], (add D, S)>{
39 def MyTarget : Target;
41 // CHECK: extern const TargetRegisterClass SDRegsRegClass = {
42 // CHECK: 0x07, /* TSFlags */
43 // CHECK: extern const TargetRegisterClass DRegsRegClass = {
44 // CHECK: 0x06, /* TSFlags */
45 // CHECK: extern const TargetRegisterClass MyRegsRegClass = {
46 // CHECK: 0x00, /* TSFlags */
47 // CHECK: extern const TargetRegisterClass SRegsRegClass = {
48 // CHECK: 0x01, /* TSFlags */