/* Convert tree expression to rtl instructions, for GNU compiler.
Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of GCC.
}
align = MIN (MEM_ALIGN (x), MEM_ALIGN (y));
+ gcc_assert (align >= BITS_PER_UNIT);
gcc_assert (MEM_P (x));
gcc_assert (MEM_P (y));
if (len == 0)
return 1;
- if (! (memsetp
+ if (! (memsetp
? SET_BY_PIECES_P (len, align)
: STORE_BY_PIECES_P (len, align)))
return 0;
val_tree = make_tree (integer_type_node, val);
fn = clear_storage_libcall_fn (true);
- call_expr = build_call_expr (fn, 3,
- object_tree, integer_zero_node, size_tree);
+ call_expr = build_call_expr (fn, 3, object_tree, val_tree, size_tree);
CALL_EXPR_TAILCALL (call_expr) = tailcall;
retval = expand_normal (call_expr);
If CALL_PARAM_P is nonzero, this is a store into a call param on the
stack, and block moves may need to be treated specially.
-
+
If NONTEMPORAL is true, try using a nontemporal store instruction. */
rtx
do_pending_stack_adjust ();
NO_DEFER_POP;
- jumpifnot (TREE_OPERAND (exp, 0), lab1);
+ jumpifnot (TREE_OPERAND (exp, 0), lab1, -1);
store_expr (TREE_OPERAND (exp, 1), target, call_param_p,
nontemporal);
emit_jump_insn (gen_jump (lab2));
/* Generate a conditional jump to exit the loop. */
exit_cond = build2 (LT_EXPR, integer_type_node,
index, hi_index);
- jumpif (exit_cond, loop_end);
+ jumpif (exit_cond, loop_end, -1);
/* Update the loop counter, and jump to the head of
the loop. */
ALIAS_SET is the alias set for the destination. This value will
(in general) be different from that for TARGET, since TARGET is a
reference to the containing structure.
-
+
If NONTEMPORAL is true, try generating a nontemporal store. */
static rtx
enum machine_mode mode, tree exp, tree type,
alias_set_type alias_set, bool nontemporal)
{
- HOST_WIDE_INT width_mask = 0;
-
if (TREE_CODE (exp) == ERROR_MARK)
return const0_rtx;
side-effects. */
if (bitsize == 0)
return expand_expr (exp, const0_rtx, VOIDmode, EXPAND_NORMAL);
- else if (bitsize >= 0 && bitsize < HOST_BITS_PER_WIDE_INT)
- width_mask = ((HOST_WIDE_INT) 1 << bitsize) - 1;
/* If we are storing into an unaligned field of an aligned union that is
in a register, we may have the mode of TARGET being an integer mode but
/* First get the mode, signedness, and size. We do this from just the
outermost expression. */
+ *pbitsize = -1;
if (TREE_CODE (exp) == COMPONENT_REF)
{
tree field = TREE_OPERAND (exp, 1);
case COMPONENT_REF:
{
tree field = TREE_OPERAND (exp, 1);
- packed_p = DECL_PACKED (field)
+ packed_p = DECL_PACKED (field)
|| TYPE_PACKED (TREE_TYPE (field))
|| TYPE_PACKED (TREE_TYPE (exp));
if (packed_p)
{
unsigned HOST_WIDE_INT talign = target_align (target) / BITS_PER_UNIT;
unsigned HOST_WIDE_INT factor = highest_pow2_factor (exp);
-
+
return MAX (factor, talign);
}
\f
return expand_expr (TREE_OPERAND (exp, 0), target, tmode, modifier);
case CONST_DECL:
- /* Recurse and make the output_constant_def clause above handle this. */
- return expand_expr_addr_expr_1 (DECL_INITIAL (exp), target,
- tmode, modifier, as);
+ /* Expand the initializer like constants above. */
+ return XEXP (expand_expr_constant (DECL_INITIAL (exp), 0, modifier), 0);
case REALPART_EXPR:
/* The real part of the complex number is always first, therefore
if (modifier != EXPAND_NORMAL)
result = force_operand (result, NULL);
- tmp = expand_expr (offset, NULL_RTX, tmode,
+ tmp = expand_expr (offset, NULL_RTX, tmode,
modifier == EXPAND_INITIALIZER
? EXPAND_INITIALIZER : EXPAND_NORMAL);
expand_expr_real (tree exp, rtx target, enum machine_mode tmode,
enum expand_modifier modifier, rtx *alt_rtl)
{
- int lp_nr = 0;
- rtx ret, last = NULL;
+ rtx ret;
/* Handle ERROR_MARK before anybody tries to access its type. */
if (TREE_CODE (exp) == ERROR_MARK
return ret ? ret : const0_rtx;
}
- if (flag_non_call_exceptions)
- {
- lp_nr = lookup_expr_eh_lp (exp);
- if (lp_nr)
- last = get_last_insn ();
- }
-
/* If this is an expression of some kind and it has an associated line
number, then emit the line number before expanding the expression.
ret = expand_expr_real_1 (exp, target, tmode, modifier, alt_rtl);
}
- /* If using non-call exceptions, mark all insns that may trap.
- expand_call() will mark CALL_INSNs before we get to this code,
- but it doesn't handle libcalls, and these may trap. */
- if (lp_nr)
- {
- rtx insn;
- for (insn = next_real_insn (last); insn;
- insn = next_real_insn (insn))
- {
- if (! find_reg_note (insn, REG_EH_REGION, NULL_RTX)
- /* If we want exceptions for non-call insns, any
- may_trap_p instruction may throw. */
- && GET_CODE (PATTERN (insn)) != CLOBBER
- && GET_CODE (PATTERN (insn)) != USE
- && insn_could_throw_p (insn))
- make_reg_eh_region_note (insn, 0, lp_nr);
- }
- }
-
return ret;
}
gimple subexp0_def, subexp1_def;
tree top0, top1;
location_t loc = ops->location;
- tree treeop0, treeop1, treeop2;
+ tree treeop0, treeop1;
#define REDUCE_BIT_FIELD(expr) (reduce_bit_field \
? reduce_to_bit_field_precision ((expr), \
target, \
treeop0 = ops->op0;
treeop1 = ops->op1;
- treeop2 = ops->op2;
/* We should be called only on simple (binary or unary) expressions,
exactly those that are valid in gimple expressions that aren't
return CONST0_RTX (mode);
}
- case POINTER_PLUS_EXPR:
+ case POINTER_PLUS_EXPR:
/* Even though the sizetype mode and the pointer's mode can be different
- expand is able to handle this correctly and get the correct result out
+ expand is able to handle this correctly and get the correct result out
of the PLUS_EXPR code. */
/* Make sure to sign-extend the sizetype offset in a POINTER_PLUS_EXPR
if sizetype precision is smaller than pointer precision. */
temp = gen_label_rtx ();
do_compare_rtx_and_jump (target, cmpop1, comparison_code,
- unsignedp, mode, NULL_RTX, NULL_RTX, temp);
+ unsignedp, mode, NULL_RTX, NULL_RTX, temp,
+ -1);
}
emit_move_insn (target, op1);
emit_label (temp);
emit_move_insn (target, const0_rtx);
op1 = gen_label_rtx ();
- jumpifnot_1 (code, treeop0, treeop1, op1);
+ jumpifnot_1 (code, treeop0, treeop1, op1, -1);
emit_move_insn (target, const1_rtx);
/* If both modes are integral, then we can convert from one to the
other. */
else if (SCALAR_INT_MODE_P (GET_MODE (op0)) && SCALAR_INT_MODE_P (mode))
- op0 = convert_modes (mode, GET_MODE (op0), op0,
+ op0 = convert_modes (mode, GET_MODE (op0), op0,
TYPE_UNSIGNED (TREE_TYPE (treeop0)));
/* As a last resort, spill op0 to memory, and reload it in a
different mode. */
emit_move_insn (target, const0_rtx);
op1 = gen_label_rtx ();
- jumpifnot_1 (code, treeop0, treeop1, op1);
+ jumpifnot_1 (code, treeop0, treeop1, op1, -1);
if (target)
emit_move_insn (target, const1_rtx);
NO_DEFER_POP;
op0 = gen_label_rtx ();
op1 = gen_label_rtx ();
- jumpifnot (treeop0, op0);
+ jumpifnot (treeop0, op0, -1);
store_expr (treeop1, temp,
modifier == EXPAND_STACK_PARM,
false);
int value = TREE_CODE (rhs) == BIT_IOR_EXPR;
do_jump (TREE_OPERAND (rhs, 1),
value ? label : 0,
- value ? 0 : label);
+ value ? 0 : label, -1);
expand_assignment (lhs, build_int_cst (TREE_TYPE (rhs), value),
MOVE_NONTEMPORAL (exp));
do_pending_stack_adjust ();