[PATCH] Generate DWARF stack frame information for ARM/Thumb functions [2nd attempt].
Renato Golin
renato.golin at linaro.org
Mon Feb 10 00:38:17 PST 2014
================
Comment at: lib/CodeGen/AsmPrinter/ARMException.cpp:66
@@ +65,3 @@
+ AsmPrinter::CFIMoveType MoveType = Asm->needsCFIMoves();
+ assert (MoveType != AsmPrinter::CFI_M_EH);
+ if (MoveType == AsmPrinter::CFI_M_Debug) {
----------------
Saleem Abdulrasool wrote:
> Renato Golin wrote:
> > Saleem Abdulrasool wrote:
> > > no space after the assert, and add a message please.
> > >
> > > assert(MoveType != AsmPrinter::CFI_M_EH &&
> > > "non-EH CFI move in prologue");
> > >
> > > Although, Im not sure I fully understand this assertion. Why is it impossible to encounter a debug CFI? Or is it just that the lowering will always produce the ARM specific macros for the prologue setup?
> > EHABI lowering will use assembler directives rather than Dwarf EH, so you can't get that move type. I'll have to think how do we select from EH and Dwarf, but that's for another commit.
> Id say that the assertion should indicate that:
>
> assert(MoveType != AsmPrinter::CFI_M_EH &&
> "non-EH CFI not yet supported in prologue with EHABI lowering");
Fair enough. Though I'm hoping this will change soon.
================
Comment at: lib/Target/ARM/ARMFrameLowering.cpp:446
@@ +445,3 @@
+ MMI.addFrameInst(MCCFIInstruction::createOffset(SPLabel,
+ MRI->getDwarfRegNum(Reg, true), MFI->getObjectOffset(FI)));
+ }
----------------
Saleem Abdulrasool wrote:
> Renato Golin wrote:
> > Saleem Abdulrasool wrote:
> > > This is not conformant to LLVM style.
> > Do you mean "default" first?
> I mean the indentation, the parameters should be under the parenthesis unless it doesnt fit.
>
> MMI.addFrameInst(MCCFIInstruction::createOffset(SPLabel,
> MRI->getDwarfRegNum(Reg,true),
> MFI->getObjectOffset(FI)));
Oh, I don't think there is any specific guideline on that type of indentation, but fair enough, whatever works.
http://llvm-reviews.chandlerc.com/D2706
More information about the llvm-commits
mailing list