From 8677664e02258772068ad1fe4672943c998bace8 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Wed, 11 Jun 2014 16:59:17 +0000 Subject: common.md: New file. gcc/ * common.md: New file. * doc/md.texi: Update description of generic, machine-independent constraints. * config/s390/constraints.md (e): Delete. * Makefile.in (md_file): Include common.md. * config/m32c/t-m32c (md_file): Likewise. * genpreds.c (general_mem): New array. (generic_constraint_letters): Remove constraints now defined by common.md. (add_constraint): Map TARGET_MEM_CONSTRAINT to general_mem. Allow the first character to be '<' or '>' as well. * genoutput.c (general_mem): New array. (indep_constraints): Remove constraints now defined by common.md. (note_constraint): Map TARGET_MEM_CONSTRAINT to general_mem. Remove special handling of 'm'. * ira-costs.c (record_reg_classes): Remove special handling of constraints now defined by common.md. * ira.c (ira_setup_alts, ira_get_dup_out_num): Likewise. * ira-lives.c (single_reg_class): Likewise. (ira_implicitly_set_insn_hard_regs): Likewise. * lra-constraints.c (reg_class_from_constraints): Likewise. (process_alt_operands, process_address, curr_insn_transform): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * reload.c (push_secondary_reload, scratch_reload_class) (find_reloads, alternative_allows_const_pool_ref): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. * targhooks.c (default_secondary_reload): Likewise. * stmt.c (parse_output_constraint): Likewise. * recog.c (preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. (asm_operand_ok): Likewise, but add a comment saying why 'o' must be handled specially. From-SVN: r211475 --- gcc/genoutput.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'gcc/genoutput.c') diff --git a/gcc/genoutput.c b/gcc/genoutput.c index cdd722d..7489d38 100644 --- a/gcc/genoutput.c +++ b/gcc/genoutput.c @@ -98,6 +98,8 @@ along with GCC; see the file COPYING3. If not see #define MAX_MAX_OPERANDS 40 +static char general_mem[] = { TARGET_MEM_CONSTRAINT, 0 }; + static int n_occurrences (int, const char *); static const char *strip_whitespace (const char *); @@ -205,10 +207,9 @@ struct constraint_data const char name[1]; }; -/* This is a complete list (unlike the one in genpreds.c) of constraint - letters and modifiers with machine-independent meaning. The only - omission is digits, as these are handled specially. */ -static const char indep_constraints[] = ",=+%*?!#&<>EFVXgimnoprs"; +/* All machine-independent constraint characters (except digits) that + are handled outside the define*_constraint mechanism. */ +static const char indep_constraints[] = ",=+%*?!#&g"; static struct constraint_data * constraints_by_letter_table[1 << CHAR_BIT]; @@ -1151,13 +1152,13 @@ static void note_constraint (rtx exp, int lineno) { const char *name = XSTR (exp, 0); - unsigned int namelen = strlen (name); struct constraint_data **iter, **slot, *new_cdata; - /* The 'm' constraint is special here since that constraint letter - can be overridden by the back end by defining the - TARGET_MEM_CONSTRAINT macro. */ - if (strchr (indep_constraints, name[0]) && name[0] != 'm') + if (strcmp (name, "TARGET_MEM_CONSTRAINT") == 0) + name = general_mem; + unsigned int namelen = strlen (name); + + if (strchr (indep_constraints, name[0])) { if (name[1] == '\0') error_with_line (lineno, "constraint letter '%s' cannot be " -- cgit v1.1