This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA patch] PR18749: epilogue not tracked in dwarf2 unwind-info


Hi,

On Mon, 12 Jun 2006, Daniel Jacobowitz wrote:

> > If you are saying that currently it could happen that CFA-(1) != CFA-(2), 
> > then this non-epilogue instruction would need to have an effect on the 
> > CFA, without actually producing code (or the next epilogue insn must not 
> > produce code), as otherwise you would have the same runtime effect twice 
> > (once from the non-epilogue insn, once from the epilogue compensation).  
> > Can this happen?
> 
> I have no idea :-)  I'm way out in hypothetical cases here, don't worry
> about it overmuch.

Okay :-)

> But here's an example using conditional execution:
> 
>   popeq lr
>   sub sp, #64
>   addeq sp, #68
>   bxeq lr
> 
> Of course it'd be a somewhat silly thing to generate.

I don't think we can handle conditional insns in the epilogue.  Or 
conditional insns fiddling with the CFA.  dwarf2out.c only has the notion 
of the "current" cfa (and some helpers), and the "current" size of pushed 
arguments.  Whenever there would be two different possible cfas or arg 
sizes out of one insn, everything would fall apart.

And regarding sillyness to generate funny prologues and epilogues: Look at
dwarf2out_frame_debug_expr.  It only accepts certain very restricted forms
of instructions.  Every other instruction form needs to be annotated with
a REG_FRAME_RELATED_EXPR note of one of the recognized forms.  I.e. even
right now the whole parsing of prologues is quite strict about sillyness
(otherwise it would also have to take care of your hypothetical problem
right now, just for prologues).  So we should be able to just define away
sillyness also for epilogues :)


Ciao,
Michael.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]