diff options
author | Stephen Lin <stephenwlin@gmail.com> | 2013-06-26 22:27:50 +0000 |
---|---|---|
committer | Stephen Lin <stephenwlin@gmail.com> | 2013-06-26 22:27:50 +0000 |
commit | 165a7a925d73286abfc826b3d6339843b02c09e0 (patch) | |
tree | 505965cc3abf3251c286bb714949fbea4159a3f6 | |
parent | 096c0a03313ea43a1e4035645b02bf99fd35801a (diff) | |
download | external_llvm-165a7a925d73286abfc826b3d6339843b02c09e0.zip external_llvm-165a7a925d73286abfc826b3d6339843b02c09e0.tar.gz external_llvm-165a7a925d73286abfc826b3d6339843b02c09e0.tar.bz2 |
Clarify and doxygen-ify comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185030 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/ARM/ARMBaseRegisterInfo.cpp | 20 | ||||
-rw-r--r-- | lib/Target/ARM/ARMBaseRegisterInfo.h | 16 |
2 files changed, 20 insertions, 16 deletions
diff --git a/lib/Target/ARM/ARMBaseRegisterInfo.cpp b/lib/Target/ARM/ARMBaseRegisterInfo.cpp index 0e1e50e..6a9bfc3 100644 --- a/lib/Target/ARM/ARMBaseRegisterInfo.cpp +++ b/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/lib/Target/ARM/ARMBaseRegisterInfo.h b/lib/Target/ARM/ARMBaseRegisterInfo.h index be3f136..cdaad05 100644 --- a/lib/Target/ARM/ARMBaseRegisterInfo.h +++ b/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; |