- prototype declarations for operand predicates (tm-preds.h)
- function definitions of operand predicates, if defined new-style
(insn-preds.c)
- Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007
+ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
if (q != p && (ISALNUM (q[-1]) || q[-1] == '_'))
return false;
q += strlen (var);
- if (ISALNUM (q[0] || q[0] == '_'))
+ if (ISALNUM (q[0]) || q[0] == '_')
return false;
}
return true;
}
obstack_1grow (rtl_obstack, '\0');
- return obstack_finish (rtl_obstack);
+ return XOBFINISH (rtl_obstack, const char *);
}
/* Add one constraint, of any sort, to the tables. NAME is its name;
}
- c = obstack_alloc (rtl_obstack, sizeof (struct constraint_data));
+ c = XOBNEW (rtl_obstack, struct constraint_data);
c->name = name;
c->c_name = need_mangled_name ? mangle (name) : name;
c->lineno = lineno;
{
struct constraint_data *c;
+ fputs ("#define CONSTRAINT_NUM_DEFINED_P 1\n", stdout);
fputs ("enum constraint_num\n"
"{\n"
" CONSTRAINT__UNKNOWN = 0", stdout);
FOR_ALL_CONSTRAINTS (c)
printf (",\n CONSTRAINT_%s", c->c_name);
- puts ("\n};\n");
+ puts (",\n CONSTRAINT__LIMIT\n};\n");
}
/* Write out a function which looks at a string and determines what
"{\n", c->c_name,
needs_op ? "op" : "ARG_UNUSED (op)");
if (needs_mode)
- puts ("enum machine_mode mode = GET_MODE (op);");
+ puts (" enum machine_mode mode = GET_MODE (op);");
if (needs_ival)
puts (" HOST_WIDE_INT ival = 0;");
if (needs_hval)
puts (" const REAL_VALUE_TYPE *rval = 0;");
if (needs_ival)
- puts (" if (GET_CODE (op) == CONST_INT)\n"
+ puts (" if (CONST_INT_P (op))\n"
" ival = INTVAL (op);");
if (needs_hval)
puts (" if (GET_CODE (op) == CONST_DOUBLE && mode == VOIDmode)"
puts ("extern enum reg_class regclass_for_constraint "
"(enum constraint_num);\n"
"#define REG_CLASS_FROM_CONSTRAINT(c_,s_) \\\n"
- " regclass_for_constraint (lookup_constraint (s_))\n");
+ " regclass_for_constraint (lookup_constraint (s_))\n"
+ "#define REG_CLASS_FOR_CONSTRAINT(x_) \\\n"
+ " regclass_for_constraint (x_)\n");
else
- puts ("#define REG_CLASS_FROM_CONSTRAINT(c_,s_) NO_REGS");
+ puts ("#define REG_CLASS_FROM_CONSTRAINT(c_,s_) NO_REGS\n"
+ "#define REG_CLASS_FOR_CONSTRAINT(x_) \\\n"
+ " NO_REGS\n");
if (have_const_int_constraints)
puts ("extern bool insn_const_int_ok_for_constraint "
"(HOST_WIDE_INT, enum constraint_num);\n"