This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2 2/7] Generation support for CLOBBER_HIGH


On 07/26/2018 03:13 AM, Alan Hayward wrote:
> Ensure clobber high is a register expression.
> Info is passed through for the error case.
> 
> 2018-07-25  Alan Hayward  <alan.hayward@arm.com>
> 
> 	* emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
> 	(copy_insn_1): Likewise.
> 	(gen_hard_reg_clobber_high): New gen function.
> 	* genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
> 	* genemit.c (gen_exp): Likewise.
> 	(gen_emit_seq): Pass through info.
> 	(gen_insn): Check for CLOBBER_HIGH.
> 	(gen_expand): Pass through info.
> 	(gen_split): Likewise.
> 	(output_add_clobbers): Likewise.
> 	* genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
> 	(remove_clobbers): Likewise.
> 	* rtl.h (gen_hard_reg_clobber_high): New declaration.
> ---
>  gcc/emit-rtl.c  | 16 ++++++++++++++++
>  gcc/genconfig.c |  1 +
>  gcc/genemit.c   | 51 +++++++++++++++++++++++++++++++--------------------
>  gcc/genrecog.c  |  3 ++-
>  gcc/rtl.h       |  1 +
>  5 files changed, 51 insertions(+), 21 deletions(-)
> 
> diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
> index e4b070486e8..6a32bcbdaf6 100644
> --- a/gcc/emit-rtl.c
> +++ b/gcc/emit-rtl.c
> @@ -6508,6 +6511,19 @@ gen_hard_reg_clobber (machine_mode mode, unsigned int regno)
>  	    gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (mode, regno)));
>  }
>  
> +static GTY((deletable)) rtx
> +hard_reg_clobbers_high[NUM_MACHINE_MODES][FIRST_PSEUDO_REGISTER];
> +
> +rtx
> +gen_hard_reg_clobber_high (machine_mode mode, unsigned int regno)
> +{
> +  if (hard_reg_clobbers_high[mode][regno])
> +    return hard_reg_clobbers_high[mode][regno];
> +  else
> +    return (hard_reg_clobbers_high[mode][regno]
> +	    = gen_rtx_CLOBBER_HIGH (VOIDmode, gen_rtx_REG (mode, regno)));
> +}
You need a function comment on gen_hard_reg_clobber_high.

OK with that change.

jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]