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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.target/] [i386/] [20020523-2.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* PR target/6753
2
   This testcase was miscompiled because sse_mov?fcc_const0*
3
   patterns were missing earlyclobber.  */
4
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
5
/* { dg-require-effective-target ilp32 } */
6
/* { dg-options "-march=pentium3 -msse -ffast-math -O2" } */
7
 
8
#include "../../gcc.dg/i386-cpuid.h"
9
extern void abort (void);
10
extern void exit (int);
11
 
12
float one = 1.f;
13
 
14
void bar (float f)
15
{
16
  if (__builtin_memcmp (&one, &f, sizeof (float)))
17
    abort ();
18
}
19
 
20
float foo (void)
21
{
22
  return 1.f;
23
}
24
 
25
typedef struct
26
{
27
  float t;
28
} T;
29
 
30
void bail_if_no_sse (void)
31
{
32
  unsigned int edx;
33
  /* See if capabilities include SSE (25th bit; 26 for SSE2).  */
34
  edx = i386_cpuid();
35
  if (!(edx & bit_SSE))
36
    exit (0);
37
}
38
 
39
int main (void)
40
{
41
  int i;
42
  T x[1];
43
 
44
  bail_if_no_sse ();
45
  for (i = 0; i < 1; i++)
46
    {
47
      x[i].t = foo ();
48
      x[i].t = 0.f > x[i].t ? 0.f : x[i].t;
49
      bar (x[i].t);
50
    }
51
 
52
  exit (0);
53
}

powered by: WebSVN 2.1.0

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