This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Question on Dwarf2 unwind info and optimized code
- From: James E Wilson <wilson at specifix dot com>
- To: Joern RENNECKE <joern dot rennecke at st dot com>
- Cc: Christophe LYON <christophe dot lyon at st dot com>, gcc at gcc dot gnu dot org
- Date: Tue, 25 Oct 2005 12:26:38 -0700
- Subject: Re: Question on Dwarf2 unwind info and optimized code
- References: <435E7AA9.3000906@st.com>
On Tue, 2005-10-25 at 11:34, Joern RENNECKE wrote:
> It can't be easily implemented in target-specific code alone. Sometimes
> there is code after the epilogue, so there would have to be
> a mechanism to get the dwarf virtual machine back to the pre-epilogue state.
There is.
I'm more conversant with IA-64 unwind info than dwarf2 unwind info at
the moment. In IA-64 unwind info, we have operators label_state and
copy_state. We just emit label_state before the epilogue, and then
copy_state after the epilogue. The IA-64 port already does this via
hooks in final.c. The code is there if you want to look at it. The
IA-64 port is probably the only one emitting epilogue unwind info at the
moment.
There are equivalent features in dwarf unwind info. Looks like they are
called DW_CFA_remember_state and DW_CFA_restore_state.
--
Jim Wilson, GNU Tools Support, http://www.specifix.com