aboutsummaryrefslogtreecommitdiff
path: root/gcc/genattrtab.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/genattrtab.c')
-rw-r--r--gcc/genattrtab.c80
1 files changed, 15 insertions, 65 deletions
diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c
index 55d8adf..5664110 100644
--- a/gcc/genattrtab.c
+++ b/gcc/genattrtab.c
@@ -110,8 +110,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "obstack.h"
#include "errors.h"
-#include "genattrtab.h"
-
static struct obstack obstack1, obstack2;
struct obstack *hash_obstack = &obstack1;
struct obstack *temp_obstack = &obstack2;
@@ -306,8 +304,6 @@ static int have_annul_true, have_annul_false;
static int num_units, num_unit_opclasses;
static int num_insn_ents;
-int num_dfa_decls;
-
/* Used as operand to `operate_exp': */
enum operator {PLUS_OP, MINUS_OP, POS_MINUS_OP, EQ_OP, OR_OP, ORX_OP, MAX_OP, MIN_OP, RANGE_OP};
@@ -369,7 +365,10 @@ rtx pic_offset_table_rtx;
static void attr_hash_add_rtx PARAMS ((int, rtx));
static void attr_hash_add_string PARAMS ((int, char *));
static rtx attr_rtx PARAMS ((enum rtx_code, ...));
+static char *attr_printf PARAMS ((int, const char *, ...))
+ ATTRIBUTE_PRINTF_2;
static char *attr_string PARAMS ((const char *, int));
+static rtx check_attr_test PARAMS ((rtx, int, int));
static rtx check_attr_value PARAMS ((rtx, struct attr_desc *));
static rtx convert_set_attr_alternative PARAMS ((rtx, struct insn_def *));
static rtx convert_set_attr PARAMS ((rtx, struct insn_def *));
@@ -453,8 +452,10 @@ static void write_const_num_delay_slots PARAMS ((void));
static int n_comma_elts PARAMS ((const char *));
static char *next_comma_elt PARAMS ((const char **));
static struct attr_desc *find_attr PARAMS ((const char *, int));
+static void make_internal_attr PARAMS ((const char *, rtx, int));
static struct attr_value *find_most_used PARAMS ((struct attr_desc *));
static rtx find_single_value PARAMS ((struct attr_desc *));
+static rtx make_numeric_value PARAMS ((int));
static void extend_range PARAMS ((struct range *, int, int));
static rtx attr_eq PARAMS ((const char *, const char *));
static const char *attr_numeral PARAMS ((int));
@@ -741,7 +742,7 @@ attr_rtx VPARAMS ((enum rtx_code code, ...))
rtx attr_printf (len, format, [arg1, ..., argn]) */
-char *
+static char *
attr_printf VPARAMS ((register int len, const char *fmt, ...))
{
char str[256];
@@ -921,7 +922,7 @@ attr_copy_rtx (orig)
Return the new expression, if any. */
-rtx
+static rtx
check_attr_test (exp, is_const, lineno)
rtx exp;
int is_const;
@@ -5876,7 +5877,7 @@ find_attr (name, create)
/* Create internal attribute with the given default value. */
-void
+static void
make_internal_attr (name, value, special)
const char *name;
rtx value;
@@ -5943,7 +5944,7 @@ find_single_value (attr)
/* Return (attr_value "n") */
-rtx
+static rtx
make_numeric_value (n)
int n;
{
@@ -6093,7 +6094,6 @@ from the machine description file `md'. */\n\n");
/* Read the machine description. */
- initiate_automaton_gen (argc, argv);
while (1)
{
int lineno;
@@ -6122,46 +6122,6 @@ from the machine description file `md'. */\n\n");
gen_unit (desc, lineno);
break;
- case DEFINE_CPU_UNIT:
- gen_cpu_unit (desc);
- break;
-
- case DEFINE_QUERY_CPU_UNIT:
- gen_query_cpu_unit (desc);
- break;
-
- case DEFINE_BYPASS:
- gen_bypass (desc);
- break;
-
- case EXCLUSION_SET:
- gen_excl_set (desc);
- break;
-
- case PRESENCE_SET:
- gen_presence_set (desc);
- break;
-
- case ABSENCE_SET:
- gen_absence_set (desc);
- break;
-
- case DEFINE_AUTOMATON:
- gen_automaton (desc);
- break;
-
- case AUTOMATA_OPTION:
- gen_automata_option (desc);
- break;
-
- case DEFINE_RESERVATION:
- gen_reserv (desc);
- break;
-
- case DEFINE_INSN_RESERVATION:
- gen_insn_reserv (desc);
- break;
-
default:
break;
}
@@ -6186,14 +6146,9 @@ from the machine description file `md'. */\n\n");
if (num_delays)
expand_delays ();
- if (num_units || num_dfa_decls)
- {
- /* Expand DEFINE_FUNCTION_UNIT information into new attributes. */
- expand_units ();
- /* Build DFA, output some functions and expand DFA information
- into new attributes. */
- expand_automata ();
- }
+ /* Expand DEFINE_FUNCTION_UNIT information into new attributes. */
+ if (num_units)
+ expand_units ();
printf ("#include \"config.h\"\n");
printf ("#include \"system.h\"\n");
@@ -6268,14 +6223,9 @@ from the machine description file `md'. */\n\n");
write_eligible_delay ("annul_false");
}
- if (num_units || num_dfa_decls)
- {
- /* Write out information about function units. */
- write_function_unit_info ();
- /* Output code for pipeline hazards recognition based on DFA
- (deterministic finite state automata. */
- write_automata ();
- }
+ /* Write out information about function units. */
+ if (num_units)
+ write_function_unit_info ();
/* Write out constant delay slot info */
write_const_num_delay_slots ();