URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 322 |
Rev 338 |
/* { dg-do compile { target { powerpc-*-linux*paired* && ilp32 } } } */
|
/* { dg-do compile { target { powerpc-*-linux*paired* && ilp32 } } } */
|
/* { dg-options "-mpaired -ffinite-math-only" } */
|
/* { dg-options "-mpaired -ffinite-math-only" } */
|
|
|
/* Test PowerPC PAIRED extensions. */
|
/* Test PowerPC PAIRED extensions. */
|
|
|
#include <paired.h>
|
#include <paired.h>
|
#include <stdlib.h>
|
#include <stdlib.h>
|
|
|
static float out[2] __attribute__ ((aligned (8)));
|
static float out[2] __attribute__ ((aligned (8)));
|
|
|
vector float b = { 2.0, 8.0 };
|
vector float b = { 2.0, 8.0 };
|
vector float c = { 3.0, 5.0 };
|
vector float c = { 3.0, 5.0 };
|
|
|
vector float a = { 0.0, 0.0 };
|
vector float a = { 0.0, 0.0 };
|
void
|
void
|
test_api ()
|
test_api ()
|
{
|
{
|
|
|
if (paired_cmpu0_lt (b, c))
|
if (paired_cmpu0_lt (b, c))
|
{
|
{
|
a = paired_add (b, c);
|
a = paired_add (b, c);
|
paired_stx (a, 0, out);
|
paired_stx (a, 0, out);
|
}
|
}
|
if ((out[0] != 5.0) || (out[1] != 13.0))
|
if ((out[0] != 5.0) || (out[1] != 13.0))
|
abort ();
|
abort ();
|
}
|
}
|
|
|
int
|
int
|
main ()
|
main ()
|
{
|
{
|
test_api ();
|
test_api ();
|
return (0);
|
return (0);
|
}
|
}
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.