diff options
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfPrinter.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfPrinter.cpp | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp b/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp index 870dab78d0..1d7926a633 100644 --- a/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp @@ -37,73 +37,3 @@ DwarfPrinter::DwarfPrinter(AsmPrinter *A) RI(Asm->TM.getRegisterInfo()), M(NULL), MF(NULL), MMI(NULL), SubprogramCount(0) { } - - -/// EmitFrameMoves - Emit frame instructions to describe the layout of the -/// frame. -void DwarfPrinter::EmitFrameMoves(MCSymbol *BaseLabel, - const std::vector<MachineMove> &Moves, - bool isEH) { - int stackGrowth = TD->getPointerSize(); - if (Asm->TM.getFrameInfo()->getStackGrowthDirection() != - TargetFrameInfo::StackGrowsUp) - stackGrowth *= -1; - - for (unsigned i = 0, N = Moves.size(); i < N; ++i) { - const MachineMove &Move = Moves[i]; - MCSymbol *Label = Move.getLabel(); - // Throw out move if the label is invalid. - if (Label && !Label->isDefined()) continue; // Not emitted, in dead code. - - const MachineLocation &Dst = Move.getDestination(); - const MachineLocation &Src = Move.getSource(); - - // Advance row if new location. - if (BaseLabel && Label) { - MCSymbol *ThisSym = Label; - if (ThisSym != BaseLabel) { - Asm->EmitCFAByte(dwarf::DW_CFA_advance_loc4); - Asm->EmitLabelDifference(ThisSym, BaseLabel, 4); - BaseLabel = ThisSym; - } - } - - // If advancing cfa. - if (Dst.isReg() && Dst.getReg() == MachineLocation::VirtualFP) { - assert(!Src.isReg() && "Machine move not supported yet."); - - if (Src.getReg() == MachineLocation::VirtualFP) { - Asm->EmitCFAByte(dwarf::DW_CFA_def_cfa_offset); - } else { - Asm->EmitCFAByte(dwarf::DW_CFA_def_cfa); - Asm->EmitULEB128(RI->getDwarfRegNum(Src.getReg(), isEH), "Register"); - } - - Asm->EmitULEB128(-Src.getOffset(), "Offset"); - continue; - } - - if (Src.isReg() && Src.getReg() == MachineLocation::VirtualFP) { - assert(Dst.isReg() && "Machine move not supported yet."); - Asm->EmitCFAByte(dwarf::DW_CFA_def_cfa_register); - Asm->EmitULEB128(RI->getDwarfRegNum(Dst.getReg(), isEH), "Register"); - continue; - } - - unsigned Reg = RI->getDwarfRegNum(Src.getReg(), isEH); - int Offset = Dst.getOffset() / stackGrowth; - - if (Offset < 0) { - Asm->EmitCFAByte(dwarf::DW_CFA_offset_extended_sf); - Asm->EmitULEB128(Reg, "Reg"); - Asm->EmitSLEB128(Offset, "Offset"); - } else if (Reg < 64) { - Asm->EmitCFAByte(dwarf::DW_CFA_offset + Reg); - Asm->EmitULEB128(Offset, "Offset"); - } else { - Asm->EmitCFAByte(dwarf::DW_CFA_offset_extended); - Asm->EmitULEB128(Reg, "Reg"); - Asm->EmitULEB128(Offset, "Offset"); - } - } -} |