From 99c25ac11ec95adec4139b7aa79a4741a52111be Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 1 May 2008 17:47:43 +0000 Subject: [PATCH] i386.c (ix86_builtin_type): Replace DI_FTYPE_DI_DI_INT with V1DI2DI_FTYPE_V1DI_V1DI_INT. 2008-05-01 H.J. Lu * config/i386/i386.c (ix86_builtin_type): Replace DI_FTYPE_DI_DI_INT with V1DI2DI_FTYPE_V1DI_V1DI_INT. (bdesc_args): Updated. (ix86_init_mmx_sse_builtins): Likewise. (ix86_expand_args_builtin): Likewise. * config/i386/tmmintrin.h (_mm_alignr_pi8): Replace long long with __v1di. * doc/extend.texi: Correct __builtin_ia32_palignr. From-SVN: r134864 --- gcc/ChangeLog | 13 +++++++++++++ gcc/config/i386/i386.c | 28 +++++++++++++--------------- gcc/config/i386/tmmintrin.h | 8 ++++---- gcc/doc/extend.texi | 2 +- 4 files changed, 31 insertions(+), 20 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6cd0adec5e4..0ffe99b9ebe 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2008-05-01 H.J. Lu + + * config/i386/i386.c (ix86_builtin_type): Replace + DI_FTYPE_DI_DI_INT with V1DI2DI_FTYPE_V1DI_V1DI_INT. + (bdesc_args): Updated. + (ix86_init_mmx_sse_builtins): Likewise. + (ix86_expand_args_builtin): Likewise. + + * config/i386/tmmintrin.h (_mm_alignr_pi8): Replace long long + with __v1di. + + * doc/extend.texi: Correct __builtin_ia32_palignr. + 2008-05-01 H.J. Lu PR target/36095 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index e50fb08ae3c..80a0fd75f5f 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -18092,10 +18092,10 @@ enum ix86_builtin_type V4SF_FTYPE_V4SF_V4SF_INT, V2DI_FTYPE_V2DI_V2DI_INT, V2DI2TI_FTYPE_V2DI_V2DI_INT, + V1DI2DI_FTYPE_V1DI_V1DI_INT, V2DF_FTYPE_V2DF_V2DF_INT, V2DI_FTYPE_V2DI_UINT_UINT, - V2DI_FTYPE_V2DI_V2DI_UINT_UINT, - DI_FTYPE_DI_DI_INT + V2DI_FTYPE_V2DI_V2DI_UINT_UINT }; /* Builtins with variable number of arguments. */ @@ -18492,7 +18492,7 @@ static const struct builtin_description bdesc_args[] = /* SSSE3. */ { OPTION_MASK_ISA_SSSE3, CODE_FOR_ssse3_palignrti, "__builtin_ia32_palignr128", IX86_BUILTIN_PALIGNR128, UNKNOWN, (int) V2DI2TI_FTYPE_V2DI_V2DI_INT }, - { OPTION_MASK_ISA_SSSE3, CODE_FOR_ssse3_palignrdi, "__builtin_ia32_palignr", IX86_BUILTIN_PALIGNR, UNKNOWN, (int) DI_FTYPE_DI_DI_INT }, + { OPTION_MASK_ISA_SSSE3, CODE_FOR_ssse3_palignrdi, "__builtin_ia32_palignr", IX86_BUILTIN_PALIGNR, UNKNOWN, (int) V1DI2DI_FTYPE_V1DI_V1DI_INT }, /* SSE4.1 */ { OPTION_MASK_ISA_SSE4_1, CODE_FOR_sse4_1_blendpd, "__builtin_ia32_blendpd", IX86_BUILTIN_BLENDPD, UNKNOWN, (int) V2DF_FTYPE_V2DF_V2DF_INT }, @@ -19011,13 +19011,10 @@ ix86_init_mmx_sse_builtins (void) tree v1di_ftype_v1di_v1di = build_function_type_list (V1DI_type_node, V1DI_type_node, V1DI_type_node, NULL_TREE); - - tree di_ftype_di_di_int - = build_function_type_list (long_long_unsigned_type_node, - long_long_unsigned_type_node, - long_long_unsigned_type_node, + tree v1di_ftype_v1di_v1di_int + = build_function_type_list (V1DI_type_node, + V1DI_type_node, V1DI_type_node, integer_type_node, NULL_TREE); - tree v2si_ftype_v2sf = build_function_type_list (V2SI_type_node, V2SF_type_node, NULL_TREE); tree v2sf_ftype_v2si @@ -19710,8 +19707,8 @@ ix86_init_mmx_sse_builtins (void) case V2DI_FTYPE_V2DI_V2DI_UINT_UINT: type = v2di_ftype_v2di_v2di_unsigned_unsigned; break; - case DI_FTYPE_DI_DI_INT: - type = di_ftype_di_di_int; + case V1DI2DI_FTYPE_V1DI_V1DI_INT: + type = v1di_ftype_v1di_v1di_int; break; default: gcc_unreachable (); @@ -20555,6 +20552,11 @@ ix86_expand_args_builtin (const struct builtin_description *d, rmode = V2DImode; nargs_constant = 1; break; + case V1DI2DI_FTYPE_V1DI_V1DI_INT: + nargs = 3; + rmode = DImode; + nargs_constant = 1; + break; case V2DI_FTYPE_V2DI_UINT_UINT: nargs = 3; nargs_constant = 2; @@ -20563,10 +20565,6 @@ ix86_expand_args_builtin (const struct builtin_description *d, nargs = 4; nargs_constant = 2; break; - case DI_FTYPE_DI_DI_INT: - nargs = 3; - nargs_constant = 1; - break; default: gcc_unreachable (); } diff --git a/gcc/config/i386/tmmintrin.h b/gcc/config/i386/tmmintrin.h index 827d8b95b76..52d1e46424e 100644 --- a/gcc/config/i386/tmmintrin.h +++ b/gcc/config/i386/tmmintrin.h @@ -192,8 +192,8 @@ _mm_alignr_epi8(__m128i __X, __m128i __Y, const int __N) extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_alignr_pi8(__m64 __X, __m64 __Y, const int __N) { - return (__m64) __builtin_ia32_palignr ((long long)__X, - (long long)__Y, __N * 8); + return (__m64) __builtin_ia32_palignr ((__v1di)__X, + (__v1di)__Y, __N * 8); } #else #define _mm_alignr_epi8(X, Y, N) \ @@ -201,8 +201,8 @@ _mm_alignr_pi8(__m64 __X, __m64 __Y, const int __N) (__v2di)(__m128i)(Y), \ (int)(N) * 8)) #define _mm_alignr_pi8(X, Y, N) \ - ((__m64) __builtin_ia32_palignr ((long long)(__m64)(X), \ - (long long)(__m64)(Y), \ + ((__m64) __builtin_ia32_palignr ((__v1di)(__m64)(X), \ + (__v1di)(__m64)(Y), \ (int)(N) * 8)) #endif diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 1d25795d086..7c5ad9bc4f7 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -7858,7 +7858,7 @@ v8qi __builtin_ia32_pshufb (v8qi, v8qi) v8qi __builtin_ia32_psignb (v8qi, v8qi) v2si __builtin_ia32_psignd (v2si, v2si) v4hi __builtin_ia32_psignw (v4hi, v4hi) -long long __builtin_ia32_palignr (long long, long long, int) +v1di __builtin_ia32_palignr (v1di, v1di, int) v8qi __builtin_ia32_pabsb (v8qi) v2si __builtin_ia32_pabsd (v2si) v4hi __builtin_ia32_pabsw (v4hi) -- 2.30.2