diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-29 20:31:52 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-29 20:31:52 +0000 |
commit | 2cfd52c507bd5790457a171eb9bcb39019cc6860 (patch) | |
tree | 32ee499ddd00d0df27a59cdd085b5afab4c6f632 /lib/Target/PowerPC | |
parent | 0531d04d002c6d9489b4d1a85f49734e5c27e6f7 (diff) | |
download | llvm-2cfd52c507bd5790457a171eb9bcb39019cc6860.tar.gz llvm-2cfd52c507bd5790457a171eb9bcb39019cc6860.tar.bz2 llvm-2cfd52c507bd5790457a171eb9bcb39019cc6860.tar.xz |
Give getPointerRegClass() a "kind" value so that targets can
support multiple different pointer register classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77501 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC')
-rw-r--r-- | lib/Target/PowerPC/PPCRegisterInfo.cpp | 6 | ||||
-rw-r--r-- | lib/Target/PowerPC/PPCRegisterInfo.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/Target/PowerPC/PPCRegisterInfo.cpp b/lib/Target/PowerPC/PPCRegisterInfo.cpp index 6016eb461e..b124e60735 100644 --- a/lib/Target/PowerPC/PPCRegisterInfo.cpp +++ b/lib/Target/PowerPC/PPCRegisterInfo.cpp @@ -140,11 +140,11 @@ PPCRegisterInfo::PPCRegisterInfo(const PPCSubtarget &ST, /// getPointerRegClass - Return the register class to use to hold pointers. /// This is used for addressing modes. -const TargetRegisterClass *PPCRegisterInfo::getPointerRegClass() const { +const TargetRegisterClass * +PPCRegisterInfo::getPointerRegClass(unsigned Kind) const { if (Subtarget.isPPC64()) return &PPC::G8RCRegClass; - else - return &PPC::GPRCRegClass; + return &PPC::GPRCRegClass; } const unsigned* diff --git a/lib/Target/PowerPC/PPCRegisterInfo.h b/lib/Target/PowerPC/PPCRegisterInfo.h index ddaefdd2a3..2b5ad14160 100644 --- a/lib/Target/PowerPC/PPCRegisterInfo.h +++ b/lib/Target/PowerPC/PPCRegisterInfo.h @@ -37,7 +37,7 @@ public: /// getPointerRegClass - Return the register class to use to hold pointers. /// This is used for addressing modes. - virtual const TargetRegisterClass *getPointerRegClass() const; + virtual const TargetRegisterClass *getPointerRegClass(unsigned Kind=0) const; /// Code Generation virtual methods... const unsigned *getCalleeSavedRegs(const MachineFunction* MF = 0) const; |