00001 /* Declarations for rtx-reader support for gen* routines. 00002 Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc. 00003 00004 This file is part of GCC. 00005 00006 GCC is free software; you can redistribute it and/or modify it under 00007 the terms of the GNU General Public License as published by the Free 00008 Software Foundation; either version 2, or (at your option) any later 00009 version. 00010 00011 GCC is distributed in the hope that it will be useful, but WITHOUT ANY 00012 WARRANTY; without even the implied warranty of MERCHANTABILITY or 00013 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00014 for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with GCC; see the file COPYING. If not, write to the Free 00018 Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 00019 02110-1301, USA. */ 00020 00021 #ifndef GCC_GENSUPPORT_H 00022 #define GCC_GENSUPPORT_H 00023 00024 struct obstack; 00025 extern struct obstack *rtl_obstack; 00026 extern const char *in_fname; 00027 00028 extern int init_md_reader_args_cb (int, char **, bool (*)(const char *)); 00029 extern int init_md_reader_args (int, char **); 00030 extern rtx read_md_rtx (int *, int *); 00031 00032 extern void message_with_line (int, const char *, ...) 00033 ATTRIBUTE_PRINTF_2; 00034 00035 /* Set this to 0 to disable automatic elision of insn patterns which 00036 can never be used in this configuration. See genconditions.c. 00037 Must be set before calling init_md_reader. */ 00038 extern int insn_elision; 00039 00040 /* If the C test passed as the argument can be evaluated at compile 00041 time, return its truth value; else return -1. The test must have 00042 appeared somewhere in the machine description when genconditions 00043 was run. */ 00044 extern int maybe_eval_c_test (const char *); 00045 00046 /* Add an entry to the table of conditions. Used by genconditions and 00047 by read-rtl.c. */ 00048 extern void add_c_test (const char *, int); 00049 00050 /* This structure is used internally by gensupport.c and genconditions.c. */ 00051 struct c_test 00052 { 00053 const char *expr; 00054 int value; 00055 }; 00056 00057 #ifdef __HASHTAB_H__ 00058 extern hashval_t hash_c_test (const void *); 00059 extern int cmp_c_test (const void *, const void *); 00060 extern void traverse_c_tests (htab_trav, void *); 00061 #endif 00062 00063 extern int n_comma_elts (const char *); 00064 extern const char *scan_comma_elt (const char **); 00065 00066 /* Predicate handling: helper functions and data structures. */ 00067 00068 struct pred_data 00069 { 00070 struct pred_data *next; /* for iterating over the set of all preds */ 00071 const char *name; /* predicate name */ 00072 bool special; /* special handling of modes? */ 00073 00074 /* data used primarily by genpreds.c */ 00075 const char *c_block; /* C test block */ 00076 rtx exp; /* RTL test expression */ 00077 00078 /* data used primarily by genrecog.c */ 00079 enum rtx_code singleton; /* if pred takes only one code, that code */ 00080 bool allows_non_lvalue; /* if pred allows non-lvalue expressions */ 00081 bool allows_non_const; /* if pred allows non-const expressions */ 00082 bool codes[NUM_RTX_CODE]; /* set of codes accepted */ 00083 }; 00084 00085 extern struct pred_data *first_predicate; 00086 extern struct pred_data *lookup_predicate (const char *); 00087 extern void add_predicate (struct pred_data *); 00088 00089 #define FOR_ALL_PREDICATES(p) for (p = first_predicate; p; p = p->next) 00090 00091 /* This callback will be invoked whenever an rtl include directive is 00092 processed. To be used for creation of the dependency file. */ 00093 extern void (*include_callback) (const char *); 00094 00095 #endif /* GCC_GENSUPPORT_H */
1.5.6