[PATCH] Generate DWARF stack frame information for ARM/Thumb functions [2nd attempt].

Saleem Abdulrasool compnerd at compnerd.org
Sun Feb 9 14:55:04 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) {
----------------
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");

================
Comment at: lib/Target/ARM/ARMFrameLowering.cpp:446
@@ +445,3 @@
+          MMI.addFrameInst(MCCFIInstruction::createOffset(SPLabel,
+              MRI->getDwarfRegNum(Reg, true), MFI->getObjectOffset(FI)));
+      }
----------------
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)));


http://llvm-reviews.chandlerc.com/D2706



More information about the llvm-commits mailing list