summaryrefslogtreecommitdiff
path: root/gcc/genpeep.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2015-05-19 07:09:42 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2015-05-19 07:09:42 +0000
commit9fccb3359422e2c649e55e20713b9a8fa2c1d0be (patch)
tree96439177c2e9d6b824d800f99d19534a317db681 /gcc/genpeep.c
parente1a2b02198c93716fd4695d6ed61c20cfc933d1d (diff)
downloadgcc-9fccb3359422e2c649e55e20713b9a8fa2c1d0be.tar.gz
rtl.def (REG): Change format to "r".
gcc/ * rtl.def (REG): Change format to "r". * rtl.h (rtunion): Remove rt_reg. (reg_info): New structure. (rtx_def): Add reg field to main union. (X0REGATTR): Delete. (REG_CHECK): New macro. (SET_REGNO_RAW, rhs_regno, REG_ATTRS): Use it. * rtl.c (rtx_format): Document "r". (rtx_code_size): Handle REG specially. * gengenrtl.c (special_format): Return true for formats that include 'r'. * gengtype.c (adjust_field_rtx_def): Handle 'r' fields. Deal with REG_ATTRS after the field loop. * emit-rtl.c (gen_raw_REG): Call rtx_alloc_stat directly. * expmed.c (init_expmed): Call gen_raw_REG instead of gen_rtx_raw_REG. * expr.c (init_expr_target): Likewise. * regcprop.c (maybe_mode_change): Likewise. * varasm.c (make_decl_rtl): Likewise. * final.c (leaf_renumber_regs_insn): Return early after handling REGs. * genemit.c (gen_exp): Handle 'r' fields. * genpeep.c (match_rtx): Likewise. * gensupport.c (subst_pattern_match): Likewise. (get_alternatives_number, collect_insn_data, alter_predicate_for_insn) (alter_constraints, subst_dup): Likewise. * read-rtl.c (read_rtx_code): Likewise. * print-rtl.c (print_rtx): Likewise. * genrecog.c (find_operand, find_matching_operand): Likewise. (validate_pattern, match_pattern_2): Likewise. (parameter::UINT, rtx_test::REGNO_FIELD): New enum values. (rtx_test::regno_field): New function. (operator ==, safe_to_hoist_p, transition_parameter_type) (parameter_type_string, print_parameter_value) (print_nonbool_test, print_test): Handle new enum values. * cselib.c (rtx_equal_for_cselib_1): Handle REG specially. * lra-constraints.c (operands_match_p): Likewise. From-SVN: r223339
Diffstat (limited to 'gcc/genpeep.c')
-rw-r--r--gcc/genpeep.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/genpeep.c b/gcc/genpeep.c
index 2eb3ebc1b61..3ba930c8a05 100644
--- a/gcc/genpeep.c
+++ b/gcc/genpeep.c
@@ -276,6 +276,12 @@ match_rtx (rtx x, struct link *path, int fail_label)
printf (" if (XINT (x, %d) != %d) goto L%d;\n",
i, XINT (x, i), fail_label);
}
+ else if (fmt[i] == 'r')
+ {
+ gcc_assert (i == 0);
+ printf (" if (REGNO (x) != %d) goto L%d;\n",
+ REGNO (x), fail_label);
+ }
else if (fmt[i] == 'w')
{
/* Make sure that at run time `x' is the RTX we want to test. */