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: [Ping] [PATCH, 9/10] aarch64: generate conditional compare instructions


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~


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