summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/ssse3-check.h
blob: 3ca79333c7f84ec2255e63c14d4127d705f9f85e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <stdio.h>
#include <stdlib.h>

#include "cpuid.h"

static void ssse3_test (void);

static void
__attribute__ ((noinline))
do_test (void)
{
  ssse3_test ();
}

int
main ()
{
  unsigned int eax, ebx, ecx, edx;
 
  if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
    return 0;

  /* Run SSSE3 test only if host has SSSE3 support.  */
  if (ecx & bit_SSSE3)
    do_test ();

  return 0;
}