diff options
Diffstat (limited to 'gcc/genoutput.c')
-rw-r--r-- | gcc/genoutput.c | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/gcc/genoutput.c b/gcc/genoutput.c index b3ce120f33a..cdd722d43aa 100644 --- a/gcc/genoutput.c +++ b/gcc/genoutput.c @@ -197,8 +197,6 @@ static void gen_peephole (rtx, int); static void gen_expand (rtx, int); static void gen_split (rtx, int); -#ifdef USE_MD_CONSTRAINTS - struct constraint_data { struct constraint_data *next_this_letter; @@ -217,14 +215,6 @@ constraints_by_letter_table[1 << CHAR_BIT]; static int mdep_constraint_len (const char *, int, int); static void note_constraint (rtx, int); - -#else /* !USE_MD_CONSTRAINTS */ - -static void check_constraint_len (void); -static int constraint_len (const char *, int); - -#endif /* !USE_MD_CONSTRAINTS */ - static void output_prologue (void) @@ -786,7 +776,6 @@ validate_insn_alternatives (struct data *d) error_with_line (d->lineno, "character '%c' can only be used at the" " beginning of a constraint string", c); -#ifdef USE_MD_CONSTRAINTS if (ISSPACE (c) || strchr (indep_constraints, c)) len = 1; else if (ISDIGIT (c)) @@ -799,18 +788,6 @@ validate_insn_alternatives (struct data *d) } else len = mdep_constraint_len (p, d->lineno, start); -#else - len = CONSTRAINT_LEN (c, p); - - if (len < 1 || (len > 1 && strchr (",#*+=&%!0123456789", c))) - { - error_with_line (d->lineno, - "invalid length %d for char '%c' in" - " alternative %d of operand %d", - len, c, which_alternative, start); - len = 1; - } -#endif if (c == ',') { @@ -914,9 +891,6 @@ gen_insn (rtx insn, int lineno) d->n_operands = stats.num_insn_operands; d->n_dups = stats.num_dups; -#ifndef USE_MD_CONSTRAINTS - check_constraint_len (); -#endif validate_insn_operands (d); validate_insn_alternatives (d); validate_optab_operands (d); @@ -1106,14 +1080,12 @@ main (int argc, char **argv) gen_split (desc, line_no); break; -#ifdef USE_MD_CONSTRAINTS case DEFINE_CONSTRAINT: case DEFINE_REGISTER_CONSTRAINT: case DEFINE_ADDRESS_CONSTRAINT: case DEFINE_MEMORY_CONSTRAINT: note_constraint (desc, line_no); break; -#endif default: break; @@ -1169,8 +1141,6 @@ strip_whitespace (const char *s) return q; } -#ifdef USE_MD_CONSTRAINTS - /* Record just enough information about a constraint to allow checking of operand constraint strings above, in validate_insn_alternatives. Does not validate most properties of the constraint itself; does @@ -1261,39 +1231,3 @@ mdep_constraint_len (const char *s, int lineno, int opno) message_with_line (lineno, "note: in operand %d", opno); return 1; /* safe */ } - -#else -/* Verify that DEFAULT_CONSTRAINT_LEN is used properly and not - tampered with. This isn't bullet-proof, but it should catch - most genuine mistakes. */ -static void -check_constraint_len (void) -{ - const char *p; - int d; - - for (p = ",#*+=&%!1234567890"; *p; p++) - for (d = -9; d < 9; d++) - gcc_assert (constraint_len (p, d) == d); -} - -static int -constraint_len (const char *p, int genoutput_default_constraint_len) -{ - /* Check that we still match defaults.h . First we do a generation-time - check that fails if the value is not the expected one... */ - gcc_assert (DEFAULT_CONSTRAINT_LEN (*p, p) == 1); - /* And now a compile-time check that should give a diagnostic if the - definition doesn't exactly match. */ -#define DEFAULT_CONSTRAINT_LEN(C,STR) 1 - /* Now re-define DEFAULT_CONSTRAINT_LEN so that we can verify it is - being used. */ -#undef DEFAULT_CONSTRAINT_LEN -#define DEFAULT_CONSTRAINT_LEN(C,STR) \ - ((C) != *p || STR != p ? -1 : genoutput_default_constraint_len) - return CONSTRAINT_LEN (*p, p); - /* And set it back. */ -#undef DEFAULT_CONSTRAINT_LEN -#define DEFAULT_CONSTRAINT_LEN(C,STR) 1 -} -#endif |