/* Generate code from machine description to recognize rtl as insns.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
+ 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 2, or (at your option)
+ 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
License for more details.
You should have received a copy of the GNU General Public License
- along with GCC; see the file COPYING. If not, write to the Free
- Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA. */
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
/* This program is used to produce insn-recog.c, which contains a
/* Count of errors. */
static int error_count;
\f
-/* Predicate handling.
+/* Predicate handling.
We construct from the machine description a table mapping each
predicate to a list of the rtl codes it can possibly match. The
break;
case IF_THEN_ELSE:
- /* a ? b : c accepts the same codes as (a & b) | (!a & c). */
+ /* a ? b : c accepts the same codes as (a & b) | (!a & c). */
compute_predicate_codes (XEXP (exp, 0), op0_codes);
compute_predicate_codes (XEXP (exp, 1), op1_codes);
compute_predicate_codes (XEXP (exp, 2), op2_codes);
{
size_t n = next_code - code;
int found_it = 0;
-
+
for (i = 0; i < NUM_RTX_CODE; i++)
if (!strncmp (code, GET_RTX_NAME (i), n)
&& GET_RTX_NAME (i)[n] == '\0')
{
struct pred_data *pred = xcalloc (sizeof (struct pred_data), 1);
char codes[NUM_RTX_CODE];
- bool seen_one = false;
int i;
pred->name = XSTR (desc, 0);
for (i = 0; i < NUM_RTX_CODE; i++)
if (codes[i] != N)
- {
- pred->codes[i] = true;
- if (GET_RTX_CLASS (i) != RTX_CONST_OBJ)
- pred->allows_non_const = true;
- if (i != REG
- && i != SUBREG
- && i != MEM
- && i != CONCAT
- && i != PARALLEL
- && i != STRICT_LOW_PART)
- pred->allows_non_lvalue = true;
-
- if (seen_one)
- pred->singleton = UNKNOWN;
- else
- {
- pred->singleton = i;
- seen_one = true;
- }
- }
+ add_predicate_code (pred, i);
+
add_predicate (pred);
}
#undef I
struct decision_test **place = *pplace;
struct decision_test *test;
- test = xmalloc (sizeof (*test));
+ test = XNEW (struct decision_test);
test->next = *place;
test->type = type;
*place = test;
if (fmt[i] == 'i')
{
gcc_assert (i < 2);
-
+
if (!i)
{
test = new_decision_test (DT_elt_zero_int, &place);
#include \"resource.h\"\n\
#include \"toplev.h\"\n\
#include \"reload.h\"\n\
+#include \"regs.h\"\n\
+#include \"tm-constrs.h\"\n\
\n");
puts ("\n\