URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
/* PR target/17245 */
|
/* PR target/17245 */
|
/* Origin: <aaronw@net.com> */
|
/* Origin: <aaronw@net.com> */
|
/* Testcase by Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de> */
|
/* Testcase by Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de> */
|
/* { dg-do compile { target sparc*-*-* } } */
|
/* { dg-do compile { target sparc*-*-* } } */
|
/* { dg-options "-O -mcpu=v9" } */
|
/* { dg-options "-O -mcpu=v9" } */
|
|
|
/* This used to fail on 32-bit Ultrasparc because reload was emitting
|
/* This used to fail on 32-bit Ultrasparc because reload was emitting
|
a move insn that doesn't satisfy its constraints. */
|
a move insn that doesn't satisfy its constraints. */
|
|
|
int n;
|
int n;
|
double range ;
|
double range ;
|
double bin ;
|
double bin ;
|
double wmean;
|
double wmean;
|
|
|
double f ()
|
double f ()
|
{
|
{
|
int i ;
|
int i ;
|
long double W = 0 ;
|
long double W = 0 ;
|
for ( i = 0 ; i < n ; i ++) {
|
for ( i = 0 ; i < n ; i ++) {
|
double xi = range;
|
double xi = range;
|
double wi = bin;
|
double wi = bin;
|
W += wi ;
|
W += wi ;
|
wmean += ( xi - wmean) * ( wi / W);
|
wmean += ( xi - wmean) * ( wi / W);
|
}
|
}
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.