flow.c/dwarf2out.c and multiple entry points
Jason Merrill
jason@redhat.com
Fri Feb 23 03:13:00 GMT 2001
>>>>> "Richard" == Richard Henderson <rth@redhat.com> writes:
> On Thu, Feb 22, 2001 at 04:19:30PM +0100, Jan Hubicka wrote:
>> * dwarf2out.c (dwarf2out_frame_debug): Re-initialize when ALTERNATE_NAME
>> label is reached.
> Actually, I take that back. I don't think this is ok. I think
> we'll generate incorrect unwind info with just this.
To elaborate, if we see an alternate entry point, it certainly makes sense
to re-initialize the frame info. Of course, just initializing the
compiler's internal representation won't do that; you'll also need to write
something out to cause the consumer to re-initialize. You're trying to do
this by unconditionally setting the CFA to (SP+0), which is wrong for
targets that define INCOMING_FRAME_SP_OFFSET, and doesn't reset information
about register saves.
This seems like a job for remember_state/restore_state.
Thinking about this, I wonder if it makes more sense to build up an internal
representation of the full unwind table while compiling and only break it
down into dwarf operations when we need to write it out. This would seem
to offer more control over optimization of the representation.
Jason
More information about the Gcc-patches
mailing list