Changes in directory llvm/lib/Target/PowerPC:
PPCRegisterInfo.cpp updated: 1.74 -> 1.75 --- Log message: Handle callee saved registers in dwarf frame info (lead up to exception handling.) --- Diffs of the changes: (+13 -6) PPCRegisterInfo.cpp | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 deletions(-) Index: llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp diff -u llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.74 llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.75 --- llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.74 Fri Aug 25 14:40:59 2006 +++ llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp Tue Aug 29 11:24:26 2006 @@ -668,15 +668,22 @@ std::vector<MachineMove *> &Moves = DebugInfo->getFrameMoves(); unsigned LabelID = DebugInfo->NextLabelID(); - // Show update of SP. - MachineLocation Dst(MachineLocation::VirtualFP); - MachineLocation Src(MachineLocation::VirtualFP, NegNumbytes); - Moves.push_back(new MachineMove(LabelID, Dst, Src)); - // Mark effective beginning of when frame pointer becomes valid. BuildMI(MBB, MBBI, PPC::DWARF_LABEL, 1).addImm(LabelID); - + // Show update of SP. + MachineLocation SPDst(MachineLocation::VirtualFP); + MachineLocation SPSrc(MachineLocation::VirtualFP, NegNumbytes); + Moves.push_back(new MachineMove(LabelID, SPDst, SPSrc)); + + // Add callee saved registers to move list. + const std::vector<CalleeSavedInfo> &CSI = MFI->getCalleeSavedInfo(); + for (unsigned I = 0, E = CSI.size(); I != E; ++I) { + MachineLocation CSDst(MachineLocation::VirtualFP, + MFI->getObjectOffset(CSI[I].getFrameIdx())); + MachineLocation CSSrc(CSI[I].getReg()); + Moves.push_back(new MachineMove(LabelID, CSDst, CSSrc)); + } } // If there is a frame pointer, copy R1 (SP) into R31 (FP) _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits