This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: struct function cleanup part I
> Hi,
>
> This patch breaks Linux/ia64:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35781
Sorry for that. This patch should fix it.
Honza
Index: config/m32c/m32c.c
===================================================================
*** config/m32c/m32c.c (revision 133774)
--- config/m32c/m32c.c (working copy)
*************** m32c_leaf_function_p (void)
*** 3889,3908 ****
struct sequence_stack *seq;
int rv;
! saved_first = cfun->emit->x_first_insn;
! saved_last = cfun->emit->x_last_insn;
! for (seq = cfun->emit->sequence_stack; seq && seq->next; seq = seq->next)
;
if (seq)
{
! cfun->emit->x_first_insn = seq->first;
! cfun->emit->x_last_insn = seq->last;
}
rv = leaf_function_p ();
! cfun->emit->x_first_insn = saved_first;
! cfun->emit->x_last_insn = saved_last;
return rv;
}
--- 3889,3908 ----
struct sequence_stack *seq;
int rv;
! saved_first = rtl.emit.x_first_insn;
! saved_last = rtl.emit.x_last_insn;
! for (seq = cfun.emit.sequence_stack; seq && seq->next; seq = seq->next)
;
if (seq)
{
! cfun.emit.x_first_insn = seq->first;
! cfun.emit.x_last_insn = seq->last;
}
rv = leaf_function_p ();
! cfun.emit.x_first_insn = saved_first;
! cfun.emit.x_last_insn = saved_last;
return rv;
}
*************** m32c_function_needs_enter (void)
*** 3918,3924 ****
rtx fb = gen_rtx_REG (Pmode, FB_REGNO);
insn = get_insns ();
! for (seq = cfun->emit->sequence_stack;
seq;
insn = seq->first, seq = seq->next);
--- 3918,3924 ----
rtx fb = gen_rtx_REG (Pmode, FB_REGNO);
insn = get_insns ();
! for (seq = cfun.emit.sequence_stack;
seq;
insn = seq->first, seq = seq->next);
Index: config/sparc/sparc.h
===================================================================
*** config/sparc/sparc.h (revision 133774)
--- config/sparc/sparc.h (working copy)
*************** extern int sparc_mode_class[];
*** 953,959 ****
/* Given the stack bias, the stack pointer isn't actually aligned. */
#define INIT_EXPANDERS \
do { \
! if (cfun && cfun->emit->regno_pointer_align && SPARC_STACK_BIAS) \
{ \
REGNO_POINTER_ALIGN (STACK_POINTER_REGNUM) = BITS_PER_UNIT; \
REGNO_POINTER_ALIGN (HARD_FRAME_POINTER_REGNUM) = BITS_PER_UNIT; \
--- 953,959 ----
/* Given the stack bias, the stack pointer isn't actually aligned. */
#define INIT_EXPANDERS \
do { \
! if (cfun && cfun.emit.regno_pointer_align && SPARC_STACK_BIAS) \
{ \
REGNO_POINTER_ALIGN (STACK_POINTER_REGNUM) = BITS_PER_UNIT; \
REGNO_POINTER_ALIGN (HARD_FRAME_POINTER_REGNUM) = BITS_PER_UNIT; \
Index: config/ia64/ia64.h
===================================================================
*** config/ia64/ia64.h (revision 133774)
--- config/ia64/ia64.h (working copy)
*************** enum reg_class
*** 982,988 ****
#define INIT_EXPANDERS \
do { \
ia64_init_expanders (); \
! if (cfun && cfun->emit->regno_pointer_align) \
REGNO_POINTER_ALIGN (ARG_POINTER_REGNUM) = 64; \
} while (0)
--- 982,988 ----
#define INIT_EXPANDERS \
do { \
ia64_init_expanders (); \
! if (cfun && rtl.emit.regno_pointer_align) \
REGNO_POINTER_ALIGN (ARG_POINTER_REGNUM) = 64; \
} while (0)