Print all the moves at a given label instead of just the first one.

Remove previous DwarfCFI hack.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130187 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2011-04-26 03:58:56 +00:00
parent 1790c9cbb6
commit b28d4f152e
3 changed files with 6 additions and 15 deletions

View File

@ -607,16 +607,16 @@ void AsmPrinter::emitPrologLabel(const MachineInstr &MI) {
const MachineFunction &MF = *MI.getParent()->getParent();
MachineModuleInfo &MMI = MF.getMMI();
std::vector<MachineMove> &Moves = MMI.getFrameMoves();
const MachineMove *Move = NULL;
bool FoundOne = false;
(void)FoundOne;
for (std::vector<MachineMove>::iterator I = Moves.begin(),
E = Moves.end(); I != E; ++I) {
if (I->getLabel() == Label) {
Move = &*I;
break;
EmitCFIFrameMove(*I);
FoundOne = true;
}
}
assert(Move);
EmitCFIFrameMove(*Move);
assert(FoundOne);
}
/// EmitFunctionBody - This method emits the body and trailer for a

View File

@ -300,7 +300,7 @@ void AsmPrinter::EmitCFIFrameMove(const MachineMove &Move) const {
} else {
assert(!Dst.isReg() && "Machine move not supported yet.");
OutStreamer.EmitCFIOffset(RI->getDwarfRegNum(Src.getReg(), true),
-Dst.getOffset());
Dst.getOffset());
}
}

View File

@ -477,15 +477,6 @@ void X86FrameLowering::emitPrologue(MachineFunction &MF) const {
.addReg(StackPtr);
if (needsFrameMoves) {
const MCAsmInfo &MAI = MMI.getContext().getAsmInfo();
if (MAI.getExceptionHandlingType() == ExceptionHandling::DwarfCFI) {
MCSymbol *FrameLabel0 = MMI.getContext().CreateTempSymbol();
BuildMI(MBB, MBBI, DL, TII.get(X86::PROLOG_LABEL)).addSym(FrameLabel0);
MachineLocation FPSrc0(FramePtr);
MachineLocation FPDst0(FramePtr, -2 * stackGrowth);
Moves.push_back(MachineMove(FrameLabel0, FPDst0, FPSrc0));
}
// Mark effective beginning of when frame pointer becomes valid.
MCSymbol *FrameLabel = MMI.getContext().CreateTempSymbol();
BuildMI(MBB, MBBI, DL, TII.get(X86::PROLOG_LABEL)).addSym(FrameLabel);