1/*  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
7float fabsf (float);
8typedef int __int32_t;
9typedef unsigned int __uint32_t;
10typedef union
11{
12  float value;
13  __uint32_t word;
14} ieee_float_shape_type;
15extern float __ieee754_expf (float);
16extern float __ieee754_sinhf (float);
17static const float one = 1.0, shuge = 1.0e37;
18float
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
45