/* Support routines for the various generation passes.
- Copyright (C) 2000, 2001, 2002, 2003, 2004
+ Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GCC.
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, 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include "bconfig.h"
#include "system.h"
const char *in_fname;
+/* This callback will be invoked whenever an rtl include directive is
+ processed. To be used for creation of the dependency file. */
+void (*include_callback) (const char *);
+
static struct obstack obstack;
struct obstack *rtl_obstack = &obstack;
read_rtx_filename = pathname;
read_rtx_lineno = 1;
+ if (include_callback)
+ include_callback (pathname);
+
/* Read the entire file. */
while (read_rtx (input_file, &desc, &lineno))
process_rtx (desc, lineno);
insn condition to create the new split condition. */
split_cond = XSTR (desc, 4);
if (split_cond[0] == '&' && split_cond[1] == '&')
- split_cond = concat (XSTR (desc, 2), split_cond, NULL);
+ {
+ copy_rtx_ptr_loc (split_cond + 2, split_cond);
+ split_cond = join_c_conditions (XSTR (desc, 2), split_cond + 2);
+ }
XSTR (split, 1) = split_cond;
XVEC (split, 2) = XVEC (desc, 5);
XSTR (split, 3) = XSTR (desc, 6);
return 0;
default:
- abort ();
+ gcc_unreachable ();
}
}
break;
default:
- abort ();
+ gcc_unreachable ();
}
}
}
break;
default:
- abort ();
+ gcc_unreachable ();
}
}
alter_test_for_insn (struct queue_elem *ce_elem,
struct queue_elem *insn_elem)
{
- const char *ce_test, *insn_test;
-
- ce_test = XSTR (ce_elem->data, 1);
- insn_test = XSTR (insn_elem->data, 2);
- if (!ce_test || *ce_test == '\0')
- return insn_test;
- if (!insn_test || *insn_test == '\0')
- return ce_test;
-
- return concat ("(", ce_test, ") && (", insn_test, ")", NULL);
+ return join_c_conditions (XSTR (ce_elem->data, 1),
+ XSTR (insn_elem->data, 2));
}
/* Adjust all of the operand numbers in SRC to match the shift they'll
char *lastsl;
rtx desc;
+ /* Unlock the stdio streams. */
+ unlock_std_streams ();
+
for (i = 1; i < argc; i++)
{
if (argv[i][0] != '-')
dummy.expr = expr;
test = (const struct c_test *)htab_find (condition_table, &dummy);
- if (!test)
- abort ();
+ gcc_assert (test);
return test->value;
}
}
/* This array gives the initial content of the predicate table. It
- has entries for all predicates defined in recog.c. The back end
- can define PREDICATE_CODES to give additional entries for the
- table; this is considered an obsolete mechanism (use
- define_predicate instead). */
+ has entries for all predicates defined in recog.c. */
struct old_pred_table
{
{"indirect_operand", {SUBREG, MEM}},
{"comparison_operator", {EQ, NE, LE, LT, GE, GT, LEU, LTU, GEU, GTU,
UNORDERED, ORDERED, UNEQ, UNGE, UNGT, UNLE,
- UNLT, LTGT}},
-#ifdef PREDICATE_CODES
- PREDICATE_CODES
-#endif
+ UNLT, LTGT}}
};
#define NUM_KNOWN_OLD_PREDS ARRAY_SIZE (old_preds)
-/* This table gives the initial set of special predicates. It has
- entries for all special predicates defined in recog.c. The back
- end can define SPECIAL_MODE_PREDICATES to give additional entries
- for the table; this is considered an obsolete mechanism (use
- define_special_predicate instead). */
+/* This table gives the set of special predicates. It has entries for
+ all special predicates defined in recog.c. */
static const char *const old_special_pred_table[] = {
"address_operand",
"pmode_register_operand",
-#ifdef SPECIAL_MODE_PREDICATES
- SPECIAL_MODE_PREDICATES
-#endif
};
#define NUM_OLD_SPECIAL_MODE_PREDS ARRAY_SIZE (old_special_pred_table)
/* Initialize the table of predicate definitions, starting with
- the information we have on generic predicates, and the old-style
- PREDICATE_CODES definitions. */
+ the information we have on generic predicates. */
static void
init_predicate_table (void)