2009-12-04  Jakub Jelinek  <jakub@redhat.com>

	* config/i386/i386.c (bdesc_special_args): Move __builtin_clzs from
	this array ...
	(bdesc_args): ... here.
	* config.gcc (i[34567]86-*-*): Include abmintrin.h.
	(x86_64-*-*): Likewise.

	* gcc.target/i386/sse-12.c: Add -mabm to dg-options, mention
	abmintrin.h is also tested.
	* gcc.target/i386/sse-13.c: Likewise.

From-SVN: r155059
This commit is contained in:
Jakub Jelinek 2009-12-07 23:23:01 +01:00 committed by Sebastian Pop
parent 3bccee0302
commit 7fccdfcfb9
6 changed files with 31 additions and 13 deletions

View File

@ -1,3 +1,11 @@
2009-12-07 Jakub Jelinek <jakub@redhat.com>
* config/i386/i386.c (bdesc_special_args): Move __builtin_clzs from
this array ...
(bdesc_args): ... here.
* config.gcc (i[34567]86-*-*): Include abmintrin.h.
(x86_64-*-*): Likewise.
2009-12-07 Sebastian Pop <sebastian.pop@amd.com>
* config.gcc (i[34567]86-*-*, x86_64-*-*): Add popcntintrin.h.

View File

@ -288,7 +288,8 @@ i[34567]86-*-*)
pmmintrin.h tmmintrin.h ammintrin.h smmintrin.h
nmmintrin.h bmmintrin.h fma4intrin.h wmmintrin.h
immintrin.h x86intrin.h avxintrin.h xopintrin.h
ia32intrin.h cross-stdarg.h lwpintrin.h popcntintrin.h"
ia32intrin.h cross-stdarg.h lwpintrin.h popcntintrin.h
abmintrin.h"
;;
x86_64-*-*)
cpu_type=i386
@ -298,7 +299,8 @@ x86_64-*-*)
pmmintrin.h tmmintrin.h ammintrin.h smmintrin.h
nmmintrin.h bmmintrin.h fma4intrin.h wmmintrin.h
immintrin.h x86intrin.h avxintrin.h xopintrin.h
ia32intrin.h cross-stdarg.h lwpintrin.h popcntintrin.h"
ia32intrin.h cross-stdarg.h lwpintrin.h popcntintrin.h
abmintrin.h"
need_64bit_hwint=yes
;;
ia64-*-*)

View File

@ -21547,8 +21547,6 @@ static const struct builtin_description bdesc_special_args[] =
{ OPTION_MASK_ISA_LWP, CODE_FOR_lwp_lwpinssi3, "__builtin_ia32_lwpins32", IX86_BUILTIN_LWPINS64, UNKNOWN, (int) UCHAR_FTYPE_UINT_UINT_UINT },
{ OPTION_MASK_ISA_LWP, CODE_FOR_lwp_lwpinsdi3, "__builtin_ia32_lwpins64", IX86_BUILTIN_LWPINS64, UNKNOWN, (int) UCHAR_FTYPE_UINT64_UINT_UINT },
{ OPTION_MASK_ISA_ABM, CODE_FOR_clzhi2_abm, "__builtin_clzs", IX86_BUILTIN_CLZS, UNKNOWN, (int) UINT16_FTYPE_UINT16 },
};
/* Builtins with variable number of arguments. */
@ -22173,6 +22171,8 @@ static const struct builtin_description bdesc_args[] =
{ OPTION_MASK_ISA_AVX, CODE_FOR_avx_movmskpd256, "__builtin_ia32_movmskpd256", IX86_BUILTIN_MOVMSKPD256, UNKNOWN, (int) INT_FTYPE_V4DF },
{ OPTION_MASK_ISA_AVX, CODE_FOR_avx_movmskps256, "__builtin_ia32_movmskps256", IX86_BUILTIN_MOVMSKPS256, UNKNOWN, (int) INT_FTYPE_V8SF },
{ OPTION_MASK_ISA_ABM, CODE_FOR_clzhi2_abm, "__builtin_clzs", IX86_BUILTIN_CLZS, UNKNOWN, (int) UINT16_FTYPE_UINT16 },
};
/* FMA4 and XOP. */

View File

@ -1,3 +1,9 @@
2009-12-07 Jakub Jelinek <jakub@redhat.com>
* gcc.target/i386/sse-12.c: Add -mabm to dg-options, mention
abmintrin.h is also tested.
* gcc.target/i386/sse-13.c: Likewise.
2009-12-07 Daniel Franke <franke.daniel@gmail.com>
PR fortran/41940
@ -19,7 +25,7 @@
* gcc.target/powerpc/ppc-eq0-1.c: Adjust testcase for isel
targets.
2009-12-06 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
* gcc.c-torture/execute/vla-dealloc-1.c: Use lower loop count

View File

@ -1,7 +1,8 @@
/* Test that {,x,e,p,t,s,w,a,b,i}mmintrin.h, xopintrin.h, mm3dnow.h and mm_malloc.h are
usable with -O -std=c89 -pedantic-errors. */
/* Test that {,x,e,p,t,s,w,a,b,i}mmintrin.h, xopintrin.h, mm3dnow.h,
abmintrin.h and mm_malloc.h are usable with -O -std=c89
-pedantic-errors. */
/* { dg-do compile } */
/* { dg-options "-O -std=c89 -pedantic-errors -march=k8 -m3dnow -mavx -mfma4 -mxop -maes -mpclmul" } */
/* { dg-options "-O -std=c89 -pedantic-errors -march=k8 -m3dnow -mavx -mfma4 -mxop -maes -mpclmul -mabm" } */
#include <x86intrin.h>

View File

@ -1,12 +1,13 @@
/* { dg-do compile } */
/* { dg-options "-O2 -Werror-implicit-function-declaration -march=k8 -m3dnow -mavx -mxop -maes -mpclmul" } */
/* { dg-options "-O2 -Werror-implicit-function-declaration -march=k8 -m3dnow -mavx -mxop -maes -mpclmul -mabm" } */
#include <mm_malloc.h>
/* Test that the intrinsics compile with optimization. All of them are
defined as inline functions in {,x,e,p,t,s,w,a,b,i}mmintrin.h, xopintrin.h and mm3dnow.h
that reference the proper builtin functions. Defining away "extern" and
"__inline" results in all of them being compiled as proper functions. */
/* Test that the intrinsics compile with optimization. All of them
are defined as inline functions in {,x,e,p,t,s,w,a,b,i}mmintrin.h,
xopintrin.h, abmintrin.h and mm3dnow.h that reference the proper
builtin functions. Defining away "extern" and "__inline" results
in all of them being compiled as proper functions. */
#define extern
#define __inline