+ unsigned Reg = RegsToSave[i];
+ int FrameIdx;
+ const TargetRegisterClass *RC = RegInfo->getRegClass(Reg);
+
+ // Check to see if this physreg must be spilled to a particular stack slot
+ // on this target.
+ std::pair<unsigned,int> *FixedSlot = FixedSpillSlots;
+ while (FixedSlot != FixedSpillSlots+NumFixedSpillSlots &&
+ FixedSlot->first != Reg)
+ ++FixedSlot;
+
+ if (FixedSlot == FixedSpillSlots+NumFixedSpillSlots) {
+ // Nope, just spill it anywhere convenient.
+ FrameIdx = FFI->CreateStackObject(RC);
+ } else {
+ // Spill it to the stack where we must.
+ FrameIdx = FFI->CreateFixedObject(RC->getSize(), FixedSlot->second);
+ }