diff options
author | Jakub Jelinek <jakub@redhat.com> | 2009-12-07 23:23:01 +0100 |
---|---|---|
committer | Sebastian Pop <spop@gcc.gnu.org> | 2009-12-07 22:23:01 +0000 |
commit | 7fccdfcfb9e6dd397d43f00551d28b09192b363d (patch) | |
tree | 28d90f3e6cd04e077162e96aa2ee00677b5ed8a4 | |
parent | 3bccee0302bf9d27d0fc09dc7efd24ea8c57535f (diff) | |
download | gcc-7fccdfcfb9e6dd397d43f00551d28b09192b363d.zip gcc-7fccdfcfb9e6dd397d43f00551d28b09192b363d.tar.gz gcc-7fccdfcfb9e6dd397d43f00551d28b09192b363d.tar.bz2 |
Fix ABM.
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
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/config.gcc | 6 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/sse-12.c | 7 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/sse-13.c | 11 |
6 files changed, 31 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e0892ee..3becda7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/config.gcc b/gcc/config.gcc index 9c0075b..d319157 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -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-*-*) diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 7cafdf6..0e58a17 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -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. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index da73c1e..fbe13dd 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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 diff --git a/gcc/testsuite/gcc.target/i386/sse-12.c b/gcc/testsuite/gcc.target/i386/sse-12.c index d03c41b..4a314e8 100644 --- a/gcc/testsuite/gcc.target/i386/sse-12.c +++ b/gcc/testsuite/gcc.target/i386/sse-12.c @@ -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> diff --git a/gcc/testsuite/gcc.target/i386/sse-13.c b/gcc/testsuite/gcc.target/i386/sse-13.c index 2ef63d5..546a99f 100644 --- a/gcc/testsuite/gcc.target/i386/sse-13.c +++ b/gcc/testsuite/gcc.target/i386/sse-13.c @@ -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 |