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, 59 Temple Place - Suite 330, Boston, MA 00019 02111-1307, 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 this is 1, the insn elision table doesn't even exist yet; 00041 maybe_eval_c_test will always return -1. This is distinct from 00042 insn_elision because genflags and gencodes need to see all the 00043 patterns, but treat elided patterns differently. */ 00044 extern const int insn_elision_unavailable; 00045 00046 /* If the C test passed as the argument can be evaluated at compile 00047 time, return its truth value; else return -1. The test must have 00048 appeared somewhere in the machine description when genconditions 00049 was run. */ 00050 extern int maybe_eval_c_test (const char *); 00051 00052 /* This table should not be accessed directly; use maybe_eval_c_test. */ 00053 struct c_test 00054 { 00055 const char *expr; 00056 int value; 00057 }; 00058 00059 extern const struct c_test insn_conditions[]; 00060 extern const size_t n_insn_conditions; 00061 00062 #ifdef __HASHTAB_H__ 00063 extern hashval_t hash_c_test (const void *); 00064 extern int cmp_c_test (const void *, const void *); 00065 #endif 00066 00067 extern int n_comma_elts (const char *); 00068 extern const char *scan_comma_elt (const char **); 00069 00070 /* Predicate handling: helper functions and data structures. */ 00071 00072 struct pred_data 00073 { 00074 struct pred_data *next; /* for iterating over the set of all preds */ 00075 const char *name; /* predicate name */ 00076 bool special; /* special handling of modes? */ 00077 00078 /* data used primarily by genpreds.c */ 00079 const char *c_block; /* C test block */ 00080 rtx exp; /* RTL test expression */ 00081 00082 /* data used primarily by genrecog.c */ 00083 enum rtx_code singleton; /* if pred takes only one code, that code */ 00084 bool allows_non_lvalue; /* if pred allows non-lvalue expressions */ 00085 bool allows_non_const; /* if pred allows non-const expressions */ 00086 bool codes[NUM_RTX_CODE]; /* set of codes accepted */ 00087 }; 00088 00089 extern struct pred_data *first_predicate; 00090 extern struct pred_data *lookup_predicate (const char *); 00091 extern void add_predicate (struct pred_data *); 00092 00093 #define FOR_ALL_PREDICATES(p) for (p = first_predicate; p; p = p->next) 00094 00095 /* This callback will be invoked whenever an rtl include directive is 00096 processed. To be used for creation of the dependency file. */ 00097 extern void (*include_callback) (const char *); 00098 00099 #endif /* GCC_GENSUPPORT_H */
1.5.6