XCore target: Fix llvm.eh.return and EH info register handling

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201561 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Robert Lytton
2014-02-18 11:21:48 +00:00
parent eb720cc3a1
commit 9409825b57
5 changed files with 331 additions and 121 deletions
@@ -58,3 +58,15 @@ int XCoreFunctionInfo::createFPSpillSlot(MachineFunction &MF) {
return FPSpillSlot;
}
const int* XCoreFunctionInfo::createEHSpillSlot(MachineFunction &MF) {
if (EHSpillSlotSet) {
return EHSpillSlot;
}
const TargetRegisterClass *RC = &XCore::GRRegsRegClass;
MachineFrameInfo *MFI = MF.getFrameInfo();
EHSpillSlot[0] = MFI->CreateStackObject(RC->getSize(), RC->getAlignment(), true);
EHSpillSlot[1] = MFI->CreateStackObject(RC->getSize(), RC->getAlignment(), true);
EHSpillSlotSet = true;
return EHSpillSlot;
}