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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [20031220-2.c] - Blame information for rev 297

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
/*  PR target/12749
2
  Orgin: Matt Thomas <matt@3am-software.com>
3
  This used to cause GCC to write out an instruction for i386 when using a L64 host
4
  which gas could not handle because GCC would write a full 64bit hex string out. */
5
 
6
 
7
float fabsf (float);
8
typedef int __int32_t;
9
typedef unsigned int __uint32_t;
10
typedef union
11
{
12
  float value;
13
  __uint32_t word;
14
} ieee_float_shape_type;
15
extern float __ieee754_expf (float);
16
extern float __ieee754_sinhf (float);
17
static const float one = 1.0, shuge = 1.0e37;
18
float
19
__ieee754_sinhf(float x)
20
{
21
        float t,w,h;
22
        __int32_t ix,jx;
23
        do { ieee_float_shape_type gf_u; gf_u.value = (x); (jx) = gf_u.word; } while (0);
24
        ix = jx&0x7fffffff;
25
        if(ix>=0x7f800000) return x+x;
26
        h = 0.5;
27
        if (jx<0) h = -h;
28
        if (ix < 0x41b00000) {
29
            if (ix<0x31800000)
30
                if(shuge+x>one) return x;
31
            t = expm1f(fabsf(x));
32
            if(ix<0x3f800000) return h*((float)2.0*t-t*t/(t+one));
33
            return h*(t+t/(t+one));
34
        }
35
        if (ix < 0x42b17180) return h*__ieee754_expf(fabsf(x));
36
        if (ix<=0x42b2d4fc) {
37
            w = __ieee754_expf((float)0.5*fabsf(x));
38
            t = h*w;
39
            return t*w;
40
        }
41
        return x*shuge;
42
}
43
 
44
 

powered by: WebSVN 2.1.0

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