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: [PATCH] adjust dwarf ra column to libexc expectations on mips-irix


Hello,

Back on this issue, after a new testing roundtrip (ssslooow).

Richard Henderson wrote:
> On Thu, Mar 31, 2005 at 05:36:10PM +0200, Olivier Hainque wrote:
> >  What is your take on the DWARF_FRAME_REGNUM related adjustment ?
> > 
> >  The initial suggestion was to redefine as
> > 
> >  #define DWARF_FRAME_REGNUM(REGNO) \
> >     ((REGNO) <= FP_REG_LAST ? (REGNO) : INVALID_REGNUM)
> 
> I don't really see a need for it.

 The updated version below accounts for that note and the previous one
 mentioning no need for a parallel in mips_frame_set.

 Bootstrapped and regression tested fine on mips-sgi-irix6.5 against 20050315
 sources configured with

   --enable-languages=all,ada --with-gnu-as --enable-threads=posix
 
 OK ?

 Thanks in advance,
 
 Olivier

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, adjust the note reg to refer to the
	former.

*** config/mips/iris6.h.ori	Tue Apr  5 03:54:58 2005
--- config/mips/iris6.h	Thu Mar 31 13:17:24 2005
*************** Boston, MA 02111-1307, USA.  */
*** 38,43 ****
--- 38,48 ----
     compiling -g.  This guarantees that we can unwind the stack.  */
  #define DWARF2_FRAME_INFO 1
  
+ /* 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)
+ 
  #undef MACHINE_TYPE
  #define MACHINE_TYPE "SGI running IRIX 6.x"
  
*** config/mips/mips.c.ori	Tue Apr  5 03:54:40 2005
--- config/mips/mips.c	Sat Apr  2 00:54:13 2005
*************** mips_set_frame_expr (rtx frame_pattern)
*** 6275,6282 ****
  static rtx
  mips_frame_set (rtx mem, rtx reg)
  {
!   rtx set = gen_rtx_SET (VOIDmode, mem, reg);
    RTX_FRAME_RELATED_P (set) = 1;
    return set;
  }
  
--- 6275,6292 ----
  static rtx
  mips_frame_set (rtx mem, rtx reg)
  {
!   rtx set;
! 
!   /* If we're saving the return address register and the dwarf return
!      address column differs from the hard register number, adjust the
!      note reg to refer to the former.  */
!   if (REGNO (reg) == GP_REG_FIRST + 31
!       && DWARF_FRAME_RETURN_COLUMN != GP_REG_FIRST + 31)
!     reg = gen_rtx_REG (GET_MODE (reg), DWARF_FRAME_RETURN_COLUMN);
! 
!   set = gen_rtx_SET (VOIDmode, mem, reg);
    RTX_FRAME_RELATED_P (set) = 1;
+ 
    return set;
  }
  


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