(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
i386/
sse2-mmx-15.c
       1  /* { dg-do run } */
       2  /* { dg-options "-O2 -fno-strict-aliasing -msse2" } */
       3  /* { dg-additional-options "-mno-mmx" { target { ! ia32 } } } */
       4  
       5  #include "sse2-check.h"
       6  
       7  __attribute__((noinline, noclone))
       8  static void
       9  test_set (int x, int y, long long *r)
      10  {
      11    *(__m64 *) r = _mm_set_pi32 (x, y);
      12  }
      13  
      14  /* Routine to manually compute the results */
      15  static void
      16  compute_correct_result (int x, int y, long long *res_p)
      17  {
      18    int *res = (int *) res_p;
      19    res[0] = y;
      20    res[1] = x;
      21  }
      22  
      23  static void
      24  sse2_test (void)
      25  {
      26    int x, y;
      27    long long r, ck;
      28  
      29    /* Run the MMX tests */
      30    x = 0x0badbeef;
      31    y = 0x0badfeed;
      32    test_set (x, y, &r);
      33    compute_correct_result (x, y, &ck);
      34    if (ck != r)
      35      abort ();
      36  }