OSDN Git Service

Fix ABM.
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 Dec 2009 22:23:01 +0000 (22:23 +0000)
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 Dec 2009 22:23:01 +0000 (22:23 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155059 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config.gcc
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/sse-12.c
gcc/testsuite/gcc.target/i386/sse-13.c

index e0892ee..3becda7 100644 (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.
index 9c0075b..d319157 100644 (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-*-*)
index 7cafdf6..0e58a17 100644 (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.  */
index da73c1e..fbe13dd 100644 (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
index d03c41b..4a314e8 100644 (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>
 
index 2ef63d5..546a99f 100644 (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