SOURCES: gcc-ix86-branch.diff (NEW) - regenerated against latest merge point.
pluto
pluto at pld-linux.org
Tue Mar 31 20:54:24 CEST 2009
Author: pluto Date: Tue Mar 31 18:54:24 2009 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- regenerated against latest merge point.
---- Files affected:
SOURCES:
gcc-ix86-branch.diff (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/gcc-ix86-branch.diff
diff -u /dev/null SOURCES/gcc-ix86-branch.diff:1.1
--- /dev/null Tue Mar 31 20:54:25 2009
+++ SOURCES/gcc-ix86-branch.diff Tue Mar 31 20:54:19 2009
@@ -0,0 +1,1421 @@
+Index: gcc/doc/extend.texi
+===================================================================
+--- gcc/doc/extend.texi (.../gcc-4_3-branch) (revision 145062)
++++ gcc/doc/extend.texi (.../ix86/gcc-4_3-branch) (revision 145364)
+@@ -7962,6 +7962,27 @@
+ Generates the @code{popcntq} machine instruction.
+ @end table
+
++The following built-in functions are available when @option{-maes} is
++used. All of them generate the machine instruction that is part of the
++name.
++
++ at smallexample
++v2di __builtin_ia32_aesenc128 (v2di, v2di)
++v2di __builtin_ia32_aesenclast128 (v2di, v2di)
++v2di __builtin_ia32_aesdec128 (v2di, v2di)
++v2di __builtin_ia32_aesdeclast128 (v2di, v2di)
++v2di __builtin_ia32_aeskeygenassist128 (v2di, const int)
++v2di __builtin_ia32_aesimc128 (v2di)
++ at end smallexample
++
++The following built-in function is available when @option{-mpclmul} is
++used.
++
++ at table @code
++ at item v2di __builtin_ia32_pclmulqdq128 (v2di, v2di, const int)
++Generates the @code{pclmulqdq} machine instruction.
++ at end table
++
+ The following built-in functions are available when @option{-msse4a} is used.
+ All of them generate the machine instruction that is part of the name.
+
+Index: gcc/doc/invoke.texi
+===================================================================
+--- gcc/doc/invoke.texi (.../gcc-4_3-branch) (revision 145062)
++++ gcc/doc/invoke.texi (.../ix86/gcc-4_3-branch) (revision 145364)
+@@ -551,6 +551,7 @@
+ -mno-wide-multiply -mrtd -malign-double @gol
+ -mpreferred-stack-boundary=@var{num} -mcld -mcx16 -msahf -mrecip @gol
+ -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -msse4 @gol
++-maes -mpclmul @gol
+ -msse4a -m3dnow -mpopcnt -mabm -msse5 @gol
+ -mthreads -mno-align-stringops -minline-all-stringops @gol
+ -mpush-args -maccumulate-outgoing-args -m128bit-long-double @gol
+@@ -10733,6 +10734,10 @@
+ @itemx -mno-sse4.2
+ @item -msse4
+ @itemx -mno-sse4
++ at item -maes
++ at itemx -mno-aes
++ at item -mpclmul
++ at itemx -mno-pclmul
+ @item -msse4a
+ @item -mno-sse4a
+ @item -msse5
+@@ -10750,8 +10755,8 @@
+ @opindex m3dnow
+ @opindex mno-3dnow
+ These switches enable or disable the use of instructions in the MMX,
+-SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4A, SSE5, ABM or 3DNow!@: extended
+-instruction sets.
++SSE, SSE2, SSE3, SSSE3, SSE4.1, AES, PCLMUL, SSE4A, SSE5, ABM or
++3DNow!@: extended instruction sets.
+ These extensions are also available as built-in functions: see
+ @ref{X86 Built-in Functions}, for details of the functions enabled and
+ disabled by these switches.
+Index: gcc/testsuite/gcc.target/i386/sse-14.c
+===================================================================
+--- gcc/testsuite/gcc.target/i386/sse-14.c (.../gcc-4_3-branch) (revision 145062)
++++ gcc/testsuite/gcc.target/i386/sse-14.c (.../ix86/gcc-4_3-branch) (revision 145364)
+@@ -1,14 +1,15 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O0 -march=k8 -m3dnow -msse4 -msse5" } */
++/* { dg-options "-O0 -march=k8 -m3dnow -msse4 -msse5 -maes -mpclmul" } */
+
+ /* Test that the intrinsics compile without optimization. All of them are
+- defined as inline functions in {,x,e,p,t,s,a,b}mmintrin.h and mm3dnow.h
++ defined as inline functions in {,x,e,p,t,s,w,a,b}mmintrin.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
+
++#include <wmmintrin.h>
+ #include <bmmintrin.h>
+ #include <smmintrin.h>
+ #include <mm3dnow.h>
+@@ -44,6 +45,10 @@
+ test_1x (_mm_extracti_si64, __m128i, __m128i, 1, 1)
+ test_2x (_mm_inserti_si64, __m128i, __m128i, __m128i, 1, 1)
+
++/* wmmintrin.h */
++test_1 (_mm_aeskeygenassist_si128, __m128i, __m128i, 1)
++test_2 (_mm_clmulepi64_si128, __m128i, __m128i, __m128i, 1)
++
+ /* smmintrin.h */
+ test_2 (_mm_blend_epi16, __m128i, __m128i, __m128i, 1)
+ test_2 (_mm_blend_ps, __m128, __m128, __m128, 1)
+Index: gcc/testsuite/gcc.target/i386/i386.exp
+===================================================================
+--- gcc/testsuite/gcc.target/i386/i386.exp (.../gcc-4_3-branch) (revision 145062)
++++ gcc/testsuite/gcc.target/i386/i386.exp (.../ix86/gcc-4_3-branch) (revision 145364)
+@@ -51,6 +51,34 @@
+ } "-O2 -msse4.1" ]
+ }
+
++# Return 1 if aes instructions can be compiled.
++proc check_effective_target_aes { } {
++ return [check_no_compiler_messages aes object {
++ typedef long long __m128i __attribute__ ((__vector_size__ (16)));
++ typedef long long __v2di __attribute__ ((__vector_size__ (16)));
++
++ __m128i _mm_aesimc_si128 (__m128i __X)
++ {
++ return (__m128i) __builtin_ia32_aesimc128 ((__v2di)__X);
++ }
++ } "-O2 -maes" ]
++}
++
++# Return 1 if pclmul instructions can be compiled.
++proc check_effective_target_pclmul { } {
++ return [check_no_compiler_messages pclmul object {
++ typedef long long __m128i __attribute__ ((__vector_size__ (16)));
++ typedef long long __v2di __attribute__ ((__vector_size__ (16)));
++
++ __m128i pclmulqdq_test (__m128i __X, __m128i __Y)
++ {
++ return (__m128i) __builtin_ia32_pclmulqdq128 ((__v2di)__X,
++ (__v2di)__Y,
++ 1);
++ }
++ } "-O2 -mpclmul" ]
++}
++
+ # Return 1 if sse4a instructions can be compiled.
+ proc check_effective_target_sse4a { } {
+ return [check_no_compiler_messages sse4a object {
+Index: gcc/testsuite/gcc.target/i386/aesdeclast.c
+===================================================================
+--- gcc/testsuite/gcc.target/i386/aesdeclast.c (.../gcc-4_3-branch) (revision 0)
++++ gcc/testsuite/gcc.target/i386/aesdeclast.c (.../ix86/gcc-4_3-branch) (revision 145364)
+@@ -0,0 +1,69 @@
++/* { dg-do run } */
++/* { dg-require-effective-target aes } */
++/* { dg-options "-O2 -maes" } */
++
++#include <wmmintrin.h>
++#include <string.h>
++
++#include "aes-check.h"
++
++extern void abort (void);
++
++#define NUM 1024
++
++static __m128i src1[NUM];
++static __m128i src2[NUM];
++static __m128i edst[NUM];
++
++static __m128i resdst[NUM];
++
++/* Initialize input/output vectors. (Currently, there is only one set of
++ input/output vectors). */
++
++static void
++init_data (__m128i *s1, __m128i *s2, __m128i *d)
++{
++ int i;
++
++ for (i = 0; i < NUM; i++)
++ {
++ s1[i] = _mm_setr_epi32 (0x5d53475d, 0x63746f72,
++ 0x73745665, 0x7b5b5465);
++ s2[i] = _mm_setr_epi32 (0x726f6e5d, 0x5b477565,
++ 0x68617929, 0x48692853);
++ d[i] = _mm_setr_epi32 (0x72a593d0, 0xd410637b,
++ 0x6b317f95, 0xc5a391ef);
++ }
++}
++
++static void
++aes_test (void)
++{
++ int i;
++
++ init_data (src1, src2, edst);
++
++ for (i = 0; i < NUM; i += 16)
++ {
++ resdst[i] = _mm_aesdeclast_si128 (src1[i], src2[i]);
++ resdst[i + 1] = _mm_aesdeclast_si128 (src1[i + 1], src2[i + 1]);
++ resdst[i + 2] = _mm_aesdeclast_si128 (src1[i + 2], src2[i + 2]);
++ resdst[i + 3] = _mm_aesdeclast_si128 (src1[i + 3], src2[i + 3]);
++ resdst[i + 4] = _mm_aesdeclast_si128 (src1[i + 4], src2[i + 4]);
++ resdst[i + 5] = _mm_aesdeclast_si128 (src1[i + 5], src2[i + 5]);
++ resdst[i + 6] = _mm_aesdeclast_si128 (src1[i + 6], src2[i + 6]);
++ resdst[i + 7] = _mm_aesdeclast_si128 (src1[i + 7], src2[i + 7]);
++ resdst[i + 8] = _mm_aesdeclast_si128 (src1[i + 8], src2[i + 8]);
++ resdst[i + 9] = _mm_aesdeclast_si128 (src1[i + 9], src2[i + 9]);
++ resdst[i + 10] = _mm_aesdeclast_si128 (src1[i + 10], src2[i + 10]);
++ resdst[i + 11] = _mm_aesdeclast_si128 (src1[i + 11], src2[i + 11]);
++ resdst[i + 12] = _mm_aesdeclast_si128 (src1[i + 12], src2[i + 12]);
++ resdst[i + 13] = _mm_aesdeclast_si128 (src1[i + 13], src2[i + 13]);
++ resdst[i + 14] = _mm_aesdeclast_si128 (src1[i + 14], src2[i + 14]);
++ resdst[i + 15] = _mm_aesdeclast_si128 (src1[i + 15], src2[i + 15]);
++ }
++
++ for (i = 0; i < NUM; i++)
++ if (memcmp (edst + i, resdst + i, sizeof (__m128i)))
++ abort ();
++}
+Index: gcc/testsuite/gcc.target/i386/pclmulqdq.c
+===================================================================
+--- gcc/testsuite/gcc.target/i386/pclmulqdq.c (.../gcc-4_3-branch) (revision 0)
++++ gcc/testsuite/gcc.target/i386/pclmulqdq.c (.../ix86/gcc-4_3-branch) (revision 145364)
+@@ -0,0 +1,87 @@
++/* { dg-do run } */
++/* { dg-require-effective-target pclmul } */
++/* { dg-options "-O2 -mpclmul" } */
++
++#include <wmmintrin.h>
++#include <string.h>
++
++#include "pclmul-check.h"
++
++extern void abort (void);
++
++#define NUM 1024
++
++static __m128i s1[NUM];
++static __m128i s2[NUM];
++/* We need this array to generate mem form of inst */
++static __m128i s2m[NUM];
++
++static __m128i e_00[NUM];
++static __m128i e_01[NUM];
++static __m128i e_10[NUM];
++static __m128i e_11[NUM];
++
++static __m128i d_00[NUM];
++static __m128i d_01[NUM];
++static __m128i d_10[NUM];
++static __m128i d_11[NUM];
++
++/* Initialize input/output vectors. (Currently, there is only one set
++ of input/output vectors). */
++static void
++init_data (__m128i *ls1, __m128i *ls2, __m128i *le_00, __m128i *le_01,
++ __m128i *le_10, __m128i *le_11)
++{
++ int i;
++
++ for (i = 0; i < NUM; i++)
++ {
++ ls1[i] = _mm_set_epi32 (0x7B5B5465, 0x73745665,
++ 0x63746F72, 0x5D53475D);
++ ls2[i] = _mm_set_epi32 (0x48692853, 0x68617929,
++ 0x5B477565, 0x726F6E5D);
++ s2m[i] = _mm_set_epi32 (0x48692853, 0x68617929,
++ 0x5B477565, 0x726F6E5D);
++ le_00[i] = _mm_set_epi32 (0x1D4D84C8, 0x5C3440C0,
++ 0x929633D5, 0xD36F0451);
++ le_01[i] = _mm_set_epi32 (0x1A2BF6DB, 0x3A30862F,
++ 0xBABF262D, 0xF4B7D5C9);
++ le_10[i] = _mm_set_epi32 (0x1BD17C8D, 0x556AB5A1,
++ 0x7FA540AC, 0x2A281315);
++ le_11[i] = _mm_set_epi32 (0x1D1E1F2C, 0x592E7C45,
++ 0xD66EE03E, 0x410FD4ED);
++ }
++}
++
++static void
++pclmul_test (void)
++{
++ int i;
++
++ init_data (s1, s2, e_00, e_01, e_10, e_11);
++
++ for (i = 0; i < NUM; i += 2)
++ {
++ d_00[i] = _mm_clmulepi64_si128 (s1[i], s2m[i], 0x00);
++ d_01[i] = _mm_clmulepi64_si128 (s1[i], s2[i], 0x01);
++ d_10[i] = _mm_clmulepi64_si128 (s1[i], s2[i], 0x10);
++ d_11[i] = _mm_clmulepi64_si128 (s1[i], s2[i], 0x11);
++
++ d_11[i + 1] = _mm_clmulepi64_si128 (s1[i + 1], s2[i + 1], 0x11);
++ d_00[i + 1] = _mm_clmulepi64_si128 (s1[i + 1], s2[i + 1], 0x00);
++ d_10[i + 1] = _mm_clmulepi64_si128 (s1[i + 1], s2m[i + 1], 0x10);
++ d_01[i + 1] = _mm_clmulepi64_si128 (s1[i + 1], s2[i + 1], 0x01);
++ }
++
++ for (i = 0; i < NUM; i++)
++ {
++ if (memcmp (d_00 + i, e_00 + i, sizeof (__m128i)))
++ abort ();
++ if (memcmp (d_01 + i, e_01 + i, sizeof (__m128i)))
++ abort ();
++ if (memcmp (d_10 + i, e_10 + i, sizeof (__m128i)))
++ abort ();
++ if (memcmp(d_11 + i, e_11 + i, sizeof (__m128i)))
++ abort ();
++ }
++}
+Index: gcc/testsuite/gcc.target/i386/aes-check.h
+===================================================================
+--- gcc/testsuite/gcc.target/i386/aes-check.h (.../gcc-4_3-branch) (revision 0)
++++ gcc/testsuite/gcc.target/i386/aes-check.h (.../ix86/gcc-4_3-branch) (revision 145364)
+@@ -0,0 +1,30 @@
++#include <stdio.h>
++#include <stdlib.h>
++
++#include "cpuid.h"
++
++static void aes_test (void);
++
++int
++main ()
++{
++ unsigned int eax, ebx, ecx, edx;
++
++ if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
++ return 0;
++
++ /* Run AES test only if host has AES support. */
++ if (ecx & bit_AES)
++ {
++ aes_test ();
++#ifdef DEBUG
++ printf ("PASSED\n");
++#endif
++ }
++#ifdef DEBUG
++ else
++ printf ("SKIPPED\n");
++#endif
++
++ return 0;
++}
+Index: gcc/testsuite/gcc.target/i386/pclmul-check.h
+===================================================================
+--- gcc/testsuite/gcc.target/i386/pclmul-check.h (.../gcc-4_3-branch) (revision 0)
++++ gcc/testsuite/gcc.target/i386/pclmul-check.h (.../ix86/gcc-4_3-branch) (revision 145364)
+@@ -0,0 +1,30 @@
++#include <stdio.h>
++#include <stdlib.h>
++
++#include "cpuid.h"
++
++static void pclmul_test (void);
++
++int
++main ()
++{
++ unsigned int eax, ebx, ecx, edx;
++
++ if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
++ return 0;
++
++ /* Run PCLMULQDQ test only if host has PCLMULQDQ support. */
++ if (ecx & bit_PCLMUL)
++ {
++ pclmul_test ();
++#ifdef DEBUG
++ printf ("PASSED\n");
++#endif
++ }
++#ifdef DEBUG
++ else
++ printf ("SKIPPED\n");
++#endif
++
++ return 0;
++}
+Index: gcc/testsuite/gcc.target/i386/aeskeygenassist.c
+===================================================================
+--- gcc/testsuite/gcc.target/i386/aeskeygenassist.c (.../gcc-4_3-branch) (revision 0)
++++ gcc/testsuite/gcc.target/i386/aeskeygenassist.c (.../ix86/gcc-4_3-branch) (revision 145364)
+@@ -0,0 +1,66 @@
++/* { dg-do run } */
++/* { dg-require-effective-target aes } */
++/* { dg-options "-O2 -maes" } */
++
++#include <wmmintrin.h>
++#include <string.h>
++
++#include "aes-check.h"
++
++extern void abort (void);
++
++#define NUM 1024
++#define IMM8 1
++
++static __m128i src1[NUM];
++static __m128i edst[NUM];
++
++static __m128i resdst[NUM];
++
++/* Initialize input/output vectors. (Currently, there is only one set
++ of input/output vectors). */
++
++static void
++init_data (__m128i *s1, __m128i *d)
++{
++ int i;
++ for (i = 0; i < NUM; i++)
++ {
++ s1[i] = _mm_setr_epi32 (0x16157e2b, 0xa6d2ae28,
++ 0x8815f7ab, 0x3c4fcf09);
++ d[i] = _mm_setr_epi32 (0x24b5e434, 0x3424b5e5,
++ 0xeb848a01, 0x01eb848b);
++ }
++}
++
++static void
++aes_test (void)
++{
++ int i;
++
++ init_data (src1, edst);
++
++ for (i = 0; i < NUM; i += 16)
++ {
++ resdst[i] = _mm_aeskeygenassist_si128 (src1[i], IMM8);
++ resdst[i + 1] = _mm_aeskeygenassist_si128 (src1[i + 1], IMM8);
++ resdst[i + 2] = _mm_aeskeygenassist_si128 (src1[i + 2], IMM8);
++ resdst[i + 3] = _mm_aeskeygenassist_si128 (src1[i + 3], IMM8);
++ resdst[i + 4] = _mm_aeskeygenassist_si128 (src1[i + 4], IMM8);
++ resdst[i + 5] = _mm_aeskeygenassist_si128 (src1[i + 5], IMM8);
++ resdst[i + 6] = _mm_aeskeygenassist_si128 (src1[i + 6], IMM8);
++ resdst[i + 7] = _mm_aeskeygenassist_si128 (src1[i + 7], IMM8);
++ resdst[i + 8] = _mm_aeskeygenassist_si128 (src1[i + 8], IMM8);
++ resdst[i + 9] = _mm_aeskeygenassist_si128 (src1[i + 9], IMM8);
++ resdst[i + 10] = _mm_aeskeygenassist_si128 (src1[i + 10], IMM8);
++ resdst[i + 11] = _mm_aeskeygenassist_si128 (src1[i + 11], IMM8);
++ resdst[i + 12] = _mm_aeskeygenassist_si128 (src1[i + 12], IMM8);
++ resdst[i + 13] = _mm_aeskeygenassist_si128 (src1[i + 13], IMM8);
++ resdst[i + 14] = _mm_aeskeygenassist_si128 (src1[i + 14], IMM8);
++ resdst[i + 15] = _mm_aeskeygenassist_si128 (src1[i + 15], IMM8);
++ }
++
++ for (i = 0; i < NUM; i++)
++ if (memcmp(edst + i, resdst + i, sizeof (__m128i)))
++ abort ();
++}
+Index: gcc/testsuite/gcc.target/i386/aesenclast.c
+===================================================================
+--- gcc/testsuite/gcc.target/i386/aesenclast.c (.../gcc-4_3-branch) (revision 0)
++++ gcc/testsuite/gcc.target/i386/aesenclast.c (.../ix86/gcc-4_3-branch) (revision 145364)
+@@ -0,0 +1,68 @@
++/* { dg-do run } */
++/* { dg-require-effective-target aes } */
++/* { dg-options "-O2 -maes" } */
++
++#include <wmmintrin.h>
++#include <string.h>
++
++#include "aes-check.h"
++
++extern void abort (void);
++
++#define NUM 1024
++
++static __m128i src1[NUM];
++static __m128i src2[NUM];
++static __m128i edst[NUM];
++
++static __m128i resdst[NUM];
++
++/* Initialize input/output vectors. (Currently, there is only one
++ set of input/output vectors). */
++
++static void
++init_data (__m128i *s1, __m128i *s2, __m128i *d)
++{
++ int i;
++ for (i = 0; i < NUM; i++)
++ {
++ s1[i] = _mm_setr_epi32 (0x5d53475d, 0x63746f72,
++ 0x73745665, 0x7b5b5465);
++ s2[i] = _mm_setr_epi32 (0x726f6e5d, 0x5b477565,
++ 0x68617929, 0x48692853);
++ d[i] = _mm_setr_epi32 (0x53fdc611, 0x177ec425,
++ 0x938c5964, 0xc7fb881e);
++ }
++}
++
++static void
++aes_test (void)
++{
++ int i;
++
++ init_data (src1, src2, edst);
++
++ for (i = 0; i < NUM; i += 16)
++ {
++ resdst[i] = _mm_aesenclast_si128 (src1[i], src2[i]);
++ resdst[i + 1] = _mm_aesenclast_si128 (src1[i + 1], src2[i + 1]);
++ resdst[i + 2] = _mm_aesenclast_si128 (src1[i + 2], src2[i + 2]);
++ resdst[i + 3] = _mm_aesenclast_si128 (src1[i + 3], src2[i + 3]);
++ resdst[i + 4] = _mm_aesenclast_si128 (src1[i + 4], src2[i + 4]);
++ resdst[i + 5] = _mm_aesenclast_si128 (src1[i + 5], src2[i + 5]);
++ resdst[i + 6] = _mm_aesenclast_si128 (src1[i + 6], src2[i + 6]);
++ resdst[i + 7] = _mm_aesenclast_si128 (src1[i + 7], src2[i + 7]);
++ resdst[i + 8] = _mm_aesenclast_si128 (src1[i + 8], src2[i + 8]);
++ resdst[i + 9] = _mm_aesenclast_si128 (src1[i + 9], src2[i + 9]);
++ resdst[i + 10] = _mm_aesenclast_si128 (src1[i + 10], src2[i + 10]);
++ resdst[i + 11] = _mm_aesenclast_si128 (src1[i + 11], src2[i + 11]);
++ resdst[i + 12] = _mm_aesenclast_si128 (src1[i + 12], src2[i + 12]);
++ resdst[i + 13] = _mm_aesenclast_si128 (src1[i + 13], src2[i + 13]);
++ resdst[i + 14] = _mm_aesenclast_si128 (src1[i + 14], src2[i + 14]);
++ resdst[i + 15] = _mm_aesenclast_si128 (src1[i + 15], src2[i + 15]);
++ }
++
++ for (i = 0; i < NUM; i++)
++ if (memcmp(edst + i, resdst + i, sizeof (__m128i)))
++ abort ();
++}
+Index: gcc/testsuite/gcc.target/i386/aesimc.c
+===================================================================
+--- gcc/testsuite/gcc.target/i386/aesimc.c (.../gcc-4_3-branch) (revision 0)
++++ gcc/testsuite/gcc.target/i386/aesimc.c (.../ix86/gcc-4_3-branch) (revision 145364)
+@@ -0,0 +1,66 @@
++/* { dg-do run } */
++/* { dg-require-effective-target aes } */
++/* { dg-options "-O2 -maes" } */
++
++#include <wmmintrin.h>
++#include <string.h>
++
++#include "aes-check.h"
++
++extern void abort (void);
++
++#define NUM 1024
++
++static __m128i src1[NUM];
++static __m128i edst[NUM];
++
++static __m128i resdst[NUM];
++
++/* Initialize input/output vectors. (Currently, there is only one set
++ of input/output vectors). */
++
++static void
++init_data (__m128i *s1, __m128i *d)
++{
++ int i;
++
++ for (i = 0; i < NUM; i++)
++ {
++ s1[i] = _mm_setr_epi32 (0x5d53475d, 0x63746f72,
++ 0x73745665, 0x7b5b5465);
++ d[i] = _mm_setr_epi32 (0x81c3b3e5, 0x2b18330a,
++ 0x44b109c8, 0x627a6f66);
++ }
++}
++
++static void
++aes_test (void)
++{
++ int i;
++
++ init_data (src1, edst);
++
++ for (i = 0; i < NUM; i += 16)
++ {
++ resdst[i] = _mm_aesimc_si128 (src1[i]);
++ resdst[i + 1] = _mm_aesimc_si128 (src1[i + 1]);
++ resdst[i + 2] = _mm_aesimc_si128 (src1[i + 2]);
++ resdst[i + 3] = _mm_aesimc_si128 (src1[i + 3]);
++ resdst[i + 4] = _mm_aesimc_si128 (src1[i + 4]);
++ resdst[i + 5] = _mm_aesimc_si128 (src1[i + 5]);
++ resdst[i + 6] = _mm_aesimc_si128 (src1[i + 6]);
++ resdst[i + 7] = _mm_aesimc_si128 (src1[i + 7]);
++ resdst[i + 8] = _mm_aesimc_si128 (src1[i + 8]);
++ resdst[i + 9] = _mm_aesimc_si128 (src1[i + 9]);
++ resdst[i + 10] = _mm_aesimc_si128 (src1[i + 10]);
++ resdst[i + 11] = _mm_aesimc_si128 (src1[i + 11]);
++ resdst[i + 12] = _mm_aesimc_si128 (src1[i + 12]);
++ resdst[i + 13] = _mm_aesimc_si128 (src1[i + 13]);
++ resdst[i + 14] = _mm_aesimc_si128 (src1[i + 14]);
++ resdst[i + 15] = _mm_aesimc_si128 (src1[i + 15]);
++ }
++
++ for (i = 0; i < NUM; i++)
++ if (memcmp(edst + i, resdst + i, sizeof (__m128i)))
++ abort ();
++}
+Index: gcc/testsuite/gcc.target/i386/aesenc.c
+===================================================================
<<Diff was trimmed, longer than 597 lines>>
More information about the pld-cvs-commit
mailing list