OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [i386/] [pr42549.c] - Blame information for rev 318

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 318 jeremybenn
/* { dg-do run } */
2
/* { dg-require-effective-target 3dnow } */
3
/* { dg-options "-O2 -m3dnow" } */
4
 
5
#include "mmx-3dnow-check.h"
6
 
7
#include <mm3dnow.h>
8
 
9
typedef union {
10
  float f[2];
11
  __m64 v;
12
} vec_t;
13
 
14
void __attribute__ ((noinline))
15
Butterfly_3 (__m64 * D, __m64 SC)
16
{
17
  __m64 T, T1;
18
 
19
  T = _m_pfmul (D[1], SC);
20
  T1 = D[0];
21
  D[0] = _m_pfadd (T1, T);
22
  D[1] = _m_pfsub (T1, T);
23
}
24
 
25
static void
26
mmx_3dnow_test (void)
27
{
28
  vec_t D[2] = { { .f = { 2.0f, 3.0f } },
29
                 { .f = { 4.0f, 5.0f } } };
30
 
31
  const vec_t SC = { .f = { 1.0f, 1.0f } };
32
 
33
  Butterfly_3 (&D[0].v, SC.v);
34
  _m_femms ();
35
 
36
  if (D[1].f[0] != -2.0f || D[1].f[1] != -2.0f)
37
    abort ();
38
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.