Clarify and doxygen-ify comments

llvm-svn: 185030
This commit is contained in:
Stephen Lin 2013-06-26 22:27:50 +00:00
parent 907d1766a8
commit fc5eb5e264
2 changed files with 20 additions and 16 deletions

View File

@ -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::

View File

@ -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;