gensupport.h revision 132718
1/* Declarations for rtx-reader support for gen* routines.
2   Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
3
4This file is part of GCC.
5
6GCC is free software; you can redistribute it and/or modify it under
7the terms of the GNU General Public License as published by the Free
8Software Foundation; either version 2, or (at your option) any later
9version.
10
11GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12WARRANTY; without even the implied warranty of MERCHANTABILITY or
13FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14for more details.
15
16You should have received a copy of the GNU General Public License
17along with GCC; see the file COPYING.  If not, write to the Free
18Software Foundation, 59 Temple Place - Suite 330, Boston, MA
1902111-1307, USA.  */
20
21#ifndef GCC_GENSUPPORT_H
22#define GCC_GENSUPPORT_H
23
24struct obstack;
25extern struct obstack *rtl_obstack;
26
27extern int init_md_reader_args (int, char **);
28extern int init_md_reader (const char *);
29extern rtx read_md_rtx (int *, int *);
30
31extern void message_with_line (int, const char *, ...)
32     ATTRIBUTE_PRINTF_2;
33
34/* Set this to 0 to disable automatic elision of insn patterns which
35   can never be used in this configuration.  See genconditions.c.
36   Must be set before calling init_md_reader.  */
37extern int insn_elision;
38
39/* If this is 1, the insn elision table doesn't even exist yet;
40   maybe_eval_c_test will always return -1.  This is distinct from
41   insn_elision because genflags and gencodes need to see all the
42   patterns, but treat elided patterns differently.  */
43extern const int insn_elision_unavailable;
44
45/* If the C test passed as the argument can be evaluated at compile
46   time, return its truth value; else return -1.  The test must have
47   appeared somewhere in the machine description when genconditions
48   was run.  */
49extern int maybe_eval_c_test (const char *);
50
51/* This table should not be accessed directly; use maybe_eval_c_test.  */
52struct c_test
53{
54  const char *expr;
55  int value;
56};
57
58extern const struct c_test insn_conditions[];
59extern const size_t n_insn_conditions;
60
61#ifdef __HASHTAB_H__
62extern hashval_t hash_c_test (const void *);
63extern int cmp_c_test (const void *, const void *);
64#endif
65
66extern int n_comma_elts	(const char *);
67extern const char *scan_comma_elt (const char **);
68
69#endif /* GCC_GENSUPPORT_H */
70