URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 318 |
Rev 338 |
/* { dg-do run } */
|
/* { dg-do run } */
|
/* { dg-require-effective-target avx } */
|
/* { dg-require-effective-target avx } */
|
/* { dg-options "-O2 -mavx" } */
|
/* { dg-options "-O2 -mavx" } */
|
|
|
#include "avx-check.h"
|
#include "avx-check.h"
|
|
|
#ifndef CTRL
|
#ifndef CTRL
|
#define CTRL 11
|
#define CTRL 11
|
#endif
|
#endif
|
|
|
void static
|
void static
|
avx_test ()
|
avx_test ()
|
{
|
{
|
union128 u, s;
|
union128 u, s;
|
float e[4];
|
float e[4];
|
|
|
s.x = _mm_set_ps (1, 2, 3, 4);
|
s.x = _mm_set_ps (1, 2, 3, 4);
|
u.x = _mm_permute_ps(s.x, CTRL);
|
u.x = _mm_permute_ps(s.x, CTRL);
|
|
|
e[0] = s.a[ (CTRL & 0x03)];
|
e[0] = s.a[ (CTRL & 0x03)];
|
e[1] = s.a[((CTRL & 0x0c) >> 2)];
|
e[1] = s.a[((CTRL & 0x0c) >> 2)];
|
e[2] = s.a[((CTRL & 0x30) >> 4)];
|
e[2] = s.a[((CTRL & 0x30) >> 4)];
|
e[3] = s.a[((CTRL & 0xc0) >> 6)];
|
e[3] = s.a[((CTRL & 0xc0) >> 6)];
|
|
|
if (check_union128 (u, e))
|
if (check_union128 (u, e))
|
abort ();
|
abort ();
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.