/* Memory address lowering and addressing mode selection.
Copyright (C) 2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-
+
This file is part of GCC.
-
+
GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3, or (at your option) any
later version.
-
+
GCC is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
-
+
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
/* TODO -- handling of symbols (according to Richard Hendersons
comments, http://gcc.gnu.org/ml/gcc-patches/2005-04/msg00949.html):
-
+
There are at least 5 different kinds of symbols that we can run up against:
(1) binds_local_p, small data area.
/* Returns address for TARGET_MEM_REF with parameters given by ADDR
in address space AS.
- If REALLY_EXPAND is false, just make fake registers instead
+ If REALLY_EXPAND is false, just make fake registers instead
of really expanding the operands, and perform the expansion in-place
by using one of the "templates". */
{
amult = addr->elts[i].coef;
amult_neg = double_int_ext_for_comb (double_int_neg (amult), addr);
-
+
if (double_int_equal_p (amult, best_mult))
op_code = PLUS_EXPR;
else if (double_int_equal_p (amult_neg, best_mult))
mult_elt = fold_build1 (NEGATE_EXPR, sizetype, elt);
}
addr->n = j;
-
+
parts->index = mult_elt;
parts->step = double_int_to_tree (sizetype, best_mult);
}
parts.index, parts.step),
true, NULL_TREE, true, GSI_SAME_STMT);
parts.step = NULL_TREE;
-
+
mem_ref = create_mem_ref_raw (type, &parts);
if (mem_ref)
return mem_ref;
{
tmp = build_addr (parts.symbol, current_function_decl);
gcc_assert (is_gimple_val (tmp));
-
+
/* Add the symbol to base, eventually forcing it to register. */
if (parts.base)
{
if (parts.base)
{
atype = TREE_TYPE (parts.base);
- parts.base = force_gimple_operand_gsi (gsi,
+ parts.base = force_gimple_operand_gsi (gsi,
fold_build2 (POINTER_PLUS_EXPR, atype,
parts.base,
fold_convert (sizetype, parts.offset)),
if (!changed)
return NULL_TREE;
-
+
ret = create_mem_ref_raw (TREE_TYPE (ref), &addr);
if (!ret)
return NULL_TREE;