mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-27 23:44:47 +08:00
Install the proper patch.
* function.c (put_var_into_stack): Temporarily clear DECL_RTL. (assign_params): Avoid setting DECL_RTL to unfinished RTX. (expand_function_start): Likewise. * stmt.c (expand_decl): Likewise. * varasm.c (make_decl_rtx): Likewise. From-SVN: r44961
This commit is contained in:
parent
3446405d5e
commit
abde42f7c7
@ -1,3 +1,12 @@
|
||||
Fri Aug 17 15:48:57 CEST 2001 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
Install the proper patch.
|
||||
* function.c (put_var_into_stack): Temporarily clear DECL_RTL.
|
||||
(assign_params): Avoid setting DECL_RTL to unfinished RTX.
|
||||
(expand_function_start): Likewise.
|
||||
* stmt.c (expand_decl): Likewise.
|
||||
* varasm.c (make_decl_rtx): Likewise.
|
||||
|
||||
Fri Aug 17 15:41:35 CEST 2001 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* final.c: Undo my previous accidental checkin.
|
||||
|
@ -1420,7 +1420,14 @@ put_var_into_stack (decl)
|
||||
|
||||
/* Change the CONCAT into a combined MEM for both parts. */
|
||||
PUT_CODE (reg, MEM);
|
||||
|
||||
/* set_mem_attributes uses DECL_RTL to avoid re-generating of
|
||||
already computed alias sets. Here we want to re-generate. */
|
||||
if (DECL_P (decl))
|
||||
SET_DECL_RTL (decl, NULL);
|
||||
set_mem_attributes (reg, decl, 1);
|
||||
if (DECL_P (decl))
|
||||
SET_DECL_RTL (decl, reg);
|
||||
|
||||
/* The two parts are in memory order already.
|
||||
Use the lower parts address as ours. */
|
||||
@ -4688,10 +4695,10 @@ assign_parms (fndecl)
|
||||
appropriately. */
|
||||
if (passed_pointer)
|
||||
{
|
||||
SET_DECL_RTL (parm,
|
||||
gen_rtx_MEM (TYPE_MODE (TREE_TYPE (passed_type)),
|
||||
parmreg));
|
||||
set_mem_attributes (DECL_RTL (parm), parm, 1);
|
||||
rtx x = gen_rtx_MEM (TYPE_MODE (TREE_TYPE (passed_type)),
|
||||
parmreg);
|
||||
set_mem_attributes (x, parm, 1);
|
||||
SET_DECL_RTL (parm, x);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -5030,11 +5037,10 @@ assign_parms (fndecl)
|
||||
if (parm == function_result_decl)
|
||||
{
|
||||
tree result = DECL_RESULT (fndecl);
|
||||
rtx x = gen_rtx_MEM (DECL_MODE (result), DECL_RTL (parm));
|
||||
|
||||
SET_DECL_RTL (result,
|
||||
gen_rtx_MEM (DECL_MODE (result), DECL_RTL (parm)));
|
||||
|
||||
set_mem_attributes (DECL_RTL (result), result, 1);
|
||||
set_mem_attributes (x, result, 1);
|
||||
SET_DECL_RTL (result, x);
|
||||
}
|
||||
}
|
||||
|
||||
@ -6451,11 +6457,9 @@ expand_function_start (subr, parms_have_cleanups)
|
||||
}
|
||||
if (value_address)
|
||||
{
|
||||
SET_DECL_RTL (DECL_RESULT (subr),
|
||||
gen_rtx_MEM (DECL_MODE (DECL_RESULT (subr)),
|
||||
value_address));
|
||||
set_mem_attributes (DECL_RTL (DECL_RESULT (subr)),
|
||||
DECL_RESULT (subr), 1);
|
||||
rtx x = gen_rtx_MEM (DECL_MODE (DECL_RESULT (subr)), value_address);
|
||||
set_mem_attributes (x, DECL_RESULT (subr), 1);
|
||||
SET_DECL_RTL (DECL_RESULT (subr), x);
|
||||
}
|
||||
}
|
||||
else if (DECL_MODE (DECL_RESULT (subr)) == VOIDmode)
|
||||
|
15
gcc/stmt.c
15
gcc/stmt.c
@ -3810,15 +3810,17 @@ expand_decl (decl)
|
||||
else if (DECL_SIZE (decl) == 0)
|
||||
/* Variable with incomplete type. */
|
||||
{
|
||||
rtx x;
|
||||
if (DECL_INITIAL (decl) == 0)
|
||||
/* Error message was already done; now avoid a crash. */
|
||||
SET_DECL_RTL (decl, gen_rtx_MEM (BLKmode, const0_rtx));
|
||||
x = gen_rtx_MEM (BLKmode, const0_rtx);
|
||||
else
|
||||
/* An initializer is going to decide the size of this array.
|
||||
Until we know the size, represent its address with a reg. */
|
||||
SET_DECL_RTL (decl, gen_rtx_MEM (BLKmode, gen_reg_rtx (Pmode)));
|
||||
x = gen_rtx_MEM (BLKmode, gen_reg_rtx (Pmode));
|
||||
|
||||
set_mem_attributes (DECL_RTL (decl), decl, 1);
|
||||
set_mem_attributes (x, decl, 1);
|
||||
SET_DECL_RTL (decl, x);
|
||||
}
|
||||
else if (DECL_MODE (decl) != BLKmode
|
||||
/* If -ffloat-store, don't put explicit float vars
|
||||
@ -3888,7 +3890,7 @@ expand_decl (decl)
|
||||
else
|
||||
/* Dynamic-size object: must push space on the stack. */
|
||||
{
|
||||
rtx address, size;
|
||||
rtx address, size, x;
|
||||
|
||||
/* Record the stack pointer on entry to block, if have
|
||||
not already done so. */
|
||||
@ -3913,9 +3915,10 @@ expand_decl (decl)
|
||||
TYPE_ALIGN (TREE_TYPE (decl)));
|
||||
|
||||
/* Reference the variable indirect through that rtx. */
|
||||
SET_DECL_RTL (decl, gen_rtx_MEM (DECL_MODE (decl), address));
|
||||
x = gen_rtx_MEM (DECL_MODE (decl), address);
|
||||
set_mem_attributes (x, decl, 1);
|
||||
SET_DECL_RTL (decl, x);
|
||||
|
||||
set_mem_attributes (DECL_RTL (decl), decl, 1);
|
||||
|
||||
/* Indicate the alignment we actually gave this variable. */
|
||||
#ifdef STACK_BOUNDARY
|
||||
|
@ -681,6 +681,7 @@ make_decl_rtl (decl, asmspec)
|
||||
const char *name = 0;
|
||||
const char *new_name = 0;
|
||||
int reg_number;
|
||||
rtx x;
|
||||
|
||||
/* Check that we are not being given an automatic variable. */
|
||||
/* A weak alias has TREE_PUBLIC set but not the other bits. */
|
||||
@ -848,11 +849,11 @@ make_decl_rtl (decl, asmspec)
|
||||
&& (TREE_PUBLIC (decl) || TREE_STATIC (decl)))))
|
||||
TREE_SIDE_EFFECTS (decl) = 1;
|
||||
|
||||
SET_DECL_RTL (decl, gen_rtx_MEM (DECL_MODE (decl),
|
||||
gen_rtx_SYMBOL_REF (Pmode, name)));
|
||||
SYMBOL_REF_WEAK (XEXP (DECL_RTL (decl), 0)) = DECL_WEAK (decl);
|
||||
x = gen_rtx_MEM (DECL_MODE (decl), gen_rtx_SYMBOL_REF (Pmode, name));
|
||||
SYMBOL_REF_WEAK (XEXP (x, 0)) = DECL_WEAK (decl);
|
||||
if (TREE_CODE (decl) != FUNCTION_DECL)
|
||||
set_mem_attributes (DECL_RTL (decl), decl, 1);
|
||||
set_mem_attributes (x, decl, 1);
|
||||
SET_DECL_RTL (decl, x);
|
||||
|
||||
/* Optionally set flags or add text to the name to record information
|
||||
such as that it is a function name.
|
||||
|
Loading…
Reference in New Issue
Block a user