URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 298 |
Rev 384 |
/* Common code for most VMX test cases. To use, include this file,
|
/* Common code for most VMX test cases. To use, include this file,
|
then write a routine named test() that performs a series of calls
|
then write a routine named test() that performs a series of calls
|
to check(). */
|
to check(). */
|
|
|
#include <stdlib.h>
|
#include <stdlib.h>
|
#include <stdio.h>
|
#include <stdio.h>
|
#include <altivec.h>
|
#include <altivec.h>
|
|
|
static int failed;
|
static int failed;
|
static void test (void);
|
static void test (void);
|
|
|
static void
|
static void
|
check (int result, const char *name)
|
check (int result, const char *name)
|
{
|
{
|
if (!result)
|
if (!result)
|
{
|
{
|
failed++;
|
failed++;
|
printf ("fail %s\n", name);
|
printf ("fail %s\n", name);
|
}
|
}
|
}
|
}
|
|
|
int
|
int
|
main (void)
|
main (void)
|
{
|
{
|
test ();
|
test ();
|
if (failed)
|
if (failed)
|
abort ();
|
abort ();
|
|
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.