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/] [sparc/] [sparc-dwarf2.c] - Blame information for rev 326

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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