diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-12-28 04:15:37 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-12-28 04:15:37 +0000 |
commit | a75b87b55adc2f9e39f2cbdf792c05405b7038d5 (patch) | |
tree | 6260af7e6cfa4e3254acc3f87ef228bca1daef44 /llvm/lib/MC/MCDwarf.cpp | |
parent | c581fe7e81958609bdacc271a6845d7e65162c05 (diff) | |
download | bcm5719-llvm-a75b87b55adc2f9e39f2cbdf792c05405b7038d5.tar.gz bcm5719-llvm-a75b87b55adc2f9e39f2cbdf792c05405b7038d5.zip |
Start adding basic support for emitting the call frame instructions.
llvm-svn: 122590
Diffstat (limited to 'llvm/lib/MC/MCDwarf.cpp')
-rw-r--r-- | llvm/lib/MC/MCDwarf.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp index cd5141083e3..6e59a58b04d 100644 --- a/llvm/lib/MC/MCDwarf.cpp +++ b/llvm/lib/MC/MCDwarf.cpp @@ -460,9 +460,11 @@ static void EmitFrameMoves(MCStreamer &streamer, if (BaseLabel && Label) { MCSymbol *ThisSym = Label; if (ThisSym != BaseLabel) { + // FIXME: We should relax this instead of using a DW_CFA_advance_loc4 + // for every address change! streamer.EmitIntValue(dwarf::DW_CFA_advance_loc4, 1); const MCExpr *Length = MakeStartMinusEndExpr(streamer, *BaseLabel, - *ThisSym, 4); + *ThisSym, 0); streamer.EmitValue(Length, 4); BaseLabel = ThisSym; } @@ -672,6 +674,8 @@ static MCSymbol *EmitFDE(MCStreamer &streamer, streamer.EmitLabel(augmentationEnd); // Call Frame Instructions + EmitFrameMoves(streamer, frame.Moves, frame.Begin, true); + // Padding streamer.EmitValueToAlignment(4); |