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.2.2/] [gcc/] [testsuite/] [gcc.dg/] [sparc-dwarf2.c] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* PR target/10114 */
2
/* Originator: James Troup <james@nocrew.org> */
3
/* { dg-do compile { target sparc-*-linux* } } */
4
/* { dg-options "-g -O1" } */
5
 
6
extern __inline double sqrt (double __x)
7
{
8
  register double __r;
9
  __asm ("fsqrtd %1,%0" : "=f" (__r) : "f" (__x));
10
  return __r;
11
}
12
 
13
static double our_skew, max_update_skew;
14
 
15
static double Sqr(double x)
16
{
17
  return x*x;
18
}
19
 
20
void REF_SetReference(double skew)
21
{
22
  double previous_skew, new_skew;
23
  double old_weight, new_weight, sum_weight;
24
  double delta_freq1, delta_freq2;
25
  double skew1, skew2;
26
 
27
  previous_skew = our_skew;
28
  skew1 = sqrt((Sqr(delta_freq1) * old_weight + Sqr(delta_freq2) * new_weight) / sum_weight);
29
  skew2 = (previous_skew * old_weight + new_skew * new_weight) / sum_weight;
30
  our_skew = skew1 + skew2;
31
}

powered by: WebSVN 2.1.0

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