Add super-register set.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36295 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2007-04-21 00:54:06 +00:00
parent 3831c553e3
commit 50aadb9693

View File

@ -40,11 +40,15 @@ class Type;
/// Registers that this does not apply to simply should set this to null.
/// The SubRegs field is a zero terminated array of registers that are
/// sub-registers of the specific register, e.g. AL, AH are sub-registers of AX.
/// The SuperRegs field is a zero terminated array of registers that are
/// super-registers of the specific register, e.g. RAX, EAX, are sub-registers
/// of AX.
///
struct TargetRegisterDesc {
const char *Name; // Assembly language name for the register
const unsigned *AliasSet; // Register Alias Set, described above
const unsigned *SubRegs; // Sub-register set, described above
const unsigned *SuperRegs; // Super-register set, described above
};
class TargetRegisterClass {
@ -271,13 +275,21 @@ public:
}
/// getSubRegisters - Return the set of registers that are sub-registers of
// the specified register, or a null list of there are none. The list
/// the specified register, or a null list of there are none. The list
/// returned is zero terminated.
///
const unsigned *getSubRegisters(unsigned RegNo) const {
return get(RegNo).SubRegs;
}
/// getSuperRegisters - Return the set of registers that are super-registers
/// of the specified register, or a null list of there are none. The list
/// returned is zero terminated.
///
const unsigned *getSuperRegisters(unsigned RegNo) const {
return get(RegNo).SuperRegs;
}
/// getName - Return the symbolic target specific name for the specified
/// physical register.
const char *getName(unsigned RegNo) const {