This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC Patch: Fix bad eh_frame data for MIPS.
- From: Richard Henderson <rth at redhat dot com>
- To: David Daney <ddaney at avtrex dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Andrew Haley <aph at redhat dot com>
- Date: Wed, 17 Sep 2003 15:47:18 -0700
- Subject: Re: RFC Patch: Fix bad eh_frame data for MIPS.
- References: <3F68D2B2.3060401@avtrex.com>
On Wed, Sep 17, 2003 at 02:31:30PM -0700, David Daney wrote:
> * gcc/config/mips/linux.h (MD_FALLBACK_FRAME_STATE_FOR): New,
> needed for mips/libgcj signal handling.
> * gcc/config/mips/mips.h (DWARF_FRAME_REGNUM_FOR_INITIAL_RETURN_SAVE): New.
> * gcc/dwarf2out.c (DWARF_FRAME_REGNUM_FOR_INITIAL_RETURN_SAVE): New.
> * gcc/dwarf2out.c (initial_return_save): Use
> DWARF_FRAME_REGNUM_FOR_INITIAL_RETURN_SAVE instead of DWARF_FRAME_REGNUM
This is wrong.
The existing DWARF_FRAME_REGNUM is completely wrong for mips.
After deleting that, you have a choice of:
(1) Leaving DWARF_FRAME_RETURN_COLUMN alone, and adding a
REG_FRAME_RELATED_EXPR to the insn that saves r31 on the stack.
The expression would mention (reg DWARF_FRAME_RETURN_COLUMN).
(2) Set
#define DWARF_FRAME_RETURN_COLUMN GP_REG_FIRST+31
This will produce smaller CFI output. I don't know if SGI's
debugger can handle overlapping r31 with the return address.
Gcc and gdb can.
r~