// Value types - These values correspond to the register types defined in the
// ValueTypes.h file.
//
-class ValueType { string Namespace = "MVT"; }
+class ValueType<int size> { string Namespace = "MVT"; int Size = size; }
-def i1 : ValueType; // One bit boolean value
-def i8 : ValueType; // 8-bit integer value
-def i16 : ValueType; // 16-bit integer value
-def i32 : ValueType; // 32-bit integer value
-def i64 : ValueType; // 64-bit integer value
-def i128 : ValueType; // 128-bit integer value
-def f32 : ValueType; // 32-bit floating point value
-def f64 : ValueType; // 64-bit floating point value
-def f80 : ValueType; // 80-bit floating point value
-def f128 : ValueType; // 128-bit floating point value
+def i1 : ValueType<1>; // One bit boolean value
+def i8 : ValueType<8>; // 8-bit integer value
+def i16 : ValueType<16>; // 16-bit integer value
+def i32 : ValueType<32>; // 32-bit integer value
+def i64 : ValueType<64>; // 64-bit integer value
+def i128 : ValueType<128>; // 128-bit integer value
+def f32 : ValueType<32>; // 32-bit floating point value
+def f64 : ValueType<64>; // 64-bit floating point value
+def f80 : ValueType<80>; // 80-bit floating point value
+def f128 : ValueType<128>; // 128-bit floating point value
//===----------------------------------------------------------------------===//
// Alignment - Specify the alignment required of the registers when they are
// stored or loaded to memory.
//
+ int Size = RegType.Size;
int Alignment = alignment;
// MemberList - Specify which registers are in this class. If the
code allocation_order_end;
}
+// RegisterInfo - This class should only be instantiated once to provide
+// parameters which are global to the the target machine, such as callee safed
+// registers.
+//
+class RegisterInfo {
+ // ClassName - Specify the name of the class that should be generated by the
+ // register info emitter. This class may be further subclasses by custom
+ // target code to implement virtual methods as necessary. Targets must
+ // specify a value for this.
+ //
+ string ClassName;
+
+ // CalleeSavedRegisters - As you might guess, this is a list of the callee
+ // saved registers for a target.
+ list<Register> CalleeSavedRegisters = [];
+
+ // PointerType - Specify the value type to be used to represent pointers in
+ // this target. Typically this is an i32 or i64 type.
+ ValueType PointerType;
+}
+
//===----------------------------------------------------------------------===//
// Instruction set description -