expr.c (expand_assignment): Remove the last argument.

* expr.c (expand_assignment): Remove the last argument.
	Change the return type to void.
	* expr.h: Update the prototype of expand_assignment.
	* function.c (assign_parm_setup_reg): Update a call to
	expand_assignment.
	* stmt.c (expand_asm_expr): Likewise.

From-SVN: r89275
This commit is contained in:
Kazu Hirata 2004-10-19 14:43:56 +00:00 committed by Kazu Hirata
parent 88e9994a46
commit e836a5a26a
5 changed files with 28 additions and 34 deletions

View File

@ -1,3 +1,12 @@
2004-10-19 Kazu Hirata <kazu@cs.umass.edu>
* expr.c (expand_assignment): Remove the last argument.
Change the return type to void.
* expr.h: Update the prototype of expand_assignment.
* function.c (assign_parm_setup_reg): Update a call to
expand_assignment.
* stmt.c (expand_asm_expr): Likewise.
2004-10-19 Kazu Hirata <kazu@cs.umass.edu>
* expr.c (expand_expr_real_1) <MODIFY_EXPR>: Remove

View File

@ -3405,13 +3405,10 @@ get_subtarget (rtx x)
? 0 : x);
}
/* Expand an assignment that stores the value of FROM into TO.
If WANT_VALUE is nonzero, return an rtx for the value of TO.
(If the value is constant, this rtx is a constant.)
Otherwise, the returned value is NULL_RTX. */
/* Expand an assignment that stores the value of FROM into TO. */
rtx
expand_assignment (tree to, tree from, int want_value)
void
expand_assignment (tree to, tree from)
{
rtx to_rtx = 0;
rtx result;
@ -3421,7 +3418,7 @@ expand_assignment (tree to, tree from, int want_value)
if (TREE_CODE (to) == ERROR_MARK)
{
result = expand_expr (from, NULL_RTX, VOIDmode, 0);
return want_value ? result : NULL_RTX;
return;
}
/* Assignment of a structure component needs special treatment
@ -3449,9 +3446,6 @@ expand_assignment (tree to, tree from, int want_value)
/* If we are going to use store_bit_field and extract_bit_field,
make sure to_rtx will be safe for multiple use. */
if (mode1 == VOIDmode && want_value)
tem = stabilize_reference (tem);
orig_to_rtx = to_rtx = expand_expr (tem, NULL_RTX, VOIDmode, 0);
if (offset != 0)
@ -3513,7 +3507,7 @@ expand_assignment (tree to, tree from, int want_value)
}
/* Optimize bitfld op= val in certain cases. */
while (mode1 == VOIDmode && !want_value
while (mode1 == VOIDmode
&& bitsize > 0 && bitsize < BITS_PER_WORD
&& GET_MODE_BITSIZE (GET_MODE (to_rtx)) <= BITS_PER_WORD
&& !TREE_SIDE_EFFECTS (to)
@ -3616,7 +3610,7 @@ expand_assignment (tree to, tree from, int want_value)
emit_move_insn (str_rtx, result);
free_temp_slots ();
pop_temp_slots ();
return NULL_RTX;
return;
default:
break;
@ -3626,11 +3620,7 @@ expand_assignment (tree to, tree from, int want_value)
}
result = store_field (to_rtx, bitsize, bitpos, mode1, from,
(want_value
/* Spurious cast for HPUX compiler. */
? ((enum machine_mode)
TYPE_MODE (TREE_TYPE (to)))
: VOIDmode),
VOIDmode,
unsignedp, TREE_TYPE (tem), get_alias_set (to));
preserve_temp_slots (result);
@ -3639,11 +3629,7 @@ expand_assignment (tree to, tree from, int want_value)
/* If the value is meaningful, convert RESULT to the proper mode.
Otherwise, return nothing. */
return (want_value ? convert_modes (TYPE_MODE (TREE_TYPE (to)),
TYPE_MODE (TREE_TYPE (from)),
result,
TYPE_UNSIGNED (TREE_TYPE (to)))
: NULL_RTX);
return;
}
/* If the rhs is a function call and its value is not an aggregate,
@ -3684,7 +3670,7 @@ expand_assignment (tree to, tree from, int want_value)
preserve_temp_slots (to_rtx);
free_temp_slots ();
pop_temp_slots ();
return want_value ? to_rtx : NULL_RTX;
return;
}
/* Ordinary treatment. Expand TO to get a REG or MEM rtx.
@ -3711,7 +3697,7 @@ expand_assignment (tree to, tree from, int want_value)
preserve_temp_slots (to_rtx);
free_temp_slots ();
pop_temp_slots ();
return want_value ? to_rtx : NULL_RTX;
return;
}
/* In case we are returning the contents of an object which overlaps
@ -3737,17 +3723,17 @@ expand_assignment (tree to, tree from, int want_value)
preserve_temp_slots (to_rtx);
free_temp_slots ();
pop_temp_slots ();
return want_value ? to_rtx : NULL_RTX;
return;
}
/* Compute FROM and store the value in the rtx we got. */
push_temp_slots ();
result = store_expr (from, to_rtx, want_value);
result = store_expr (from, to_rtx, 0);
preserve_temp_slots (result);
free_temp_slots ();
pop_temp_slots ();
return want_value ? result : NULL_RTX;
return;
}
/* Generate code for computing expression EXP,
@ -4732,7 +4718,7 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
the loop. */
expand_assignment (index,
build2 (PLUS_EXPR, TREE_TYPE (index),
index, integer_one_node), 0);
index, integer_one_node));
emit_jump (loop_start);
@ -8093,14 +8079,13 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
expand_assignment (lhs, convert (TREE_TYPE (rhs),
(TREE_CODE (rhs) == BIT_IOR_EXPR
? integer_one_node
: integer_zero_node)),
0);
: integer_zero_node)));
do_pending_stack_adjust ();
emit_label (label);
return const0_rtx;
}
expand_assignment (lhs, rhs, 0);
expand_assignment (lhs, rhs);
return const0_rtx;
}

View File

@ -466,7 +466,7 @@ extern void emit_push_insn (rtx, enum machine_mode, tree, rtx, unsigned int,
int, rtx, int, rtx, rtx, int, rtx);
/* Expand an assignment that stores the value of FROM into TO. */
extern rtx expand_assignment (tree, tree, int);
extern void expand_assignment (tree, tree);
/* Generate code for computing expression EXP,
and storing the value into TARGET.

View File

@ -2730,7 +2730,7 @@ assign_parm_setup_reg (struct assign_parm_data_all *all, tree parm,
/* TREE_USED gets set erroneously during expand_assignment. */
save_tree_used = TREE_USED (parm);
expand_assignment (parm, make_tree (data->nominal_type, tempreg), 0);
expand_assignment (parm, make_tree (data->nominal_type, tempreg));
TREE_USED (parm) = save_tree_used;
all->conversion_insns = get_insns ();
end_sequence ();

View File

@ -1108,7 +1108,7 @@ expand_asm_expr (tree exp)
{
if (o[i] != TREE_VALUE (tail))
{
expand_assignment (o[i], TREE_VALUE (tail), 0);
expand_assignment (o[i], TREE_VALUE (tail));
free_temp_slots ();
/* Restore the original value so that it's correct the next