diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-05-30 20:20:15 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-05-30 20:20:15 +0000 |
commit | 6e032942cf58d1c41f88609a1cec74eb74940ecd (patch) | |
tree | 77d932527de7e7874176fa423c653a630cecd119 /lib/Target/PowerPC/PPCFrameLowering.cpp | |
parent | acbf107d9b9ffeddbcc3d015107c6faff439ee9b (diff) | |
download | llvm-6e032942cf58d1c41f88609a1cec74eb74940ecd.tar.gz llvm-6e032942cf58d1c41f88609a1cec74eb74940ecd.tar.bz2 llvm-6e032942cf58d1c41f88609a1cec74eb74940ecd.tar.xz |
Use the dwarf->llvm mapping to print register names in the cfi
directives.
Fixes PR9826.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132317 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCFrameLowering.cpp')
-rw-r--r-- | lib/Target/PowerPC/PPCFrameLowering.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCFrameLowering.cpp b/lib/Target/PowerPC/PPCFrameLowering.cpp index 9d8ef5feef..375e000fe4 100644 --- a/lib/Target/PowerPC/PPCFrameLowering.cpp +++ b/lib/Target/PowerPC/PPCFrameLowering.cpp @@ -487,6 +487,14 @@ void PPCFrameLowering::emitPrologue(MachineFunction &MF) const { int Offset = MFI->getObjectOffset(CSI[I].getFrameIdx()); unsigned Reg = CSI[I].getReg(); if (Reg == PPC::LR || Reg == PPC::LR8 || Reg == PPC::RM) continue; + + // This is a bit of a hack: CR2LT, CR2GT, CR2EQ and CR2UN are just + // subregisters of CR2. We just need to emit a move of CR2. + if (Reg == PPC::CR2LT || Reg == PPC::CR2GT || Reg == PPC::CR2EQ) + continue; + if (Reg == PPC::CR2UN) + Reg = PPC::CR2; + MachineLocation CSDst(MachineLocation::VirtualFP, Offset); MachineLocation CSSrc(Reg); Moves.push_back(MachineMove(Label, CSDst, CSSrc)); |