/* Memory address lowering and addressing mode selection.
- Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of GCC.
/* A "template" for memory address, used to determine whether the address is
valid for mode. */
-struct mem_addr_template GTY (())
-{
+struct GTY (()) mem_addr_template {
rtx ref; /* The template. */
rtx * GTY ((skip)) step_p; /* The point in template where the step should be
filled in. */
if (addr->offset && integer_zerop (addr->offset))
addr->offset = NULL_TREE;
- return build7 (TARGET_MEM_REF, type,
+ return build6 (TARGET_MEM_REF, type,
addr->symbol, addr->base, addr->index,
- addr->step, addr->offset, NULL, NULL);
+ addr->step, addr->offset, NULL);
}
/* Returns true if OBJ is an object whose address is a link time constant. */
{
atype = TREE_TYPE (tmp);
parts.base = force_gimple_operand_gsi (gsi,
- fold_build2 (PLUS_EXPR, atype,
- fold_convert (atype, parts.base),
- tmp),
+ fold_build2 (POINTER_PLUS_EXPR, atype,
+ tmp,
+ fold_convert (sizetype, parts.base)),
true, NULL_TREE, true, GSI_SAME_STMT);
}
else
void
copy_mem_ref_info (tree to, tree from)
{
- /* Copy the annotation, to preserve the aliasing information. */
- TMR_TAG (to) = TMR_TAG (from);
-
/* And the info about the original reference. */
TMR_ORIGINAL (to) = TMR_ORIGINAL (from);
}