Support for non-landing pad exception handling.
[oota-llvm.git] / lib / Target / PowerPC / PPCRegisterInfo.cpp
index fb80350c557ddae2fcc8948290279def8dd88be7..3370c362f98e3e29499107bc68f5f3b43d9f98ac 100644 (file)
@@ -902,6 +902,10 @@ void PPCRegisterInfo::emitPrologue(MachineFunction &MF) const {
       Moves.push_back(MachineMove(FrameLabelId, CSDst, CSSrc));
     }
     
+    MachineLocation LRDst(MachineLocation::VirtualFP, LROffset);
+    MachineLocation LRSrc(IsPPC64 ? PPC::LR8 : PPC::LR);
+    Moves.push_back(MachineMove(FrameLabelId, LRDst, LRSrc));
+    
     // Mark effective beginning of when frame pointer is ready.
     unsigned ReadyLabelId = MMI->NextLabelID();
     BuildMI(MBB, MBBI, TII.get(PPC::LABEL)).addImm(ReadyLabelId);