llvm.org GIT mirror llvm / 3ee7d15
Implement ARMBaseRegisterInfo::getCallPreservedMask(). Move ARM callee-saved lists into ARMCallingConv.td. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148357 91177308-0d34-0410-b5e6-96231b3b80d8 Jakob Stoklund Olesen 8 years ago
3 changed file(s) with 18 addition(s) and 20 deletion(s). Raw diff Collapse all Expand all
6262
6363 const unsigned*
6464 ARMBaseRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
65 static const unsigned CalleeSavedRegs[] = {
66 ARM::LR, ARM::R11, ARM::R10, ARM::R9, ARM::R8,
67 ARM::R7, ARM::R6, ARM::R5, ARM::R4,
68
69 ARM::D15, ARM::D14, ARM::D13, ARM::D12,
70 ARM::D11, ARM::D10, ARM::D9, ARM::D8,
71 0
72 };
73
74 static const unsigned iOSCalleeSavedRegs[] = {
75 // iOS ABI deviates from ARM standard ABI. R9 is not a callee-saved
76 // register.
77 ARM::LR, ARM::R7, ARM::R6, ARM::R5, ARM::R4,
78 ARM::R11, ARM::R10, ARM::R8,
79
80 ARM::D15, ARM::D14, ARM::D13, ARM::D12,
81 ARM::D11, ARM::D10, ARM::D9, ARM::D8,
82 0
83 };
84 return (STI.isTargetIOS()) ? iOSCalleeSavedRegs : CalleeSavedRegs;
65 return (STI.isTargetIOS()) ? CSR_iOS_SaveList : CSR_AAPCS_SaveList;
66 }
67
68 const uint32_t*
69 ARMBaseRegisterInfo::getCallPreservedMask(CallingConv::ID) const {
70 return (STI.isTargetIOS()) ? CSR_iOS_RegMask : CSR_AAPCS_RegMask;
8571 }
8672
8773 BitVector ARMBaseRegisterInfo::
9494 public:
9595 /// Code Generation virtual methods...
9696 const unsigned *getCalleeSavedRegs(const MachineFunction *MF = 0) const;
97 const uint32_t *getCallPreservedMask(CallingConv::ID) const;
9798
9899 BitVector getReservedRegs(const MachineFunction &MF) const;
99100
163163 S9, S10, S11, S12, S13, S14, S15]>>,
164164 CCDelegateTo
165165 ]>;
166
167 //===----------------------------------------------------------------------===//
168 // Callee-saved register lists.
169 //===----------------------------------------------------------------------===//
170
171 def CSR_AAPCS : CalleeSavedRegs<(add LR, R11, R10, R9, R8, R7, R6, R5, R4,
172 (sequence "D%u", 15, 8))>;
173
174 // iOS ABI deviates from ARM standard ABI. R9 is not a callee-saved register.
175 // Also save R7-R4 first to match the stack frame fixed spill areas.
176 def CSR_iOS : CalleeSavedRegs<(add LR, R7, R6, R5, R4, (sub CSR_AAPCS, R9))>;