summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2011-12-09 22:23:45 +0000
committerdim <dim@FreeBSD.org>2011-12-09 22:23:45 +0000
commit0a8d9e83286f1e0207031442c8c9b143758a0a75 (patch)
tree9f786c58105dd9ad2fee073528a513777fea3e3c /contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp
parent1003872b67ebc3af8b693420f84097716d3b8395 (diff)
downloadFreeBSD-src-0a8d9e83286f1e0207031442c8c9b143758a0a75.zip
FreeBSD-src-0a8d9e83286f1e0207031442c8c9b143758a0a75.tar.gz
Upgrade our copy of llvm/clang to 3.0 release. Release notes can be
found at: http://llvm.org/releases/3.0/docs/ReleaseNotes.html MFC after: 1 week
Diffstat (limited to 'contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp')
-rw-r--r--contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp b/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp
index 7c42342..154f1f8 100644
--- a/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp
+++ b/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp
@@ -63,6 +63,13 @@ ARMBaseRegisterInfo::ARMBaseRegisterInfo(const ARMBaseInstrInfo &tii,
const unsigned*
ARMBaseRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
+ bool ghcCall = false;
+
+ if (MF) {
+ const Function *F = MF->getFunction();
+ ghcCall = (F ? F->getCallingConv() == CallingConv::GHC : false);
+ }
+
static const unsigned CalleeSavedRegs[] = {
ARM::LR, ARM::R11, ARM::R10, ARM::R9, ARM::R8,
ARM::R7, ARM::R6, ARM::R5, ARM::R4,
@@ -82,7 +89,13 @@ ARMBaseRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
ARM::D11, ARM::D10, ARM::D9, ARM::D8,
0
};
- return STI.isTargetDarwin() ? DarwinCalleeSavedRegs : CalleeSavedRegs;
+
+ static const unsigned GhcCalleeSavedRegs[] = {
+ 0
+ };
+
+ return ghcCall ? GhcCalleeSavedRegs :
+ STI.isTargetDarwin() ? DarwinCalleeSavedRegs : CalleeSavedRegs;
}
BitVector ARMBaseRegisterInfo::
OpenPOWER on IntegriCloud