This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, rs6000] Clean up implementation of built-in functions
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Kelvin Nilsen <kdnilsen at linux dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 5 Jun 2018 13:52:41 -0500
- Subject: Re: [PATCH, rs6000] Clean up implementation of built-in functions
- References: <32d28e0f-894d-b6cc-9d02-b8ca45578196@linux.ibm.com>
Hi Kelvin,
On Fri, Jun 01, 2018 at 01:22:09PM -0500, Kelvin Nilsen wrote:
> 2018-06-01 Kelvin Nilsen <kelvin@gcc.gnu.org>
>
> * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
> VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
> * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
> several redundant entries.
> --- gcc/config/rs6000/rs6000-builtin.def (revision 261067)
> +++ gcc/config/rs6000/rs6000-builtin.def (working copy)
> @@ -1811,6 +1811,15 @@ BU_VSX_OVERLOAD_1 (VUNSIGNEDE, "vunsignede")
> BU_VSX_OVERLOAD_1 (VUNSIGNEDO, "vunsignedo")
>
> /* VSX builtins that are handled as special cases. */
> +
> +
> +/* NON-TRADITIONAL BEHAVIOR HERE: Besides introducing the
> + __builtin_vec_ld and __builtin_vec_st built-in functions,
> + the VSX_BUILTIN_VEC_LD and VSX_BUILTIN_VEC_ST symbolic constants
> + introduced below are also affiliated with the __builtin_vec_vsx_ld
> + and __builtin_vec_vsx_st functions respectively. This unnatural
> + binding is formed with explicit calls to the def_builtin function
> + found in rs6000.c. */
> BU_VSX_OVERLOAD_X (LD, "ld")
> BU_VSX_OVERLOAD_X (ST, "st")
> BU_VSX_OVERLOAD_X (XL, "xl")
It's not clear to me how this is different from all the other def_builtin
calls, say, __builtin_vec_adde or __builtin_vec_splats.
Either way, the patch is fine, okay for trunk. Thanks.
Segher