diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2015-05-19 07:09:42 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2015-05-19 07:09:42 +0000 |
commit | 9fccb3359422e2c649e55e20713b9a8fa2c1d0be (patch) | |
tree | 96439177c2e9d6b824d800f99d19534a317db681 /gcc/print-rtl.c | |
parent | e1a2b02198c93716fd4695d6ed61c20cfc933d1d (diff) | |
download | gcc-9fccb3359422e2c649e55e20713b9a8fa2c1d0be.zip gcc-9fccb3359422e2c649e55e20713b9a8fa2c1d0be.tar.gz gcc-9fccb3359422e2c649e55e20713b9a8fa2c1d0be.tar.bz2 |
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/print-rtl.c')
-rw-r--r-- | gcc/print-rtl.c | 99 |
1 files changed, 54 insertions, 45 deletions
diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c index 05da6f7..882f808 100644 --- a/gcc/print-rtl.c +++ b/gcc/print-rtl.c @@ -462,55 +462,12 @@ print_rtx (const_rtx in_rtx) int value = XINT (in_rtx, i); const char *name; -#ifndef GENERATOR_FILE - if (REG_P (in_rtx) && (unsigned) value < FIRST_PSEUDO_REGISTER) - fprintf (outfile, " %d %s", value, reg_names[value]); - else if (REG_P (in_rtx) - && (unsigned) value <= LAST_VIRTUAL_REGISTER) - { - if (value == VIRTUAL_INCOMING_ARGS_REGNUM) - fprintf (outfile, " %d virtual-incoming-args", value); - else if (value == VIRTUAL_STACK_VARS_REGNUM) - fprintf (outfile, " %d virtual-stack-vars", value); - else if (value == VIRTUAL_STACK_DYNAMIC_REGNUM) - fprintf (outfile, " %d virtual-stack-dynamic", value); - else if (value == VIRTUAL_OUTGOING_ARGS_REGNUM) - fprintf (outfile, " %d virtual-outgoing-args", value); - else if (value == VIRTUAL_CFA_REGNUM) - fprintf (outfile, " %d virtual-cfa", value); - else if (value == VIRTUAL_PREFERRED_STACK_BOUNDARY_REGNUM) - fprintf (outfile, " %d virtual-preferred-stack-boundary", - value); - else - fprintf (outfile, " %d virtual-reg-%d", value, - value-FIRST_VIRTUAL_REGISTER); - } - else -#endif - if (flag_dump_unnumbered - && (is_insn || NOTE_P (in_rtx))) + if (flag_dump_unnumbered + && (is_insn || NOTE_P (in_rtx))) fputc ('#', outfile); else fprintf (outfile, " %d", value); -#ifndef GENERATOR_FILE - if (REG_P (in_rtx) && REG_ATTRS (in_rtx)) - { - fputs (" [", outfile); - if (ORIGINAL_REGNO (in_rtx) != REGNO (in_rtx)) - fprintf (outfile, "orig:%i", ORIGINAL_REGNO (in_rtx)); - if (REG_EXPR (in_rtx)) - print_mem_expr (outfile, REG_EXPR (in_rtx)); - - if (REG_OFFSET (in_rtx)) - fprintf (outfile, "+" HOST_WIDE_INT_PRINT_DEC, - REG_OFFSET (in_rtx)); - fputs (" ]", outfile); - } - if (REG_P (in_rtx) && REGNO (in_rtx) != ORIGINAL_REGNO (in_rtx)) - fprintf (outfile, " [%d]", ORIGINAL_REGNO (in_rtx)); -#endif - if (is_insn && &INSN_CODE (in_rtx) == &XINT (in_rtx, i) && XINT (in_rtx, i) >= 0 && (name = get_insn_name (XINT (in_rtx, i))) != NULL) @@ -519,6 +476,58 @@ print_rtx (const_rtx in_rtx) } break; + case 'r': + { + unsigned int regno = REGNO (in_rtx); +#ifndef GENERATOR_FILE + if (regno < FIRST_PSEUDO_REGISTER) + fprintf (outfile, " %d %s", regno, reg_names[regno]); + else if (regno <= LAST_VIRTUAL_REGISTER) + { + if (regno == VIRTUAL_INCOMING_ARGS_REGNUM) + fprintf (outfile, " %d virtual-incoming-args", regno); + else if (regno == VIRTUAL_STACK_VARS_REGNUM) + fprintf (outfile, " %d virtual-stack-vars", regno); + else if (regno == VIRTUAL_STACK_DYNAMIC_REGNUM) + fprintf (outfile, " %d virtual-stack-dynamic", regno); + else if (regno == VIRTUAL_OUTGOING_ARGS_REGNUM) + fprintf (outfile, " %d virtual-outgoing-args", regno); + else if (regno == VIRTUAL_CFA_REGNUM) + fprintf (outfile, " %d virtual-cfa", regno); + else if (regno == VIRTUAL_PREFERRED_STACK_BOUNDARY_REGNUM) + fprintf (outfile, " %d virtual-preferred-stack-boundary", + regno); + else + fprintf (outfile, " %d virtual-reg-%d", regno, + regno-FIRST_VIRTUAL_REGISTER); + } + else +#endif + if (flag_dump_unnumbered && is_insn) + fputc ('#', outfile); + else + fprintf (outfile, " %d", regno); + +#ifndef GENERATOR_FILE + if (REG_ATTRS (in_rtx)) + { + fputs (" [", outfile); + if (regno != ORIGINAL_REGNO (in_rtx)) + fprintf (outfile, "orig:%i", ORIGINAL_REGNO (in_rtx)); + if (REG_EXPR (in_rtx)) + print_mem_expr (outfile, REG_EXPR (in_rtx)); + + if (REG_OFFSET (in_rtx)) + fprintf (outfile, "+" HOST_WIDE_INT_PRINT_DEC, + REG_OFFSET (in_rtx)); + fputs (" ]", outfile); + } + if (regno != ORIGINAL_REGNO (in_rtx)) + fprintf (outfile, " [%d]", ORIGINAL_REGNO (in_rtx)); +#endif + break; + } + /* Print NOTE_INSN names rather than integer codes. */ case 'n': |