/* Subroutines used for code generation on the DEC Alpha.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
break;
}
if (i == ct_size)
- error ("bad value %qs for -mcpu switch", alpha_tune_string);
+ error ("bad value %qs for -mtune switch", alpha_tune_string);
}
/* Do some sanity checks on the above options. */
static int
alpha_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost)
{
- enum attr_type insn_type, dep_insn_type;
+ enum attr_type dep_insn_type;
/* If the dependence is an anti-dependence, there is no cost. For an
output dependence, there is sometimes a cost, but it doesn't seem
if (recog_memoized (insn) < 0 || recog_memoized (dep_insn) < 0)
return cost;
- insn_type = get_attr_type (insn);
dep_insn_type = get_attr_type (dep_insn);
/* Bring in the user-defined memory latency. */
function_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED,
enum machine_mode mode)
{
- unsigned int regnum, dummy;
+ unsigned int regnum, dummy ATTRIBUTE_UNUSED;
enum mode_class mclass;
gcc_assert (!valtype || !alpha_return_in_memory (valtype, func));
/* Fold one of our builtin functions. */
static tree
-alpha_fold_builtin (tree fndecl, tree arglist, bool ignore ATTRIBUTE_UNUSED)
+alpha_fold_builtin (tree fndecl, int n_args, tree *op,
+ bool ignore ATTRIBUTE_UNUSED)
{
- tree op[MAX_ARGS], t;
unsigned HOST_WIDE_INT opint[MAX_ARGS];
- long op_const = 0, arity = 0;
+ long op_const = 0;
+ int i;
+
+ if (n_args >= MAX_ARGS)
+ return NULL;
- for (t = arglist; t ; t = TREE_CHAIN (t), ++arity)
+ for (i = 0; i < n_args; i++)
{
- tree arg = TREE_VALUE (t);
+ tree arg = op[i];
if (arg == error_mark_node)
return NULL;
- if (arity >= MAX_ARGS)
- return NULL;
- op[arity] = arg;
- opint[arity] = 0;
+ opint[i] = 0;
if (TREE_CODE (arg) == INTEGER_CST)
{
- op_const |= 1L << arity;
- opint[arity] = int_cst_value (arg);
+ op_const |= 1L << i;
+ opint[i] = int_cst_value (arg);
}
}