This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Ping] [PATCH, 9/10] aarch64: generate conditional compare instructions
- From: Richard Henderson <rth at redhat dot com>
- To: Zhenqiang Chen <zhenqiang dot chen at arm dot com>, gcc-patches at gcc dot gnu dot org
- Date: Sat, 11 Oct 2014 13:45:31 -0700
- Subject: Re: [Ping] [PATCH, 9/10] aarch64: generate conditional compare instructions
- Authentication-results: sourceware.org; auth=none
- References: <001d01cfd6fa$1a668c50$4f33a4f0$ at arm dot com>
On 09/22/2014 11:46 PM, Zhenqiang Chen wrote:
> +static bool
> +aarch64_convert_mode (rtx* op0, rtx* op1, int unsignedp)
> +{
> + enum machine_mode mode;
> +
> + mode = GET_MODE (*op0);
> + if (mode == VOIDmode)
> + mode = GET_MODE (*op1);
> +
> + if (mode == QImode || mode == HImode)
> + {
> + *op0 = convert_modes (SImode, mode, *op0, unsignedp);
> + *op1 = convert_modes (SImode, mode, *op1, unsignedp);
> + }
> + else if (mode != SImode && mode != DImode)
> + return false;
> +
> + return true;
> +}
Hum. I'd rather not replicate too much of the expander logic here.
We could avoid that by using struct expand_operand, create_input_operand et al,
then expand_insn. That does require that the target hooks be given trees
rather than rtl as input.
r~