URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 318 |
Rev 338 |
#ifdef DEBUG
|
#ifdef DEBUG
|
#include <stdio.h>
|
#include <stdio.h>
|
#endif
|
#endif
|
#include <stdlib.h>
|
#include <stdlib.h>
|
#include "cpuid.h"
|
#include "cpuid.h"
|
|
|
static void pclmul_avx_test (void);
|
static void pclmul_avx_test (void);
|
|
|
static void
|
static void
|
__attribute__ ((noinline))
|
__attribute__ ((noinline))
|
do_test (void)
|
do_test (void)
|
{
|
{
|
pclmul_avx_test ();
|
pclmul_avx_test ();
|
}
|
}
|
|
|
int
|
int
|
main ()
|
main ()
|
{
|
{
|
unsigned int eax, ebx, ecx, edx;
|
unsigned int eax, ebx, ecx, edx;
|
|
|
if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
|
if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
|
return 0;
|
return 0;
|
|
|
/* Run PCLMUL + AVX test only if host has PCLMUL + AVX support. */
|
/* Run PCLMUL + AVX test only if host has PCLMUL + AVX support. */
|
if ((ecx & (bit_AVX | bit_PCLMUL)) == (bit_AVX | bit_PCLMUL))
|
if ((ecx & (bit_AVX | bit_PCLMUL)) == (bit_AVX | bit_PCLMUL))
|
{
|
{
|
do_test ();
|
do_test ();
|
#ifdef DEBUG
|
#ifdef DEBUG
|
printf ("PASSED\n");
|
printf ("PASSED\n");
|
#endif
|
#endif
|
}
|
}
|
#ifdef DEBUG
|
#ifdef DEBUG
|
else
|
else
|
printf ("SKIPPED\n");
|
printf ("SKIPPED\n");
|
#endif
|
#endif
|
|
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.