summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2013-08-23 02:25:47 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2013-08-23 02:25:47 +0000
commita8960a1f7ce5c52dc95a43617a43e390bf42177d (patch)
treefe0b7edf864cbcac919e4e27d01864474a1d8884 /llvm/lib/Target/Sparc/SparcRegisterInfo.cpp
parentd136f60b07ebbb6fd8991433cb0285f6dacfed6f (diff)
downloadbcm5719-llvm-a8960a1f7ce5c52dc95a43617a43e390bf42177d.tar.gz
bcm5719-llvm-a8960a1f7ce5c52dc95a43617a43e390bf42177d.zip
Add an OtherPreserved field to the CalleeSaved TableGen class.
This field specifies registers that are preserved across function calls, but that should not be included in the generates SaveList array. This can be used ot generate regmasks for architectures that save registers through other means, like SPARC's register windows. llvm-svn: 189084
Diffstat (limited to 'llvm/lib/Target/Sparc/SparcRegisterInfo.cpp')
-rw-r--r--llvm/lib/Target/Sparc/SparcRegisterInfo.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp b/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp
index dc97f06b7ca..0b0fe2d4fe8 100644
--- a/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp
+++ b/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp
@@ -40,8 +40,12 @@ SparcRegisterInfo::SparcRegisterInfo(SparcSubtarget &st)
const uint16_t* SparcRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF)
const {
- static const uint16_t CalleeSavedRegs[] = { 0 };
- return CalleeSavedRegs;
+ return CSR_SaveList;
+}
+
+const uint32_t*
+SparcRegisterInfo::getCallPreservedMask(CallingConv::ID CC) const {
+ return CSR_RegMask;
}
BitVector SparcRegisterInfo::getReservedRegs(const MachineFunction &MF) const {
OpenPOWER on IntegriCloud