[llvm-commits] CVS: llvm/lib/Target/Target.td

Chris Lattner lattner at cs.uiuc.edu
Fri Aug 1 00:19:02 PDT 2003


Changes in directory llvm/lib/Target:

Target.td updated: 1.6 -> 1.7

---
Log message:

encode size information into each ValueType
Add new RegisterInfo class


---
Diffs of the changes:

Index: llvm/lib/Target/Target.td
diff -u llvm/lib/Target/Target.td:1.6 llvm/lib/Target/Target.td:1.7
--- llvm/lib/Target/Target.td:1.6	Wed Jul 30 17:16:41 2003
+++ llvm/lib/Target/Target.td	Fri Aug  1 00:18:03 2003
@@ -11,18 +11,18 @@
 // 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
 
 
 //===----------------------------------------------------------------------===//
@@ -61,6 +61,7 @@
   // 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
@@ -74,6 +75,27 @@
   //
   code allocation_order_begin;
   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;
 }
 
 





More information about the llvm-commits mailing list