Debian Codegraph @

gcc/testsuite/gcc.c-torture/compile/20031220-2.c

raw
1 /* PR target/12749
2 Orgin: Matt Thomas <[email protected]>
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 /* { dg-additional-options "-std=gnu89" } */
6
7
8 float fabsf (float);
9 typedef int __int32_t;
10 typedef unsigned int __uint32_t;
11 typedef union
12 {
13 float value;
14 __uint32_t word;
15 } ieee_float_shape_type;
16 extern float __ieee754_expf (float);
17 extern float __ieee754_sinhf (float);
18 static const float one = 1.0, shuge = 1.0e37;
19 float
20 __ieee754_sinhf(float x)
21 {
22 float t,w,h;
23 __int32_t ix,jx;
24 do { ieee_float_shape_type gf_u; gf_u.value = (x); (jx) = gf_u.word; } while (0);
25 ix = jx&0x7fffffff;
26 if(ix>=0x7f800000) return x+x;
27 h = 0.5;
28 if (jx<0) h = -h;
29 if (ix < 0x41b00000) {
30 if (ix<0x31800000)
31 if(shuge+x>one) return x;
32 t = expm1f(fabsf(x));
33 if(ix<0x3f800000) return h*((float)2.0*t-t*t/(t+one));
34 return h*(t+t/(t+one));
35 }
36 if (ix < 0x42b17180) return h*__ieee754_expf(fabsf(x));
37 if (ix<=0x42b2d4fc) {
38 w = __ieee754_expf((float)0.5*fabsf(x));
39 t = h*w;
40 return t*w;
41 }
42 return x*shuge;
43 }
44
45