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] Abort in output_vec_const_move


Hi Hartmut.

Before I take a closer look at this... Since we are duplicating the
code below in easy_vector_constant, can you come up with a generic way
(be it macros or a separate function) to avoid duplicating all this
code.  (Preferably a separate function).

> -  return TARGET_ALTIVEC && EASY_VECTOR_15_ADD_SELF (cst, op, mode);
> +  if (TARGET_ALTIVEC)
> +    switch (mode)
> +      {
> +      case V4SImode:
> +     if (EASY_VECTOR_15_ADD_SELF (cst, op, mode))
> +       return 1;
> +     if ((cst & 0xffff) != ((cst >> 16) & 0xffff))
> +       break;
> +     cst = cst >> 16;
> +      case V8HImode:
> +     if (EASY_VECTOR_15_ADD_SELF (cst, op, mode))
> +       return 1;
> +     if ((cst & 0xff) != ((cst >> 8) & 0xff))
> +       break;
> +     cst = cst >> 8;
> +      case V16QImode:
> +     if (EASY_VECTOR_15_ADD_SELF (cst, op, mode))
> +       return 1;
> +      default:
> +     break;
> +      }
> +  return 0;
>  }

Thanks.
Aldy


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