This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Convert d30v to new initial_val functions.
- To: gcc-patches at gcc dot gnu dot org
- Subject: PATCH: Convert d30v to new initial_val functions.
- From: DJ Delorie <dj at redhat dot com>
- Date: Thu, 21 Jun 2001 14:26:46 -0400
- CC: dj at redhat dot com
2001-06-21 DJ Delorie <dj@redhat.com>
* config/d30v/d30v.h (struct machine_function): Remove ra_rtx.
* config/d30v/d30v.c (d30v_mark_machine_status): Remove ra_rtx.
(d30v_return_addr): Use get_hard_reg_initial_val et al.
Index: config/d30v/d30v.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/d30v/d30v.c,v
retrieving revision 1.7
diff -p -3 -r1.7 d30v.c
*** d30v.c 2001/04/03 15:05:42 1.7
--- d30v.c 2001/06/21 18:23:02
*************** d30v_mark_machine_status (p)
*** 3617,3623 ****
if (p->machine == NULL)
return;
- ggc_mark_rtx (p->machine->ra_rtx);
ggc_mark_rtx (p->machine->eh_epilogue_sp_ofs);
}
--- 3617,3622 ----
*************** d30v_init_expanders ()
*** 3655,3677 ****
rtx
d30v_return_addr ()
{
! rtx ret;
!
! ret = cfun->machine->ra_rtx;
!
! if (ret == NULL)
! {
! rtx init;
!
! cfun->machine->ra_rtx = ret = gen_reg_rtx (Pmode);
!
! init = gen_rtx (SET, VOIDmode, ret, gen_rtx (REG, Pmode, GPR_LINK));
! push_topmost_sequence ();
! emit_insn_after (init, get_insns ());
! pop_topmost_sequence ();
! }
!
! return ret;
}
/* Called to register all of our global variables with the garbage
--- 3654,3660 ----
rtx
d30v_return_addr ()
{
! return get_hard_reg_initial_val (Pmode, GPR_LINK);
}
/* Called to register all of our global variables with the garbage
Index: config/d30v/d30v.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/d30v/d30v.h,v
retrieving revision 1.19
diff -p -3 -r1.19 d30v.h
*** d30v.h 2001/05/17 03:15:52 1.19
--- d30v.h 2001/06/21 18:23:21
*************** typedef struct machine_function
*** 2870,2877 ****
{
/* Additionsl stack adjustment in __builtin_eh_throw. */
struct rtx_def * eh_epilogue_sp_ofs;
- /* Records __builtin_return address. */
- struct rtx_def * ra_rtx;
} machine_function;
--- 2870,2875 ----