Skip to content

Commit

Permalink
Rename register classes to be upper case to make it obvious that they…
Browse files Browse the repository at this point in the history
… are X86

specific in the tree patterns


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7578 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
lattner committed Aug 4, 2003
1 parent bc21c34 commit 6770aed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions lib/Target/X86/X86RegisterInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,14 +254,14 @@ X86RegisterInfo::getRegClassForType(const Type* Ty) const {
default: assert(0 && "Invalid type to getClass!");
case Type::BoolTyID:
case Type::SByteTyID:
case Type::UByteTyID: return &r8Instance;
case Type::UByteTyID: return &R8Instance;
case Type::ShortTyID:
case Type::UShortTyID: return &r16Instance;
case Type::UShortTyID: return &R16Instance;
case Type::IntTyID:
case Type::UIntTyID:
case Type::PointerTyID: return &r32Instance;
case Type::PointerTyID: return &R32Instance;

case Type::FloatTyID:
case Type::DoubleTyID: return &rFPInstance;
case Type::DoubleTyID: return &RFPInstance;
}
}
8 changes: 4 additions & 4 deletions lib/Target/X86/X86RegisterInfo.td
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ def : RegisterAliases<SP, [ESP]>; def : RegisterAliases<BP, [EBP]>;
// top-level register classes. The order specified in the register list is
// implicitly defined to be the register allocation order.
//
def r8 : RegisterClass<i8, 1, [AL, CL, DL, BL, AH, CH, DH, BH]>;
def r16 : RegisterClass<i16, 2, [AX, CX, DX, BX, SI, DI, BP, SP]> {
def R8 : RegisterClass<i8, 1, [AL, CL, DL, BL, AH, CH, DH, BH]>;
def R16 : RegisterClass<i16, 2, [AX, CX, DX, BX, SI, DI, BP, SP]> {
let Methods = [{
iterator allocation_order_end(MachineFunction &MF) const {
if (hasFP(MF)) // Does the function dedicate EBP to being a frame ptr?
Expand All @@ -81,7 +81,7 @@ def r16 : RegisterClass<i16, 2, [AX, CX, DX, BX, SI, DI, BP, SP]> {
}];
}

def r32 : RegisterClass<i32, 4, [EAX, ECX, EDX, EBX, ESI, EDI, EBP, ESP]> {
def R32 : RegisterClass<i32, 4, [EAX, ECX, EDX, EBX, ESI, EDI, EBP, ESP]> {
let Methods = [{
iterator allocation_order_end(MachineFunction &MF) const {
if (hasFP(MF)) // Does the function dedicate EBP to being a frame ptr?
Expand All @@ -92,7 +92,7 @@ def r32 : RegisterClass<i32, 4, [EAX, ECX, EDX, EBX, ESI, EDI, EBP, ESP]> {
}];
}

def rFP : RegisterClass<f80, 4, [FP0, FP1, FP2, FP3, FP4, FP5, FP6]>;
def RFP : RegisterClass<f80, 4, [FP0, FP1, FP2, FP3, FP4, FP5, FP6]>;

// Registers which cannot be allocated... and are thus left unnamed.
def : RegisterClass<f80, 4, [ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7]>;
Expand Down

0 comments on commit 6770aed

Please sign in to comment.