This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Repair breakage from put_var_into_stack patch
- From: Mark Mitchell <mark at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 24 Mar 2003 09:53:48 -0800
- Subject: PATCH: Repair breakage from put_var_into_stack patch
- Reply-to: mark at codesourcery dot com
Here's a patch (committed branch and mainline) to hopefully put things
back together after the put_var_into_stack breakage.
--
Mark Mitchell
CodeSourcery, LLC
mark at codesourcery dot com
2003-03-24 Mark Mitchell <mark at codesourcery dot com>
* function.c (put_var_into_stack): Change bool parameter to int.
(gen_mem_addressof): Likewise.
* rtl.h (gen_mem_addressof): Likewise.
* tree.h (put_var_into_stack): Likewise.
* config/alpha/alpha.c (alpha_gp_save_rtx): Adjust call to
gen_mem_addressof or put_var_into_stack.
* config/c4x/c4x.c (c4x_expand_builtin): Likewise.
* config/ia64/ia64.c (spill_tfmode_operand): Likewise.
Index: function.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.c,v
retrieving revision 1.411
diff -c -5 -p -r1.411 function.c
*** function.c 24 Mar 2003 08:31:30 -0000 1.411
--- function.c 24 Mar 2003 17:50:25 -0000
*************** init_temp_slots ()
*** 1311,1321 ****
addressable. */
void
put_var_into_stack (decl, rescan)
tree decl;
! bool rescan;
{
rtx reg;
enum machine_mode promoted_mode, decl_mode;
struct function *function = 0;
tree context;
--- 1311,1321 ----
addressable. */
void
put_var_into_stack (decl, rescan)
tree decl;
! int rescan;
{
rtx reg;
enum machine_mode promoted_mode, decl_mode;
struct function *function = 0;
tree context;
*************** static int cfa_offset;
*** 2885,2895 ****
rtx
gen_mem_addressof (reg, decl, rescan)
rtx reg;
tree decl;
! bool rescan;
{
rtx r = gen_rtx_ADDRESSOF (Pmode, gen_reg_rtx (GET_MODE (reg)),
REGNO (reg), decl);
/* Calculate this before we start messing with decl's RTL. */
--- 2885,2895 ----
rtx
gen_mem_addressof (reg, decl, rescan)
rtx reg;
tree decl;
! int rescan;
{
rtx r = gen_rtx_ADDRESSOF (Pmode, gen_reg_rtx (GET_MODE (reg)),
REGNO (reg), decl);
/* Calculate this before we start messing with decl's RTL. */
Index: rtl.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtl.h,v
retrieving revision 1.389
diff -c -5 -p -r1.389 rtl.h
*** rtl.h 24 Mar 2003 08:31:30 -0000 1.389
--- rtl.h 24 Mar 2003 17:50:26 -0000
*************** extern rtx simplify_gen_subreg PARAMS (
*** 1575,1585 ****
extern rtx simplify_replace_rtx PARAMS ((rtx, rtx, rtx));
extern rtx simplify_rtx PARAMS ((rtx));
extern rtx avoid_constant_pool_reference PARAMS ((rtx));
/* In function.c */
! extern rtx gen_mem_addressof PARAMS ((rtx, tree, bool));
/* In regclass.c */
extern enum machine_mode choose_hard_reg_mode PARAMS ((unsigned int,
unsigned int));
--- 1575,1585 ----
extern rtx simplify_replace_rtx PARAMS ((rtx, rtx, rtx));
extern rtx simplify_rtx PARAMS ((rtx));
extern rtx avoid_constant_pool_reference PARAMS ((rtx));
/* In function.c */
! extern rtx gen_mem_addressof PARAMS ((rtx, tree, int));
/* In regclass.c */
extern enum machine_mode choose_hard_reg_mode PARAMS ((unsigned int,
unsigned int));
Index: tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.h,v
retrieving revision 1.386
diff -c -5 -p -r1.386 tree.h
*** tree.h 24 Mar 2003 08:31:31 -0000 1.386
--- tree.h 24 Mar 2003 17:50:26 -0000
*************** extern void expand_main_function PARAMS
*** 2985,2995 ****
extern void init_dummy_function_start PARAMS ((void));
extern void expand_dummy_function_end PARAMS ((void));
extern void init_function_for_compilation PARAMS ((void));
extern void init_function_start PARAMS ((tree, const char *, int));
extern void assign_parms PARAMS ((tree));
! extern void put_var_into_stack PARAMS ((tree, bool));
extern void flush_addressof PARAMS ((tree));
extern void uninitialized_vars_warning PARAMS ((tree));
extern void setjmp_args_warning PARAMS ((void));
extern void mark_all_temps_used PARAMS ((void));
extern void init_temp_slots PARAMS ((void));
--- 2985,2995 ----
extern void init_dummy_function_start PARAMS ((void));
extern void expand_dummy_function_end PARAMS ((void));
extern void init_function_for_compilation PARAMS ((void));
extern void init_function_start PARAMS ((tree, const char *, int));
extern void assign_parms PARAMS ((tree));
! extern void put_var_into_stack PARAMS ((tree, int));
extern void flush_addressof PARAMS ((tree));
extern void uninitialized_vars_warning PARAMS ((tree));
extern void setjmp_args_warning PARAMS ((void));
extern void mark_all_temps_used PARAMS ((void));
extern void init_temp_slots PARAMS ((void));
Index: config/alpha/alpha.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.c,v
retrieving revision 1.297
diff -c -5 -p -r1.297 alpha.c
*** config/alpha/alpha.c 14 Mar 2003 17:58:48 -0000 1.297
--- config/alpha/alpha.c 24 Mar 2003 17:50:28 -0000
*************** alpha_return_addr (count, frame)
*** 5714,5724 ****
rtx
alpha_gp_save_rtx ()
{
rtx r = get_hard_reg_initial_val (DImode, 29);
if (GET_CODE (r) != MEM)
! r = gen_mem_addressof (r, NULL_TREE);
return r;
}
static int
alpha_ra_ever_killed ()
--- 5714,5724 ----
rtx
alpha_gp_save_rtx ()
{
rtx r = get_hard_reg_initial_val (DImode, 29);
if (GET_CODE (r) != MEM)
! r = gen_mem_addressof (r, NULL_TREE, /*rescan=*/true);
return r;
}
static int
alpha_ra_ever_killed ()
Index: config/c4x/c4x.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/c4x/c4x.c,v
retrieving revision 1.122
diff -c -5 -p -r1.122 c4x.c
*** config/c4x/c4x.c 13 Mar 2003 04:06:50 -0000 1.122
--- config/c4x/c4x.c 24 Mar 2003 17:50:29 -0000
*************** c4x_expand_builtin (exp, target, subtarg
*** 5023,5033 ****
case C4X_BUILTIN_FRIEEE:
if (TARGET_C3X)
break;
arg0 = TREE_VALUE (arglist);
if (TREE_CODE (arg0) == VAR_DECL || TREE_CODE (arg0) == PARM_DECL)
! put_var_into_stack (arg0);
r0 = expand_expr (arg0, NULL_RTX, QFmode, 0);
r0 = protect_from_queue (r0, 0);
if (register_operand (r0, QFmode))
{
r1 = assign_stack_local (QFmode, GET_MODE_SIZE (QFmode), 0);
--- 5023,5033 ----
case C4X_BUILTIN_FRIEEE:
if (TARGET_C3X)
break;
arg0 = TREE_VALUE (arglist);
if (TREE_CODE (arg0) == VAR_DECL || TREE_CODE (arg0) == PARM_DECL)
! put_var_into_stack (arg0, /*rescan=*/true);
r0 = expand_expr (arg0, NULL_RTX, QFmode, 0);
r0 = protect_from_queue (r0, 0);
if (register_operand (r0, QFmode))
{
r1 = assign_stack_local (QFmode, GET_MODE_SIZE (QFmode), 0);
Index: config/ia64/ia64.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64.c,v
retrieving revision 1.212
diff -c -5 -p -r1.212 ia64.c
*** config/ia64/ia64.c 19 Mar 2003 00:13:00 -0000 1.212
--- config/ia64/ia64.c 24 Mar 2003 17:50:33 -0000
*************** spill_tfmode_operand (in, force)
*** 1436,1451 ****
{
if (GET_CODE (in) == SUBREG
&& GET_MODE (SUBREG_REG (in)) == TImode
&& GET_CODE (SUBREG_REG (in)) == REG)
{
! rtx mem = gen_mem_addressof (SUBREG_REG (in), NULL_TREE);
return gen_rtx_MEM (TFmode, copy_to_reg (XEXP (mem, 0)));
}
else if (force && GET_CODE (in) == REG)
{
! rtx mem = gen_mem_addressof (in, NULL_TREE);
return gen_rtx_MEM (TFmode, copy_to_reg (XEXP (mem, 0)));
}
else if (GET_CODE (in) == MEM
&& GET_CODE (XEXP (in, 0)) == ADDRESSOF)
return change_address (in, TFmode, copy_to_reg (XEXP (in, 0)));
--- 1436,1451 ----
{
if (GET_CODE (in) == SUBREG
&& GET_MODE (SUBREG_REG (in)) == TImode
&& GET_CODE (SUBREG_REG (in)) == REG)
{
! rtx mem = gen_mem_addressof (SUBREG_REG (in), NULL_TREE, /*rescan=*/true);
return gen_rtx_MEM (TFmode, copy_to_reg (XEXP (mem, 0)));
}
else if (force && GET_CODE (in) == REG)
{
! rtx mem = gen_mem_addressof (in, NULL_TREE, /*rescan=*/true);
return gen_rtx_MEM (TFmode, copy_to_reg (XEXP (mem, 0)));
}
else if (GET_CODE (in) == MEM
&& GET_CODE (XEXP (in, 0)) == ADDRESSOF)
return change_address (in, TFmode, copy_to_reg (XEXP (in, 0)));