forked from OSchip/llvm-project
encode size information into each ValueType
Add new RegisterInfo class llvm-svn: 7469
This commit is contained in:
parent
0ef2353b01
commit
75c817a482
|
@ -11,18 +11,18 @@
|
||||||
// Value types - These values correspond to the register types defined in the
|
// Value types - These values correspond to the register types defined in the
|
||||||
// ValueTypes.h file.
|
// 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 i1 : ValueType<1>; // One bit boolean value
|
||||||
def i8 : ValueType; // 8-bit integer value
|
def i8 : ValueType<8>; // 8-bit integer value
|
||||||
def i16 : ValueType; // 16-bit integer value
|
def i16 : ValueType<16>; // 16-bit integer value
|
||||||
def i32 : ValueType; // 32-bit integer value
|
def i32 : ValueType<32>; // 32-bit integer value
|
||||||
def i64 : ValueType; // 64-bit integer value
|
def i64 : ValueType<64>; // 64-bit integer value
|
||||||
def i128 : ValueType; // 128-bit integer value
|
def i128 : ValueType<128>; // 128-bit integer value
|
||||||
def f32 : ValueType; // 32-bit floating point value
|
def f32 : ValueType<32>; // 32-bit floating point value
|
||||||
def f64 : ValueType; // 64-bit floating point value
|
def f64 : ValueType<64>; // 64-bit floating point value
|
||||||
def f80 : ValueType; // 80-bit floating point value
|
def f80 : ValueType<80>; // 80-bit floating point value
|
||||||
def f128 : ValueType; // 128-bit floating point value
|
def f128 : ValueType<128>; // 128-bit floating point value
|
||||||
|
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
@ -61,6 +61,7 @@ class RegisterClass<ValueType regType, int alignment, list<Register> regList> {
|
||||||
// Alignment - Specify the alignment required of the registers when they are
|
// Alignment - Specify the alignment required of the registers when they are
|
||||||
// stored or loaded to memory.
|
// stored or loaded to memory.
|
||||||
//
|
//
|
||||||
|
int Size = RegType.Size;
|
||||||
int Alignment = alignment;
|
int Alignment = alignment;
|
||||||
|
|
||||||
// MemberList - Specify which registers are in this class. If the
|
// MemberList - Specify which registers are in this class. If the
|
||||||
|
@ -76,6 +77,27 @@ class RegisterClass<ValueType regType, int alignment, list<Register> regList> {
|
||||||
code allocation_order_end;
|
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 -
|
// Instruction set description -
|
||||||
|
|
Loading…
Reference in New Issue