From 777e635f1a6cab5d2c6837b1ea903ed0bcbe87d3 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Wed, 11 Jun 2014 16:58:35 +0000 Subject: system.h (REG_CLASS_FROM_CONSTRAINT): Poison. gcc/ * system.h (REG_CLASS_FROM_CONSTRAINT): Poison. (REG_CLASS_FOR_CONSTRAINT, EXTRA_CONSTRAINT_STR): Likewise. (EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT): Likewise. * genpreds.c (print_type_tree): New function. (write_tm_preds_h): Remove REG_CLASS_FROM_CONSTRAINT, REG_CLASS_FOR_CONSTRAINT, EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT and EXTRA_CONSTRAINT_STR. Write out enum constraint_type and get_constraint_type. * lra-constraints.c (satisfies_memory_constraint_p): Take a constraint_num rather than a constraint string. (satisfies_address_constraint_p): Likewise. (reg_class_from_constraints): Avoid old constraint macros. (process_alt_operands, process_address_1): Likewise. (curr_insn_transform): Likewise. * ira-costs.c (record_reg_classes): Likewise. (record_operand_costs): Likewise. * ira-lives.c (single_reg_class): Likewise. (ira_implicitly_set_insn_hard_regs): Likewise. * ira.c (ira_setup_alts, ira_get_dup_out_num): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * recog.c (asm_operand_ok, preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. * reload.c (push_secondary_reload, scratch_reload_class): Likewise. (find_reloads, alternative_allows_const_pool_ref): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. * targhooks.c (default_secondary_reload): Likewise. * config/m32c/m32c.c (m32c_matches_constraint_p): Avoid reference to EXTRA_CONSTRAINT_STR. * config/sparc/constraints.md (U): Likewise REG_CLASS_FROM_CONSTRAINT. From-SVN: r211471 --- gcc/stmt.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'gcc/stmt.c') diff --git a/gcc/stmt.c b/gcc/stmt.c index 7c1ea5d..1cbf7e9 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -322,12 +322,11 @@ parse_output_constraint (const char **constraint_p, int operand_num, default: if (!ISALPHA (*p)) break; - if (REG_CLASS_FROM_CONSTRAINT (*p, p) != NO_REGS) + enum constraint_num cn = lookup_constraint (p); + if (reg_class_for_constraint (cn) != NO_REGS + || insn_extra_address_constraint (cn)) *allows_reg = true; -#ifdef EXTRA_CONSTRAINT_STR - else if (EXTRA_ADDRESS_CONSTRAINT (*p, p)) - *allows_reg = true; - else if (EXTRA_MEMORY_CONSTRAINT (*p, p)) + else if (insn_extra_memory_constraint (cn)) *allows_mem = true; else { @@ -337,7 +336,6 @@ parse_output_constraint (const char **constraint_p, int operand_num, *allows_reg = true; *allows_mem = true; } -#endif break; } @@ -454,13 +452,11 @@ parse_input_constraint (const char **constraint_p, int input_num, error ("invalid punctuation %qc in constraint", constraint[j]); return false; } - if (REG_CLASS_FROM_CONSTRAINT (constraint[j], constraint + j) - != NO_REGS) + enum constraint_num cn = lookup_constraint (constraint + j); + if (reg_class_for_constraint (cn) != NO_REGS + || insn_extra_address_constraint (cn)) *allows_reg = true; -#ifdef EXTRA_CONSTRAINT_STR - else if (EXTRA_ADDRESS_CONSTRAINT (constraint[j], constraint + j)) - *allows_reg = true; - else if (EXTRA_MEMORY_CONSTRAINT (constraint[j], constraint + j)) + else if (insn_extra_memory_constraint (cn)) *allows_mem = true; else { @@ -470,7 +466,6 @@ parse_input_constraint (const char **constraint_p, int input_num, *allows_reg = true; *allows_mem = true; } -#endif break; } -- cgit v1.1