[XCore] Support functions returning more than 4 words.
[oota-llvm.git] / lib / Target / XCore / XCoreMachineFunctionInfo.cpp
index c41a3d5f923a614a4f04ad9f586c2f7fd0db46de..9ef9752d0a5b0432075da3ae87f69dbb781663bf 100644 (file)
@@ -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;
+}
+