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: [RFC] .debug_frame adjustments for mips-irix


> ------------------------------------------------------------------------------
> 2005-03-15  Olivier Hainque  <hainque@adacore.com>
> 
> 	* dwarf2out.c (dwarf2out_frame_finish): Honor DWARF2_FRAME_INFO
> 	defined and non-zero.

This one looks ok to me. I can't approve it, but it seems reasonable.

> ------------------------------------------------------------------------------
> 2005-03-15  Olivier Hainque  <hainque@adacore.com>
> 
> 	* config/mips/iris6.h (DWARF_FRAME_RETURN_COLUMN): Redefine to
> 	match what the system unwinder expects.
> 	* config/mips/mips.c (mips_frame_set): If we're saving the return
> 	address register and the dwarf return address column number differs
> 	from the hard register number, note the dwarf return address save
> 	too.
> 
> *** gcc/config/mips/iris6.h.ori	Tue Mar 15 06:39:49 2005
> --- gcc/config/mips/iris6.h	Tue Mar 15 08:30:43 2005
> *************** Boston, MA 02111-1307, USA.  */
> *** 165,170 ****
> --- 165,175 ----
>      compiling -g.  This guarantees that we can unwind the stack.  */
>   #define DWARF2_FRAME_INFO !TARGET_SGI_O32_AS
>   
> + /* The system unwinder in libexc requires a specific dwarf return address
> +    column to work.  */
> + #undef  DWARF_FRAME_RETURN_COLUMN
> + #define DWARF_FRAME_RETURN_COLUMN (FP_REG_LAST + 1)
> + 

This part is ok.

> + 
> +   /* If we're saving the return address register and the dwarf return
> +      address column number differs from the hard register number, note
> +      the dwarf return address save too.  */
> +   if (REGNO (reg) == GP_REG_FIRST + 31
> +       && DWARF_FRAME_RETURN_COLUMN != GP_REG_FIRST + 31)
> +     {
> +       rtx ra_column_set
> + 	= gen_rtx_SET (VOIDmode,
> + 		       mem,
> + 		       gen_rtx_REG (word_mode, DWARF_FRAME_RETURN_COLUMN));
> +       RTX_FRAME_RELATED_P (ra_column_set) = 1;
> + 
> +       set = gen_rtx_PARALLEL (VOIDmode, gen_rtvec (2, set, ra_column_set));
> +     }
> + 

I don't think this is necessary because of this code in
initial_return_save:

if (reg != DWARF_FRAME_RETURN_COLUMN)
    reg_save (NULL, DWARF_FRAME_RETURN_COLUMN, reg, offset -
cfa.offset);

-eric



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