This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH], Add PowerPC ISA 3.0 vec_vinsert4b and vec_vextract4b built-in functions
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Michael Meissner <meissner at linux dot vnet dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Segher Boessenkool <segher at kernel dot crashing dot org>, David Edelsohn <dje dot gcc at gmail dot com>, Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- Date: Wed, 28 Dec 2016 09:23:40 +0100
- Subject: Re: [PATCH], Add PowerPC ISA 3.0 vec_vinsert4b and vec_vextract4b built-in functions
- Authentication-results: sourceware.org; auth=none
- References: <20161213181655.GA22420@ibm-tiger.the-meissners.org>
On Dez 13 2016, Michael Meissner <meissner@linux.vnet.ibm.com> wrote:
> @@ -15766,6 +15766,40 @@ altivec_expand_builtin (tree exp, rtx ta
> case VSX_BUILTIN_VEC_EXT_V1TI:
> return altivec_expand_vec_ext_builtin (exp, target);
>
> + case P9V_BUILTIN_VEXTRACT4B:
> + case P9V_BUILTIN_VEC_VEXTRACT4B:
> + arg1 = CALL_EXPR_ARG (exp, 1);
> + STRIP_NOPS (arg1);
> +
> + /* Generate a normal call if it is invalid. */
> + /* If we got invalid arguments bail out before generating bad rtl. */
> + if (arg1 == error_mark_node)
> + return expand_call (exp, target, false);
> +
> + if (TREE_CODE (arg1) != INTEGER_CST || TREE_INT_CST_LOW (arg1) > 11)
> + {
> + error ("second argument to vec_vextract4b must 0..11");
be
> + return expand_call (exp, target, false);
> + }
> + break;
> +
> + case P9V_BUILTIN_VINSERT4B:
> + case P9V_BUILTIN_VINSERT4B_DI:
> + case P9V_BUILTIN_VEC_VINSERT4B:
> + arg2 = CALL_EXPR_ARG (exp, 2);
> + STRIP_NOPS (arg2);
> +
> + /* If we got invalid arguments bail out before generating bad rtl. */
> + if (arg2 == error_mark_node)
> + return expand_call (exp, target, false);
> +
> + if (TREE_CODE (arg2) != INTEGER_CST || TREE_INT_CST_LOW (arg2) > 11)
> + {
> + error ("third argument to vec_vinsert4b must 0..11");
be
> + return expand_call (exp, target, false);
> + }
> + break;
> +
> default:
> break;
> /* Fall through. */
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."