OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [i386/] [ssefn-3.c] - Blame information for rev 378

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 318 jeremybenn
/* Execution test for argument passing with SSE and local functions
2
   Written by Paolo Bonzini, 25 January 2005 */
3
 
4
/* { dg-do run } */
5
/* { dg-options "-O2 -msse -mfpmath=sse" } */
6
/* { dg-require-effective-target sse } */
7
 
8
#include "sse-check.h"
9
 
10
#include <assert.h>
11
 
12
static float xs (void)
13
{
14
  return 3.14159265;
15
}
16
 
17
float ys (float a)
18
{
19
  return xs () * a;
20
}
21
 
22
static double xd (void)
23
{
24
  return 3.1415926535;
25
}
26
 
27
double yd (double a)
28
{
29
  return xd () * a;
30
}
31
 
32
static void
33
sse_test (void)
34
{
35
  assert (ys (1) == xs ());
36
  assert (ys (2) == xs () * 2);
37
  assert (yd (1) == xd ());
38
  assert (yd (2) == xd () * 2);
39
}

powered by: WebSVN 2.1.0

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