/* Subroutines for manipulating rtx's in semantically interesting ways.
Copyright (C) 1987, 1991, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
Free Software Foundation, Inc.
This file is part of GCC.
{
size = lang_hooks.expr_size (exp);
gcc_assert (size);
- size = SUBSTITUTE_PLACEHOLDER_IN_EXPR (size, exp);
+ gcc_assert (size == SUBSTITUTE_PLACEHOLDER_IN_EXPR (size, exp));
}
return expand_expr (size, NULL_RTX, TYPE_MODE (sizetype), EXPAND_NORMAL);
in certain cases. This is not necessary since the code
below can handle all possible cases, but machine-dependent
transformations can make better code. */
- LEGITIMIZE_ADDRESS (x, oldx, mode, done);
+ {
+ rtx orig_x = x;
+ x = targetm.legitimize_address (x, oldx, mode);
+ if (orig_x != x && memory_address_p (mode, x))
+ goto done;
+ }
/* PLUS and MULT can appear in special ways
as the result of attempts to make an address usable for indexing.
align = MIN (sa, ca);
}
- else if (MEM_P (x) && MEM_POINTER (x))
- align = MEM_ALIGN (x);
- if (align)
+ if (align || (MEM_P (x) && MEM_POINTER (x)))
mark_reg_pointer (temp, align);
}