/* This function can't use
if (!MEM_EXPR (mem) || !MEM_OFFSET (mem)
|| !CONST_INT_P (MEM_OFFSET (mem))
- || (get_object_alignment (MEM_EXPR (mem), MEM_ALIGN (mem), align)
+ || (MAX (MEM_ALIGN (mem),
+ get_object_alignment (MEM_EXPR (mem), align))
< align))
return -1;
else
else if (TREE_CODE (t) == MEM_REF)
{
tree op0 = TREE_OPERAND (t, 0);
- unsigned HOST_WIDE_INT aoff = BITS_PER_UNIT;
- if (host_integerp (TREE_OPERAND (t, 1), 1))
+ if (TREE_CODE (op0) == ADDR_EXPR
+ && (DECL_P (TREE_OPERAND (op0, 0))
+ || CONSTANT_CLASS_P (TREE_OPERAND (op0, 0))))
{
- unsigned HOST_WIDE_INT ioff = TREE_INT_CST_LOW (TREE_OPERAND (t, 1));
- aoff = (ioff & -ioff) * BITS_PER_UNIT;
- }
- if (TREE_CODE (op0) == ADDR_EXPR && DECL_P (TREE_OPERAND (op0, 0)))
- align = MAX (align, DECL_ALIGN (TREE_OPERAND (op0, 0)));
- else if (TREE_CODE (op0) == ADDR_EXPR
- && CONSTANT_CLASS_P (TREE_OPERAND (op0, 0)))
- {
- align = TYPE_ALIGN (TREE_TYPE (TREE_OPERAND (op0, 0)));
+ if (DECL_P (TREE_OPERAND (op0, 0)))
+ align = DECL_ALIGN (TREE_OPERAND (op0, 0));
+ else if (CONSTANT_CLASS_P (TREE_OPERAND (op0, 0)))
+ {
+ align = TYPE_ALIGN (TREE_TYPE (TREE_OPERAND (op0, 0)));
#ifdef CONSTANT_ALIGNMENT
- align = CONSTANT_ALIGNMENT (TREE_OPERAND (op0, 0), align);
+ align = CONSTANT_ALIGNMENT (TREE_OPERAND (op0, 0), align);
#endif
+ }
+ if (TREE_INT_CST_LOW (TREE_OPERAND (t, 1)) != 0)
+ {
+ unsigned HOST_WIDE_INT ioff
+ = TREE_INT_CST_LOW (TREE_OPERAND (t, 1));
+ unsigned HOST_WIDE_INT aoff = (ioff & -ioff) * BITS_PER_UNIT;
+ align = MIN (aoff, align);
+ }
}
else
/* ??? This isn't fully correct, we can't set the alignment from the
type in all cases. */
align = MAX (align, TYPE_ALIGN (type));
-
- if (!integer_zerop (TREE_OPERAND (t, 1)) && aoff < align)
- align = aoff;
}
- else if (TREE_CODE (t) == MISALIGNED_INDIRECT_REF)
- {
- if (integer_zerop (TREE_OPERAND (t, 1)))
- /* We don't know anything about the alignment. */
- align = BITS_PER_UNIT;
- else
- align = tree_low_cst (TREE_OPERAND (t, 1), 1);
- }
+ else if (TREE_CODE (t) == TARGET_MEM_REF)
+ /* ??? This isn't fully correct, we can't set the alignment from the
+ type in all cases. */
+ align = MAX (align, TYPE_ALIGN (type));
/* If the size is known, we can set that. */
if (TYPE_SIZE_UNIT (type) && host_integerp (TYPE_SIZE_UNIT (type), 1))
}
/* If this is an indirect reference, record it. */
- else if (TREE_CODE (t) == MEM_REF
- || TREE_CODE (t) == MISALIGNED_INDIRECT_REF)
+ else if (TREE_CODE (t) == MEM_REF)
{
expr = t;
offset = const0_rtx;
/* If this is an indirect reference, record it. */
else if (TREE_CODE (t) == MEM_REF
- || TREE_CODE (t) == MISALIGNED_INDIRECT_REF)
+ || TREE_CODE (t) == TARGET_MEM_REF)
{
expr = t;
offset = const0_rtx;
if (!align_computed && !INDIRECT_REF_P (t))
{
- unsigned int obj_align
- = get_object_alignment (t, align, BIGGEST_ALIGNMENT);
+ unsigned int obj_align = get_object_alignment (t, BIGGEST_ALIGNMENT);
align = MAX (align, obj_align);
}
}
void
reorder_insns_nobb (rtx from, rtx to, rtx after)
{
+#ifdef ENABLE_CHECKING
+ rtx x;
+ for (x = from; x != to; x = NEXT_INSN (x))
+ gcc_assert (after != x);
+ gcc_assert (after != to);
+#endif
+
/* Splice this bunch out of where it is now. */
if (PREV_INSN (from))
NEXT_INSN (PREV_INSN (from)) = NEXT_INSN (to);
regno_reg_rtx[VIRTUAL_STACK_DYNAMIC_REGNUM] = virtual_stack_dynamic_rtx;
regno_reg_rtx[VIRTUAL_OUTGOING_ARGS_REGNUM] = virtual_outgoing_args_rtx;
regno_reg_rtx[VIRTUAL_CFA_REGNUM] = virtual_cfa_rtx;
+ regno_reg_rtx[VIRTUAL_PREFERRED_STACK_BOUNDARY_REGNUM]
+ = virtual_preferred_stack_boundary_rtx;
}
\f
virtual_outgoing_args_rtx =
gen_raw_REG (Pmode, VIRTUAL_OUTGOING_ARGS_REGNUM);
virtual_cfa_rtx = gen_raw_REG (Pmode, VIRTUAL_CFA_REGNUM);
+ virtual_preferred_stack_boundary_rtx =
+ gen_raw_REG (Pmode, VIRTUAL_PREFERRED_STACK_BOUNDARY_REGNUM);
/* Initialize RTL for commonly used hard registers. These are
copied into regno_reg_rtx as we begin to compile each function. */