annotate gcc/testsuite/gcc.dg/lto/20100825-1_0.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* { dg-lto-do link } */
kono
parents:
diff changeset
2 /* { dg-lto-options { { -O3 -flto } } } */
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 typedef unsigned int UINT32;
kono
parents:
diff changeset
5 typedef unsigned long long UINT64;
kono
parents:
diff changeset
6 typedef struct { UINT64 w[2]; } UINT128;
kono
parents:
diff changeset
7 void _bid_to_dpd128 (UINT128 *, UINT128 *);
kono
parents:
diff changeset
8 static const int short_recip_scale[] = {
kono
parents:
diff changeset
9 1,
kono
parents:
diff changeset
10 65 - 64,
kono
parents:
diff changeset
11 69 - 64,
kono
parents:
diff changeset
12 71 - 64,
kono
parents:
diff changeset
13 75 - 64,
kono
parents:
diff changeset
14 78 - 64,
kono
parents:
diff changeset
15 81 - 64,
kono
parents:
diff changeset
16 85 - 64,
kono
parents:
diff changeset
17 88 - 64,
kono
parents:
diff changeset
18 91 - 64,
kono
parents:
diff changeset
19 95 - 64,
kono
parents:
diff changeset
20 98 - 64,
kono
parents:
diff changeset
21 101 - 64,
kono
parents:
diff changeset
22 105 - 64,
kono
parents:
diff changeset
23 108 - 64,
kono
parents:
diff changeset
24 111 - 64,
kono
parents:
diff changeset
25 115 - 64,
kono
parents:
diff changeset
26 118 - 64
kono
parents:
diff changeset
27 };
kono
parents:
diff changeset
28
kono
parents:
diff changeset
29 void _bid_to_dpd128 (UINT128 *, UINT128 *);
kono
parents:
diff changeset
30
kono
parents:
diff changeset
31 void
kono
parents:
diff changeset
32 _bid_to_dpd128 (UINT128 *pres, UINT128 *px) {
kono
parents:
diff changeset
33 UINT128 res;
kono
parents:
diff changeset
34 unsigned int comb;
kono
parents:
diff changeset
35 UINT128 bcoeff;
kono
parents:
diff changeset
36 UINT128 BH;
kono
parents:
diff changeset
37 UINT64 BL, d109;
kono
parents:
diff changeset
38 unsigned int amount;
kono
parents:
diff changeset
39 UINT128 x = *px;
kono
parents:
diff changeset
40
kono
parents:
diff changeset
41 comb = (x.w[1] ) >> 46;
kono
parents:
diff changeset
42 if ((comb & 0x1e000) == 0x1e000) {
kono
parents:
diff changeset
43 res = x;
kono
parents:
diff changeset
44 } else {
kono
parents:
diff changeset
45 bcoeff.w[1] = (x.w[1] & 0x0001ffffffffffffull);
kono
parents:
diff changeset
46 bcoeff.w[0] = x.w[0];
kono
parents:
diff changeset
47 amount = 9;
kono
parents:
diff changeset
48 BH.w[0] = (BH.w[0] >> amount) | (BH.w[1] << (64 - amount));
kono
parents:
diff changeset
49 BL = bcoeff.w[0] - BH.w[0] * 1000000000000000000ull;
kono
parents:
diff changeset
50 d109 = 0x3333333333333334ull;
kono
parents:
diff changeset
51 { UINT64 CXH, CXL, CYH,CYL,PL,PH,PM,PM2; CXH = (BH.w[0]) >> 32; CXL = (UINT32)(BH.w[0]); CYH = (d109) >> 32; CYL = (UINT32)(d109); PM = CXH*CYL; PH = CXH*CYH; PL = CXL*CYL; PM2 = CXL*CYH; PH += (PM>>32); PM = (UINT64)((UINT32)PM)+PM2+(PL>>32); };
kono
parents:
diff changeset
52 { UINT64 CXH, CXL, CYH,CYL,PL,PH,PM,PM2; CXH = (BL) >> 32; CXL = (UINT32)(BL); CYH = (d109) >> 32; CYL = (UINT32)(d109); PM = CXH*CYL; PH = CXH*CYH; PL = CXL*CYL; PM2 = CXL*CYH; PH += (PM>>32); PM = (UINT64)((UINT32)PM)+PM2+(PL>>32); };
kono
parents:
diff changeset
53 }
kono
parents:
diff changeset
54 *pres = res;
kono
parents:
diff changeset
55 }
kono
parents:
diff changeset
56
kono
parents:
diff changeset
57 int main() { return 0; }