summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorStephen Lin <stephenwlin@gmail.com>2013-06-26 22:27:50 +0000
committerStephen Lin <stephenwlin@gmail.com>2013-06-26 22:27:50 +0000
commitfc5eb5e264682eabe47aa6cfdd972c1803361e4c (patch)
tree4f2b550f4c3301bd680b4d427ba68f03f4685f0b /llvm
parent907d1766a8e948d3c8ca1f3697fea3793f9ac19d (diff)
downloadbcm5719-llvm-fc5eb5e264682eabe47aa6cfdd972c1803361e4c.tar.gz
bcm5719-llvm-fc5eb5e264682eabe47aa6cfdd972c1803361e4c.zip
Clarify and doxygen-ify comments
llvm-svn: 185030
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp20
-rw-r--r--llvm/lib/Target/ARM/ARMBaseRegisterInfo.h16
2 files changed, 20 insertions, 16 deletions
diff --git a/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp b/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp
index 0e1e50e5293..6a9bfc34d22 100644
--- a/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp
+++ b/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp
@@ -72,17 +72,21 @@ ARMBaseRegisterInfo::getCallPreservedMask(CallingConv::ID) const {
}
const uint32_t*
-ARMBaseRegisterInfo::getThisReturnPreservedMask(CallingConv::ID) const {
- return (STI.isTargetIOS() && !STI.isAAPCS_ABI())
- ? CSR_iOS_ThisReturn_RegMask : CSR_AAPCS_ThisReturn_RegMask;
- // This should return NULL in the case of any calling convention that does
- // not use the same register for an i32 first argument and an i32 return
- // value
+ARMBaseRegisterInfo::getNoPreservedMask() const {
+ return CSR_NoRegs_RegMask;
}
const uint32_t*
-ARMBaseRegisterInfo::getNoPreservedMask() const {
- return CSR_NoRegs_RegMask;
+ARMBaseRegisterInfo::getThisReturnPreservedMask(CallingConv::ID) const {
+ // This should return a register mask that is the same as that returned by
+ // getCallPreservedMask but that additionally preserves the register used for
+ // the first i32 argument (which must also be the register used to return a
+ // single i32 return value)
+ //
+ // In case that the calling convention does not use the same register for
+ // both, the function should return NULL (does not currently apply)
+ return (STI.isTargetIOS() && !STI.isAAPCS_ABI())
+ ? CSR_iOS_ThisReturn_RegMask : CSR_AAPCS_ThisReturn_RegMask;
}
BitVector ARMBaseRegisterInfo::
diff --git a/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h b/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h
index be3f1368f69..cdaad053f9f 100644
--- a/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h
+++ b/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h
@@ -96,14 +96,14 @@ public:
const uint32_t *getCallPreservedMask(CallingConv::ID) const;
const uint32_t *getNoPreservedMask() const;
- // getThisReturnPreservedMask - Returns a call preserved mask specific to the
- // case that 'returned' is an i32 first argument if the calling convention
- // is one that can (partially) model this attribute with a preserved mask
- // (i.e. it is a calling convention that uses the same register for the first
- // i32 argument and an i32 return value)
- //
- // Should return NULL in the case that the calling convention does not have
- // this property
+ /// getThisReturnPreservedMask - Returns a call preserved mask specific to the
+ /// case that 'returned' is on an i32 first argument if the calling convention
+ /// is one that can (partially) model this attribute with a preserved mask
+ /// (i.e. it is a calling convention that uses the same register for the first
+ /// i32 argument and an i32 return value)
+ ///
+ /// Should return NULL in the case that the calling convention does not have
+ /// this property
const uint32_t *getThisReturnPreservedMask(CallingConv::ID) const;
BitVector getReservedRegs(const MachineFunction &MF) const;
OpenPOWER on IntegriCloud