From e1de1560216d6b5d287db5a0add0247063f36413 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Sat, 18 Oct 2003 18:45:16 +0000 Subject: rtl.h (rtl_size): Declare. * rtl.h (rtl_size): Declare. (rtunion): Remove rtwint. (rtx_def): Replace 'fld' with a union of an rtunion or a HOST_WIDE_INT. (RTX_HDR_SIZE, RTX_SIZE): New macros. (RTL_CHECK1): Adjust for new rtx_def layout. (RTL_CHECK2, RTL_CHECKC1, RTL_CHECKC2): Likewise. (XWINT, XCWINT): Likewise. Access the rtx structure directly. (X0WINT): Remove. (X0ANY): New macro. * rtl.def: Adjust comments for new rtx_def layout. * ggc.h (ggc_alloc_rtx): Take the rtx code as argument, not the number of slots. * rtl.c (rtx_size): New array. (rtx_alloc): Adjust call to ggc_alloc_rtx. Use RTX_HDR_SIZE. (copy_rtx): Use RTX_HDR_SIZE. Adjust for new rtx_def layout. (shallow_copy_rtx): Adjust call to ggc_alloc_rtx. Use RTX_SIZE. * integrate.c (copy_rtx_and_substitute): Use X0ANY to copy '0' fields. * emit-rtl.c (copy_most_rtx): Likewise. (copy_rtx_if_shared): Use RTX_SIZE. (copy_insn_1): Use RTX_HDR_SIZE. Adjust for new rtx_def layout. * gengenrtl.c (gendef): Adjust ggc_alloc_rtx call. Use RTX_HDR_SIZE. * gengtype.c (write_rtx_next): Use RTX_HDR_SIZE. (adjust_field_rtx_def): Expect "rtx_def" to be a union rather than an array. Adjust output for new rtx_def layout. * ggc-page.c (RTL_SIZE): Use RTX_HDR_SIZE. * reload1.c (eliminate_regs): Use RTX_SIZE. * rtlanal.c (loc_mentioned_in_p): Adjust for new rtx_def layout. * gdbinit.in (pi): Likewise. From-SVN: r72647 --- gcc/reload1.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'gcc/reload1.c') diff --git a/gcc/reload1.c b/gcc/reload1.c index 37cc4b2..ecab52b 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -2570,9 +2570,7 @@ eliminate_regs (rtx x, enum machine_mode mem_mode, rtx insn) if (new != XEXP (x, i) && ! copied) { rtx new_x = rtx_alloc (code); - memcpy (new_x, x, - (sizeof (*new_x) - sizeof (new_x->fld) - + sizeof (new_x->fld[0]) * GET_RTX_LENGTH (code))); + memcpy (new_x, x, RTX_SIZE (code)); x = new_x; copied = 1; } @@ -2591,10 +2589,7 @@ eliminate_regs (rtx x, enum machine_mode mem_mode, rtx insn) if (! copied) { rtx new_x = rtx_alloc (code); - memcpy (new_x, x, - (sizeof (*new_x) - sizeof (new_x->fld) - + (sizeof (new_x->fld[0]) - * GET_RTX_LENGTH (code)))); + memcpy (new_x, x, RTX_SIZE (code)); x = new_x; copied = 1; } -- cgit v1.1