Compare commits
1543 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0dd8adcdb4 | ||
|
|
e0eb045b5f | ||
|
|
0e9f86b1db | ||
|
|
ffaf37a7e7 | ||
|
|
339f621735 | ||
|
|
c8e967f43d | ||
|
|
ec545859b9 | ||
|
|
ff9c3c6e5b | ||
|
|
bd46c1c328 | ||
|
|
543e729398 | ||
|
|
030abfa0d2 | ||
|
|
0c556095f4 | ||
|
|
ce0e794092 | ||
|
|
579301c2af | ||
|
|
308e7d5314 | ||
|
|
dc299166cf | ||
|
|
f7bf61a983 | ||
|
|
878aece87b | ||
|
|
09575bc0d6 | ||
|
|
67bd0267db | ||
|
|
70e934f116 | ||
|
|
9ad0541f2c | ||
|
|
a220648198 | ||
|
|
5aaa7d0fbb | ||
|
|
805f9b309b | ||
|
|
a1a3e46e0a | ||
|
|
4527110e02 | ||
|
|
a4f324e9ea | ||
|
|
23a82b5ffd | ||
|
|
ebe79329a2 | ||
|
|
4d65373a3d | ||
|
|
2c8864f634 | ||
|
|
b89a09af4b | ||
|
|
a94372231c | ||
|
|
94e9b9c625 | ||
|
|
dfb4446d09 | ||
|
|
c8e4108c5b | ||
|
|
efea7958f8 | ||
|
|
a9be62f085 | ||
|
|
4ebcf64864 | ||
|
|
2f20833097 | ||
|
|
68bb394570 | ||
|
|
4637e8f969 | ||
|
|
dc7016344e | ||
|
|
ed36dbbd9c | ||
|
|
6128bc728d | ||
|
|
568c183d2a | ||
|
|
f112e8af27 | ||
|
|
d1705baa74 | ||
|
|
40e77dad83 | ||
|
|
dc3c4197c6 | ||
|
|
c9690916e5 | ||
|
|
14ae23326e | ||
|
|
29e6541db1 | ||
|
|
3907e3b675 | ||
|
|
48c9e17aa1 | ||
|
|
a56b767c35 | ||
|
|
453157595e | ||
|
|
993d5bc9c9 | ||
|
|
53210b2304 | ||
|
|
9983501ff2 | ||
|
|
56b1818beb | ||
|
|
c0b937ba12 | ||
|
|
5fb7af26ab | ||
|
|
93367adaa7 | ||
|
|
0bdc85181c | ||
|
|
663e665843 | ||
|
|
db988f42a7 | ||
|
|
53ae03ebe9 | ||
|
|
29b82d20a4 | ||
|
|
35c1d8cefc | ||
|
|
55925b6e25 | ||
|
|
96affd683a | ||
|
|
c161ce3f7c | ||
|
|
23f339f1b4 | ||
|
|
989cd4233e | ||
|
|
d6f7b573aa | ||
|
|
f14ba904d7 | ||
|
|
2c8495b4bb | ||
|
|
a239c7439f | ||
|
|
31b72da84a | ||
|
|
028011e59a | ||
|
|
65b495af58 | ||
|
|
1d6d6d5228 | ||
|
|
12b195f9d5 | ||
|
|
cf4cc9b148 | ||
|
|
786052c7d3 | ||
|
|
9627a75b07 | ||
|
|
e63daca92e | ||
|
|
8a15537c6e | ||
|
|
2510edeb71 | ||
|
|
dc2463d9a9 | ||
|
|
ffef5d26b6 | ||
|
|
c5716715d5 | ||
|
|
a11c20e26a | ||
|
|
4dd17a7c9e | ||
|
|
2c681d7ba1 | ||
|
|
f3a7c346dd | ||
|
|
533aff3a6a | ||
|
|
86b6790b6a | ||
|
|
34d02f249b | ||
|
|
57f751a864 | ||
|
|
093ffe9f16 | ||
|
|
75ec7e4e00 | ||
|
|
3377044ebe | ||
|
|
257fded70c | ||
|
|
f663bcd6b2 | ||
|
|
ea776c287b | ||
|
|
aab1ec5c43 | ||
|
|
2a8facafde | ||
|
|
edea0d431b | ||
|
|
74d0b5bf7c | ||
|
|
c9a5a6b83a | ||
|
|
3b4a6679a6 | ||
|
|
695695c852 | ||
|
|
ee200aaa8c | ||
|
|
d60f9d0d4b | ||
|
|
e81156b873 | ||
|
|
b76d16c7c7 | ||
|
|
14d2e16b60 | ||
|
|
00cd988438 | ||
|
|
8a30edcde8 | ||
|
|
925ffbce7f | ||
|
|
ef3f7ecc19 | ||
|
|
cd3068b4eb | ||
|
|
3b297f58f7 | ||
|
|
ff9f3275de | ||
|
|
c9937f4a2b | ||
|
|
7ebb7ca580 | ||
|
|
1eb33966b1 | ||
|
|
28c7fe60b6 | ||
|
|
005a54a853 | ||
|
|
01577a3af4 | ||
|
|
0048bcbd71 | ||
|
|
380c8ec2c9 | ||
|
|
76f5396077 | ||
|
|
86209e1a92 | ||
|
|
ef0f3ba905 | ||
|
|
2038f4d45a | ||
|
|
193604c837 | ||
|
|
9e4065fa73 | ||
|
|
74ce5e9e13 | ||
|
|
558b4ac1f0 | ||
|
|
0e3ca4c63e | ||
|
|
914ad1ec2e | ||
|
|
c6e77f248d | ||
|
|
1cefe14424 | ||
|
|
5e34fb3597 | ||
|
|
cddd6b46d8 | ||
|
|
537b260349 | ||
|
|
c4416b224d | ||
|
|
8223aca09b | ||
|
|
2b698888ce | ||
|
|
187a6d198f | ||
|
|
eb7d36ae0d | ||
|
|
742abc71c7 | ||
|
|
c15e464320 | ||
|
|
774f770056 | ||
|
|
cf4bccf765 | ||
|
|
68b49f74c4 | ||
|
|
f36b8fd7b2 | ||
|
|
0eddee449d | ||
|
|
67491a4222 | ||
|
|
c9b2210fcf | ||
|
|
92a427437c | ||
|
|
7101e583d6 | ||
|
|
a165cc0535 | ||
|
|
68d159ea9d | ||
|
|
3cd035ba3b | ||
|
|
e92d74958c | ||
|
|
016a59e3a1 | ||
|
|
8b5cb8df99 | ||
|
|
185cb13278 | ||
|
|
ba4d83af3e | ||
|
|
e2c68fce89 | ||
|
|
e657b73f30 | ||
|
|
ff051f8f5d | ||
|
|
0489d06c24 | ||
|
|
a29ce78651 | ||
|
|
8fbae77770 | ||
|
|
a06f84fcc6 | ||
|
|
8bd5681651 | ||
|
|
852679c369 | ||
|
|
a3993465fe | ||
|
|
fec795cd29 | ||
|
|
f50bfb94b5 | ||
|
|
e4c3067617 | ||
|
|
4b1cd45472 | ||
|
|
cc63760587 | ||
|
|
f7721ac37c | ||
|
|
2482bdf22b | ||
|
|
19cf9bd062 | ||
|
|
0d9a78a852 | ||
|
|
071ca00574 | ||
|
|
5dde3cd3bd | ||
|
|
ec13fa3f4a | ||
|
|
229323e13a | ||
|
|
d3cf040c90 | ||
|
|
b21ad07767 | ||
|
|
45ab9d5fd6 | ||
|
|
99fd42404a | ||
|
|
9a18db8a80 | ||
|
|
d1a98ccff4 | ||
|
|
9ca8d9e21a | ||
|
|
9423d382fb | ||
|
|
7d303ae861 | ||
|
|
0a3c6dbda9 | ||
|
|
ca70ca7e26 | ||
|
|
4a5bc89862 | ||
|
|
b564e7ca59 | ||
|
|
2045b4d932 | ||
|
|
8f0df86937 | ||
|
|
866c253e0e | ||
|
|
8e3c56b912 | ||
|
|
0107b19124 | ||
|
|
9a358d2d33 | ||
|
|
847a262efd | ||
|
|
fe153ad2a4 | ||
|
|
fabf45f5fc | ||
|
|
a7fd14096c | ||
|
|
090f2ffb82 | ||
|
|
e540e5b8ec | ||
|
|
df06976e73 | ||
|
|
53a6aea216 | ||
|
|
ac7703f65f | ||
|
|
77d04c03e3 | ||
|
|
6a76298740 | ||
|
|
5308eb7045 | ||
|
|
b728cb6d4e | ||
|
|
77a5f888be | ||
|
|
6b27290c68 | ||
|
|
8a7e2e3479 | ||
|
|
ce14c543d1 | ||
|
|
a4ce10df80 | ||
|
|
42cc4a406b | ||
|
|
1862075652 | ||
|
|
a81e4351a2 | ||
|
|
9d6f236728 | ||
|
|
f08c6e4fe6 | ||
|
|
fc0f8d0359 | ||
|
|
be17a4b6c1 | ||
|
|
e673d865fb | ||
|
|
e9530ce97b | ||
|
|
bdac2ba9dd | ||
|
|
aba67ecf44 | ||
|
|
1fd24791a7 | ||
|
|
a19e73d8ae | ||
|
|
d74b8567cf | ||
|
|
00d82e34df | ||
|
|
058050f22c | ||
|
|
4a5b0cde13 | ||
|
|
5e874a89b9 | ||
|
|
8db41b7adb | ||
|
|
ab4cba14c8 | ||
|
|
03abc6edf4 | ||
|
|
d291d3c8c0 | ||
|
|
0fe28855c5 | ||
|
|
0c4d47c6d5 | ||
|
|
d62f7c6b60 | ||
|
|
e7912dee9b | ||
|
|
e9d795b025 | ||
|
|
e39c93a2f3 | ||
|
|
8b1900e5df | ||
|
|
ec6f15b0f5 | ||
|
|
1f99899408 | ||
|
|
5c3a9a1a3e | ||
|
|
a223063923 | ||
|
|
6ab8b2aab4 | ||
|
|
2148943fff | ||
|
|
7a2b4cb9a1 | ||
|
|
fed5c12d9a | ||
|
|
37ef490fc6 | ||
|
|
d9fed5cdfd | ||
|
|
966670645a | ||
|
|
ca2aa4880f | ||
|
|
4b8325f381 | ||
|
|
c1f8b201a1 | ||
|
|
19964f5dc8 | ||
|
|
9f4d44bc49 | ||
|
|
10541c8fc8 | ||
|
|
e9a4bcbcc6 | ||
|
|
03910925f0 | ||
|
|
8e93991634 | ||
|
|
0512beca9d | ||
|
|
d9f0446b1f | ||
|
|
2323da3a68 | ||
|
|
94bbb46ca6 | ||
|
|
f7f8692730 | ||
|
|
834a789bb9 | ||
|
|
e4c262b804 | ||
|
|
108a51b110 | ||
|
|
b3ac323a44 | ||
|
|
57de61084e | ||
|
|
223b773e03 | ||
|
|
928ce5e326 | ||
|
|
e8a9caa3dd | ||
|
|
af90da1531 | ||
|
|
d5b3d97c23 | ||
|
|
c98f792ff8 | ||
|
|
50c37c75d1 | ||
|
|
7139eef4cf | ||
|
|
32f4606cec | ||
|
|
ac477f3c9a | ||
|
|
47fcbfdc51 | ||
|
|
f4519c520a | ||
|
|
c1fd7ed6e2 | ||
|
|
428a2fdedd | ||
|
|
e1b258f39f | ||
|
|
fbcdf78cbd | ||
|
|
8fef23a525 | ||
|
|
35a374efe0 | ||
|
|
d9ed55f017 | ||
|
|
7d34e55a71 | ||
|
|
ffac0b02e7 | ||
|
|
326b7b794b | ||
|
|
a2e8ef77e2 | ||
|
|
db50cf7049 | ||
|
|
1df75da918 | ||
|
|
bad4b040cc | ||
|
|
ca145a6d5a | ||
|
|
ae65c236c5 | ||
|
|
d316f70450 | ||
|
|
73a7747a9c | ||
|
|
6569bfc85e | ||
|
|
e1a4bcbdfd | ||
|
|
ede0c22a67 | ||
|
|
b13af0750f | ||
|
|
720302a640 | ||
|
|
a7f3158185 | ||
|
|
64e9b0ee46 | ||
|
|
8f41da2216 | ||
|
|
fa6c20a02d | ||
|
|
1b19c28c79 | ||
|
|
90e921f7a7 | ||
|
|
4c882e731f | ||
|
|
1498ccac2a | ||
|
|
50a80261dc | ||
|
|
a610352271 | ||
|
|
d277a1196b | ||
|
|
e8bad1e12a | ||
|
|
101440c199 | ||
|
|
f0034495fa | ||
|
|
ac4dd9d665 | ||
|
|
be0a9a7277 | ||
|
|
1dd658d1d0 | ||
|
|
20049caaba | ||
|
|
3865b6ad8f | ||
|
|
ec2f9ef4e8 | ||
|
|
9322eee80a | ||
|
|
43587af01a | ||
|
|
3ec10ea174 | ||
|
|
79a4b7a236 | ||
|
|
26b79ac90e | ||
|
|
0d6a6c76ea | ||
|
|
8460d5617c | ||
|
|
0e75fef1de | ||
|
|
efdbede7ab | ||
|
|
ec7d7a5b14 | ||
|
|
16fa255f48 | ||
|
|
7854a52a6b | ||
|
|
48410943cb | ||
|
|
c050ec4e57 | ||
|
|
81c441f885 | ||
|
|
2f3ad48c9b | ||
|
|
8bb6bf6818 | ||
|
|
37a06f4dcf | ||
|
|
c0bd2eb398 | ||
|
|
5f3d59f0ac | ||
|
|
3b5a8858c2 | ||
|
|
9bf283c085 | ||
|
|
79354243e3 | ||
|
|
8c32c09807 | ||
|
|
c175e53564 | ||
|
|
f0a141f799 | ||
|
|
276eb4402b | ||
|
|
2addec8ea1 | ||
|
|
2aa18b9097 | ||
|
|
3dbed54294 | ||
|
|
07c5e90601 | ||
|
|
6bc520ab95 | ||
|
|
24deb1a7fe | ||
|
|
efc2237e5a | ||
|
|
d067a037cc | ||
|
|
44fb5275c1 | ||
|
|
3f7f520036 | ||
|
|
e0447c6ddd | ||
|
|
98859c885e | ||
|
|
5a0275c247 | ||
|
|
ea1734773b | ||
|
|
6844dafeca | ||
|
|
57b90d2d98 | ||
|
|
66a490c27c | ||
|
|
0ff396c34f | ||
|
|
4d8a6f6fea | ||
|
|
456a244d62 | ||
|
|
e24cc2e77b | ||
|
|
3dce41b61a | ||
|
|
c39bb3ebc4 | ||
|
|
6529658ad8 | ||
|
|
bf7b6fbbdb | ||
|
|
cbca6586e7 | ||
|
|
5a2cbe239f | ||
|
|
c3407ed097 | ||
|
|
2cb1f93894 | ||
|
|
13c584d325 | ||
|
|
cba3b8291a | ||
|
|
7798054b58 | ||
|
|
4ea2331e3d | ||
|
|
5df89dafef | ||
|
|
1254a453b9 | ||
|
|
92a81252cb | ||
|
|
49c88e23af | ||
|
|
7874d5a40b | ||
|
|
2151f84d59 | ||
|
|
1e3b6816a8 | ||
|
|
ff7e826b82 | ||
|
|
0b08ae581e | ||
|
|
7e75e1075e | ||
|
|
8b97a1aee2 | ||
|
|
d3672493cc | ||
|
|
55f5cee86b | ||
|
|
729807203a | ||
|
|
13b5a4bf8c | ||
|
|
64c293f8a4 | ||
|
|
f3f838cc01 | ||
|
|
7799423f24 | ||
|
|
5749dc49d8 | ||
|
|
dd8c8c0802 | ||
|
|
5092634103 | ||
|
|
82d4ebe53a | ||
|
|
12ff91c1c9 | ||
|
|
8a9289996a | ||
|
|
98183e4743 | ||
|
|
24d5ec0783 | ||
|
|
911b1a0428 | ||
|
|
62c5bc6058 | ||
|
|
4d8d513e16 | ||
|
|
3aed7de0c4 | ||
|
|
af8c6ccb4b | ||
|
|
b87686dfa0 | ||
|
|
1b83ee78a4 | ||
|
|
4bd4c5e06d | ||
|
|
70e62b8612 | ||
|
|
a9b3700c6e | ||
|
|
3f5c6d7a89 | ||
|
|
77d098e92d | ||
|
|
22428a7546 | ||
|
|
47ce736abe | ||
|
|
9445b3f057 | ||
|
|
b9d1d45dfd | ||
|
|
2e7f53f1f0 | ||
|
|
e6ebc41a07 | ||
|
|
0bf6796b76 | ||
|
|
614cab5d68 | ||
|
|
da56959a9a | ||
|
|
93840f8610 | ||
|
|
cfe84423c9 | ||
|
|
bfa1d12fba | ||
|
|
8be95af480 | ||
|
|
8d4cb85285 | ||
|
|
d813805f77 | ||
|
|
34bfdf193a | ||
|
|
e6ef00233e | ||
|
|
f2bef0447a | ||
|
|
8621e3b5bd | ||
|
|
2cd5e55581 | ||
|
|
8fcf21fefc | ||
|
|
e11cafbd4f | ||
|
|
f587fa1cd7 | ||
|
|
7e1fcb55b3 | ||
|
|
1afbb53661 | ||
|
|
966c9ea63c | ||
|
|
17199b0879 | ||
|
|
400500a3af | ||
|
|
2d25348f63 | ||
|
|
88fdb303ff | ||
|
|
23ee619fc5 | ||
|
|
b4172e5151 | ||
|
|
7f23dac6dc | ||
|
|
7b8c96612f | ||
|
|
20ce0b9952 | ||
|
|
8aa87ec441 | ||
|
|
0157365872 | ||
|
|
20f63e588e | ||
|
|
dfe8c5a2e9 | ||
|
|
a7763c06f9 | ||
|
|
0d8c9fcb18 | ||
|
|
f27e5d439c | ||
|
|
b7c94be688 | ||
|
|
fbf21efd24 | ||
|
|
042914de75 | ||
|
|
fa30ebfbe5 | ||
|
|
b979fc1bcd | ||
|
|
30466bccef | ||
|
|
8c99a51993 | ||
|
|
54255ee32e | ||
|
|
3faf5d3857 | ||
|
|
4b5172d287 | ||
|
|
5bf63bfbf1 | ||
|
|
8805a7b509 | ||
|
|
4c93ccab5a | ||
|
|
83dffc70af | ||
|
|
c9ce43f59f | ||
|
|
5bd407b278 | ||
|
|
6150da3df9 | ||
|
|
f01cb8cc16 | ||
|
|
887eac0219 | ||
|
|
12924477a5 | ||
|
|
59e2c87b4b | ||
|
|
87710a1cc2 | ||
|
|
5ce1a965e0 | ||
|
|
ffab950e0c | ||
|
|
63ebd9d12e | ||
|
|
5687323cd2 | ||
|
|
08251fbc54 | ||
|
|
8e157ccb23 | ||
|
|
c879209661 | ||
|
|
e444e737b7 | ||
|
|
521aaf3501 | ||
|
|
24d78177ee | ||
|
|
57830e43ee | ||
|
|
102d3f30c4 | ||
|
|
f15ec9a59b | ||
|
|
0920bb0872 | ||
|
|
e68fee3984 | ||
|
|
1823a5979a | ||
|
|
5bd330e76c | ||
|
|
b3b6a98451 | ||
|
|
f07f09a373 | ||
|
|
b2d94f9af2 | ||
|
|
d105769926 | ||
|
|
9069ee957c | ||
|
|
90e64bc620 | ||
|
|
a5cb0f77d1 | ||
|
|
24fbd1f1d5 | ||
|
|
1583efda69 | ||
|
|
c0c228b758 | ||
|
|
056c4e2c98 | ||
|
|
0f879d02a4 | ||
|
|
1dd0c3d49f | ||
|
|
e7ae4e4645 | ||
|
|
6cb4cac5cd | ||
|
|
38b5812c48 | ||
|
|
723aea8369 | ||
|
|
327abdba0b | ||
|
|
e40513e97f | ||
|
|
dbdc4d62d0 | ||
|
|
ceec2393cf | ||
|
|
c087525eda | ||
|
|
05032c8693 | ||
|
|
d08425a0a5 | ||
|
|
bc982e65cf | ||
|
|
8736a5be2a | ||
|
|
7e436006be | ||
|
|
d694f298d8 | ||
|
|
c47b75312d | ||
|
|
a0ebfa64d9 | ||
|
|
6e8ef5b6f2 | ||
|
|
63d56c532d | ||
|
|
357fb4f143 | ||
|
|
10b1017702 | ||
|
|
ee64a22045 | ||
|
|
5593c63e12 | ||
|
|
74abc5ad2f | ||
|
|
018a89c7a1 | ||
|
|
7b3686861f | ||
|
|
538c0cd225 | ||
|
|
70bced5dcf | ||
|
|
ead2d32be8 | ||
|
|
9e11f67f0d | ||
|
|
8e4f3a6f15 | ||
|
|
e220812f2f | ||
|
|
19ee495750 | ||
|
|
7e9760de10 | ||
|
|
59850c1ce1 | ||
|
|
57aa8997bd | ||
|
|
317d1ecb2c | ||
|
|
fcadeb50c0 | ||
|
|
650e07ebd9 | ||
|
|
16be70cbbf | ||
|
|
bc31c1280e | ||
|
|
a3327f0fbd | ||
|
|
5b69a9cd83 | ||
|
|
d6d0bb0542 | ||
|
|
32d0ac1355 | ||
|
|
59bf9ca58c | ||
|
|
11bd50f2b2 | ||
|
|
78e03c466c | ||
|
|
77c2ac3fcd | ||
|
|
56c08eb302 | ||
|
|
6053ca4f69 | ||
|
|
27a5f2c4fa | ||
|
|
72e983670e | ||
|
|
a2e1be0346 | ||
|
|
2c1e955de7 | ||
|
|
54e716afdc | ||
|
|
05454123d4 | ||
|
|
f429f4dcab | ||
|
|
8ea8cff491 | ||
|
|
111d3792e0 | ||
|
|
484f8a4cc2 | ||
|
|
4708fb23c0 | ||
|
|
d4ff27180b | ||
|
|
af8661405b | ||
|
|
70e05c67ce | ||
|
|
dab0cf6428 | ||
|
|
2117fbdae3 | ||
|
|
1d07bbbef2 | ||
|
|
70da0762f7 | ||
|
|
e5d032982e | ||
|
|
03a3b1ca39 | ||
|
|
a3854d042e | ||
|
|
07f0de6a8a | ||
|
|
afbf99c846 | ||
|
|
d4ca337e6b | ||
|
|
04ce5376a8 | ||
|
|
aaa4bf75d3 | ||
|
|
e816d592e8 | ||
|
|
3879bebc37 | ||
|
|
95e04e3874 | ||
|
|
d64bd30690 | ||
|
|
8f92a49dfd | ||
|
|
c0b4121ff2 | ||
|
|
ec92739022 | ||
|
|
d994379173 | ||
|
|
f70ce707e2 | ||
|
|
34d2a1465c | ||
|
|
f8e753e19c | ||
|
|
b1f8b53d20 | ||
|
|
158e2312ea | ||
|
|
23dd7f4527 | ||
|
|
475a181028 | ||
|
|
15ed47921f | ||
|
|
3a67c13b5d | ||
|
|
9dcddc2249 | ||
|
|
92e781baa1 | ||
|
|
9a9a7daef0 | ||
|
|
741c74e427 | ||
|
|
45cc488cef | ||
|
|
0435026474 | ||
|
|
68149f2039 | ||
|
|
5345044edf | ||
|
|
776423bbf7 | ||
|
|
6fe3b20962 | ||
|
|
3f4abe97bd | ||
|
|
aff90c2252 | ||
|
|
33eaaadd01 | ||
|
|
eaf545e24c | ||
|
|
c3d20373ee | ||
|
|
851a7288a9 | ||
|
|
49d1a4c562 | ||
|
|
51a3938b04 | ||
|
|
0cd660462f | ||
|
|
6237380b01 | ||
|
|
b23ace27db | ||
|
|
aa170a7eff | ||
|
|
95fdff3feb | ||
|
|
40a562f26d | ||
|
|
6096dc5f94 | ||
|
|
7d9ee5d6d5 | ||
|
|
1547692d18 | ||
|
|
9c39d5720f | ||
|
|
c0489abcdb | ||
|
|
69129c2e93 | ||
|
|
9684c99dd3 | ||
|
|
0619b525b9 | ||
|
|
dfbe65e8cd | ||
|
|
bdfb31420a | ||
|
|
107e57484f | ||
|
|
39b850c6cf | ||
|
|
3621d54e57 | ||
|
|
5a62ab3ef1 | ||
|
|
2f8983e2f6 | ||
|
|
7b8ba871a9 | ||
|
|
4e58855a4a | ||
|
|
52f0300505 | ||
|
|
02b1aea291 | ||
|
|
d9c4c96bf2 | ||
|
|
1766bd8a08 | ||
|
|
c7a976972f | ||
|
|
b4bbfe8c05 | ||
|
|
e0670557b4 | ||
|
|
3714d524c3 | ||
|
|
2bb93784c6 | ||
|
|
540a40e2d9 | ||
|
|
67f3bc9101 | ||
|
|
ea90a3a9a1 | ||
|
|
e9331dc5cf | ||
|
|
1c7f21852f | ||
|
|
ae2345b742 | ||
|
|
038946288c | ||
|
|
d23798a296 | ||
|
|
eebb00193d | ||
|
|
1d2fc446bd | ||
|
|
fc9e28ea37 | ||
|
|
4953e84902 | ||
|
|
201033d83b | ||
|
|
8692c6fc0d | ||
|
|
f04782785f | ||
|
|
56d8185650 | ||
|
|
3e36cad1c1 | ||
|
|
336ddb8011 | ||
|
|
7ccf7807b3 | ||
|
|
3b97940fb3 | ||
|
|
d39dcd6d9d | ||
|
|
38ba412729 | ||
|
|
e12eb5e7f6 | ||
|
|
111e5ed0a2 | ||
|
|
e197968734 | ||
|
|
7610d39413 | ||
|
|
28b59a0be7 | ||
|
|
cce11a724c | ||
|
|
b118806c69 | ||
|
|
21c60922e3 | ||
|
|
7f618184ad | ||
|
|
9471f16c79 | ||
|
|
4f43a4b30f | ||
|
|
5b42c76951 | ||
|
|
273c2b5c25 | ||
|
|
3ad9349f09 | ||
|
|
0d84d52e37 | ||
|
|
e35d49c4d0 | ||
|
|
6bfa8546bb | ||
|
|
8365a7aab4 | ||
|
|
72800f176e | ||
|
|
47addd87ac | ||
|
|
a8b3b5f11c | ||
|
|
79e1fcfdda | ||
|
|
f24b8f2a4a | ||
|
|
9e3189f1f4 | ||
|
|
d8135c9e6e | ||
|
|
b109155528 | ||
|
|
96fd103073 | ||
|
|
bfe0bf695b | ||
|
|
c2cf04086a | ||
|
|
d1cda00b36 | ||
|
|
372b615ace | ||
|
|
4606baee07 | ||
|
|
2f4faf306d | ||
|
|
a1b952f4b0 | ||
|
|
53ca4118bd | ||
|
|
a1359ac3ab | ||
|
|
4bae87764f | ||
|
|
9da054095c | ||
|
|
9daf0140e5 | ||
|
|
b84ff1dd32 | ||
|
|
57d6724186 | ||
|
|
df11512f85 | ||
|
|
140335b99f | ||
|
|
b05b5649df | ||
|
|
04b32d6a8a | ||
|
|
9d42a40a9f | ||
|
|
06733c3ff5 | ||
|
|
704444a6e3 | ||
|
|
bbc0d440b8 | ||
|
|
7d4a0cfed0 | ||
|
|
1a1598c58c | ||
|
|
7586f613d5 | ||
|
|
2d85ff9465 | ||
|
|
0dd2e93e4c | ||
|
|
0e38f7215b | ||
|
|
027517a0c9 | ||
|
|
92b68c57b3 | ||
|
|
8156a61de8 | ||
|
|
7a2b0cc9c4 | ||
|
|
247e567422 | ||
|
|
102bf5200c | ||
|
|
b780dee3e8 | ||
|
|
fbb0c8d639 | ||
|
|
cc74bf5136 | ||
|
|
4b7e04f75a | ||
|
|
646268875e | ||
|
|
2060c7c39b | ||
|
|
3e0ff32bd8 | ||
|
|
b4bd52cc51 | ||
|
|
ae72a98224 | ||
|
|
ff477361b0 | ||
|
|
69c7c5de09 | ||
|
|
fe2d89007b | ||
|
|
623dbb73df | ||
|
|
0a0c11685f | ||
|
|
14abf0fda5 | ||
|
|
1b23c46138 | ||
|
|
d422d5753b | ||
|
|
8a251c411d | ||
|
|
39112d9052 | ||
|
|
ba29435f67 | ||
|
|
1ccf6a2c9e | ||
|
|
6cd3995754 | ||
|
|
0041e00a78 | ||
|
|
c346b257bb | ||
|
|
516b5e649f | ||
|
|
3c914c63a5 | ||
|
|
6c195ede54 | ||
|
|
de369de312 | ||
|
|
01ff0d4d62 | ||
|
|
0063953d16 | ||
|
|
517bdea754 | ||
|
|
3085d29af8 | ||
|
|
5cd4753bea | ||
|
|
33f996bb16 | ||
|
|
07c0d484ee | ||
|
|
22194efe68 | ||
|
|
7325f80bb2 | ||
|
|
32c6f643ae | ||
|
|
ff737cc648 | ||
|
|
fa42c99d82 | ||
|
|
e79e8993e6 | ||
|
|
f9e26d9871 | ||
|
|
b4e40cb59a | ||
|
|
fd4c5f54f0 | ||
|
|
0a77325916 | ||
|
|
da68aec339 | ||
|
|
cb55803a59 | ||
|
|
c61e0a078c | ||
|
|
f5af349bd6 | ||
|
|
8435351581 | ||
|
|
cd02630da8 | ||
|
|
08e8d30dd6 | ||
|
|
f6d83ba918 | ||
|
|
de2b0cd722 | ||
|
|
3021e5ca67 | ||
|
|
f845994839 | ||
|
|
69b90e0681 | ||
|
|
b2e06c3bf4 | ||
|
|
24400d5882 | ||
|
|
7f4de2dfdb | ||
|
|
b2cbc59e4c | ||
|
|
ca3660f6bf | ||
|
|
226a23d977 | ||
|
|
c423697c78 | ||
|
|
1c86a191da | ||
|
|
020d5b529e | ||
|
|
4c8b460fec | ||
|
|
036cc48a82 | ||
|
|
5e58aa4884 | ||
|
|
38568318a0 | ||
|
|
9153b17c92 | ||
|
|
f1c57a7f84 | ||
|
|
3ac9e3c888 | ||
|
|
4ae95d7ffc | ||
|
|
6325ffc3f1 | ||
|
|
7e303fa28f | ||
|
|
2b1695b1b0 | ||
|
|
86f362ce8e | ||
|
|
71e014caec | ||
|
|
987c209b40 | ||
|
|
3c4b255a3c | ||
|
|
65997f816b | ||
|
|
be51511d29 | ||
|
|
726674b2bd | ||
|
|
b5f9033d82 | ||
|
|
727af307c6 | ||
|
|
ff6d563b04 | ||
|
|
5441f77672 | ||
|
|
142e77abbb | ||
|
|
48ccf427af | ||
|
|
4299cd4446 | ||
|
|
ebde2ff899 | ||
|
|
948dc7b304 | ||
|
|
11526b6e9d | ||
|
|
4f21dc8a80 | ||
|
|
708f153288 | ||
|
|
0498bd40d9 | ||
|
|
2cbcf3f38b | ||
|
|
60b1cf2a83 | ||
|
|
237233b04b | ||
|
|
057b105fad | ||
|
|
3c541d7be3 | ||
|
|
6217b401f9 | ||
|
|
78eeb6e9ae | ||
|
|
04c25efe11 | ||
|
|
4ffab5b85f | ||
|
|
c7dc03fcb1 | ||
|
|
96931228af | ||
|
|
974db231a0 | ||
|
|
e36680d3bd | ||
|
|
b588a803bf | ||
|
|
39ad072a84 | ||
|
|
fce2d2d18b | ||
|
|
bbfb53d524 | ||
|
|
79671efd3a | ||
|
|
e27da17ff2 | ||
|
|
381c6a38b1 | ||
|
|
77e0c53613 | ||
|
|
f90d17cc4d | ||
|
|
077f9df15b | ||
|
|
c7bcf1a447 | ||
|
|
3ca4925709 | ||
|
|
9050a07540 | ||
|
|
8ed88280a6 | ||
|
|
fdc6e0af05 | ||
|
|
99112b5d4a | ||
|
|
e5a0414b05 | ||
|
|
4e182c7e9e | ||
|
|
0568000844 | ||
|
|
74250e434e | ||
|
|
21dff1c4e2 | ||
|
|
b025193de5 | ||
|
|
d5d0942a0d | ||
|
|
50c8a93a5e | ||
|
|
6ce2a03985 | ||
|
|
72029c2fc8 | ||
|
|
4d3356435f | ||
|
|
f4b8850002 | ||
|
|
aa60d2a688 | ||
|
|
9564c05cd5 | ||
|
|
6bf193af19 | ||
|
|
60025a3704 | ||
|
|
7c5ceb0c4c | ||
|
|
362c79140f | ||
|
|
f8f054b354 | ||
|
|
42ea2d0d1c | ||
|
|
acf16b5fb3 | ||
|
|
7c074b8516 | ||
|
|
2ba29a1907 | ||
|
|
fdaca1b5f3 | ||
|
|
eaf74f4f96 | ||
|
|
57347aacd7 | ||
|
|
24cfa3534f | ||
|
|
3cbe827464 | ||
|
|
efb064449f | ||
|
|
9e8db5b750 | ||
|
|
82ab006e58 | ||
|
|
8a2c2da805 | ||
|
|
80fa871f4a | ||
|
|
ca0988e1d0 | ||
|
|
b552e68c14 | ||
|
|
cdf14baa45 | ||
|
|
0d62c92947 | ||
|
|
e6fa2ee706 | ||
|
|
1526d89711 | ||
|
|
35352e0f48 | ||
|
|
278c7a2bc3 | ||
|
|
3ed6acd2d2 | ||
|
|
ce5d50e4ed | ||
|
|
e12c7d88b2 | ||
|
|
4ea7685a5b | ||
|
|
b3a4ec1bd2 | ||
|
|
e1d14e73b5 | ||
|
|
60c3861805 | ||
|
|
fcc0728a35 | ||
|
|
0ac566892d | ||
|
|
515092210f | ||
|
|
1c2e889820 | ||
|
|
fc8d881240 | ||
|
|
06f307ff77 | ||
|
|
43d52fa4c5 | ||
|
|
0f545e5a2b | ||
|
|
a431a73dab | ||
|
|
b053a65573 | ||
|
|
7411a88d5f | ||
|
|
33371ab55c | ||
|
|
d504318f2e | ||
|
|
f6d4e2565e | ||
|
|
a0427d29e4 | ||
|
|
4582ec518f | ||
|
|
9a324ecb42 | ||
|
|
65f6ea66f4 | ||
|
|
ee3f7e20f6 | ||
|
|
b9c033ae1a | ||
|
|
34a22a85ca | ||
|
|
4f085b8d2c | ||
|
|
05e92a51aa | ||
|
|
eaa9d8bdac | ||
|
|
c362895116 | ||
|
|
17b1ac5d03 | ||
|
|
1a51bf6304 | ||
|
|
12b2950bf2 | ||
|
|
84e479d94f | ||
|
|
b0648bfbd3 | ||
|
|
ddf7942aaa | ||
|
|
ed41d10a06 | ||
|
|
b7811d3269 | ||
|
|
9c2ed8d103 | ||
|
|
6c160b8856 | ||
|
|
4565f50efe | ||
|
|
ae604b4464 | ||
|
|
a712a5515d | ||
|
|
39bc82561a | ||
|
|
ebedc99ac1 | ||
|
|
af35b73b99 | ||
|
|
5017a1d895 | ||
|
|
4e2b2822f1 | ||
|
|
3a4b749c8a | ||
|
|
b735764898 | ||
|
|
59fe13772f | ||
|
|
3ec766abe3 | ||
|
|
69d9f322ee | ||
|
|
8e0670198b | ||
|
|
10e33b3536 | ||
|
|
ad064b4a0b | ||
|
|
586c36dd1d | ||
|
|
ad0f0562d8 | ||
|
|
ed5b8335b5 | ||
|
|
1692a76d28 | ||
|
|
1f82c7ba22 | ||
|
|
771e88951a | ||
|
|
720ed74413 | ||
|
|
404e4b0268 | ||
|
|
52eb347188 | ||
|
|
a2fff2628f | ||
|
|
b1efba0c70 | ||
|
|
2b0a1b7b14 | ||
|
|
ede3436b08 | ||
|
|
ec8d8a9774 | ||
|
|
0e8b65c537 | ||
|
|
ec17f4ebbe | ||
|
|
5784631fab | ||
|
|
786f3cdd13 | ||
|
|
4c222a482f | ||
|
|
76a3938d69 | ||
|
|
fb5e03b983 | ||
|
|
a682b0acb6 | ||
|
|
8f4229a61c | ||
|
|
656ac43735 | ||
|
|
26613bfa01 | ||
|
|
0288034c2f | ||
|
|
ddfab40e30 | ||
|
|
0aabfb09f9 | ||
|
|
b74bcc9d76 | ||
|
|
fdddd13106 | ||
|
|
ca989a95d3 | ||
|
|
a0d66fa1e6 | ||
|
|
b19b1c1298 | ||
|
|
d83b15febf | ||
|
|
291aaee977 | ||
|
|
fd771ea9fb | ||
|
|
7eb82b8651 | ||
|
|
a608ebaa50 | ||
|
|
8e109aec6b | ||
|
|
80cd142c96 | ||
|
|
ebe921e48f | ||
|
|
057b96006b | ||
|
|
a32abcd365 | ||
|
|
143d6ada8f | ||
|
|
d4054e35fe | ||
|
|
b6108eed52 | ||
|
|
eb8a132d23 | ||
|
|
735543d502 | ||
|
|
9bed6e1bf9 | ||
|
|
3eca5a42e6 | ||
|
|
46cbed621b | ||
|
|
4b30e40a91 | ||
|
|
6d73e5de05 | ||
|
|
ccce3d8526 | ||
|
|
461382ae94 | ||
|
|
8aba0643a5 | ||
|
|
3702c278e3 | ||
|
|
95d9835898 | ||
|
|
a4aca78722 | ||
|
|
5e1003bc81 | ||
|
|
0ccd91faea | ||
|
|
78f32259da | ||
|
|
7878f9660f | ||
|
|
5954d5235f | ||
|
|
51fc375b0d | ||
|
|
477ee9c8b9 | ||
|
|
8ca294c430 | ||
|
|
8eaf1387c7 | ||
|
|
f9e7bd2682 | ||
|
|
01a4897da5 | ||
|
|
4188faeac5 | ||
|
|
4e1f3a9ba3 | ||
|
|
7bfae39c5c | ||
|
|
e716c9ba4b | ||
|
|
dab1dc79a7 | ||
|
|
345501a72d | ||
|
|
c66a747045 | ||
|
|
bfc86776d5 | ||
|
|
8a4ee5942b | ||
|
|
b7a82288ad | ||
|
|
3e14f86f9e | ||
|
|
9a7cf73b3b | ||
|
|
6dbaae4c46 | ||
|
|
3819654c39 | ||
|
|
1ab0ac3ea2 | ||
|
|
b461e600e2 | ||
|
|
6bc5b07e3e | ||
|
|
fb5dc28921 | ||
|
|
b8d1060f0a | ||
|
|
399e026cc0 | ||
|
|
7017388e9e | ||
|
|
1ccbd1fb67 | ||
|
|
9891c4f30d | ||
|
|
2975bdc684 | ||
|
|
f9ada1cfba | ||
|
|
b66438eb80 | ||
|
|
528c151a55 | ||
|
|
a169d844c7 | ||
|
|
048169cbea | ||
|
|
9d16839420 | ||
|
|
508fdfea72 | ||
|
|
a37ea5acf3 | ||
|
|
8a65478801 | ||
|
|
e2c2263434 | ||
|
|
568dc56232 | ||
|
|
c518b7b8bf | ||
|
|
381f845287 | ||
|
|
594366a482 | ||
|
|
f2b64fd18f | ||
|
|
6547468af6 | ||
|
|
8d50d4f3fc | ||
|
|
b639447263 | ||
|
|
f4b4ea402e | ||
|
|
fd9e63da53 | ||
|
|
7f1dd05fa7 | ||
|
|
5df2e791c2 | ||
|
|
abf97cc232 | ||
|
|
333c050a1d | ||
|
|
775a25b7fd | ||
|
|
b8cd4b18b0 | ||
|
|
bcdbd8d169 | ||
|
|
e632c2ade3 | ||
|
|
d1b6f29d22 | ||
|
|
b558d0996a | ||
|
|
3f302594b8 | ||
|
|
f924fbddcf | ||
|
|
e07888e54c | ||
|
|
2c0280ba08 | ||
|
|
22299869ba | ||
|
|
e1f3eec9cc | ||
|
|
3fccc07479 | ||
|
|
d4b241c14e | ||
|
|
f68d8060ec | ||
|
|
6a56091213 | ||
|
|
2aa1c5da5d | ||
|
|
d110818cfe | ||
|
|
3bbee1ba2e | ||
|
|
3640303ce1 | ||
|
|
af4b8eb6c0 | ||
|
|
86bb7e5984 | ||
|
|
5de07ab721 | ||
|
|
db0a5e7516 | ||
|
|
b3dc1c380d | ||
|
|
13265cf7c7 | ||
|
|
06435535d3 | ||
|
|
f1610f6c1d | ||
|
|
abf959a0c9 | ||
|
|
fda7e0bb01 | ||
|
|
5a91dbc16c | ||
|
|
129714d077 | ||
|
|
6be79d79aa | ||
|
|
0c6ab61b22 | ||
|
|
9c437f9032 | ||
|
|
1a8f8c6262 | ||
|
|
c79b8aeaef | ||
|
|
2b42e910bf | ||
|
|
99f0b28d39 | ||
|
|
fceedada5c | ||
|
|
44a049e01e | ||
|
|
2f040a23c8 | ||
|
|
7cb6279ac0 | ||
|
|
ca6debcaf4 | ||
|
|
3d61e42282 | ||
|
|
17b0166e00 | ||
|
|
2def23063f | ||
|
|
daae7e1f5a | ||
|
|
67726e36b0 | ||
|
|
df7aa9a4f0 | ||
|
|
269a53b6af | ||
|
|
21ed939117 | ||
|
|
99ee0608f7 | ||
|
|
c89b522233 | ||
|
|
86b3007b94 | ||
|
|
9b7ad12481 | ||
|
|
b618a0b866 | ||
|
|
9e65a144fa | ||
|
|
f67ca20655 | ||
|
|
7987202243 | ||
|
|
266b2de150 | ||
|
|
f5657b5552 | ||
|
|
163a8e98bc | ||
|
|
3b6fc3fdc7 | ||
|
|
1c73c08298 | ||
|
|
6672ee9eb3 | ||
|
|
b660134a18 | ||
|
|
860684cc2f | ||
|
|
0a3aec020a | ||
|
|
232bc1bdee | ||
|
|
6957927194 | ||
|
|
51aaa02679 | ||
|
|
2eba779af5 | ||
|
|
87901baa28 | ||
|
|
e09c05f689 | ||
|
|
80983ca1ca | ||
|
|
1fdb24827f | ||
|
|
56a905c7d1 | ||
|
|
8468ff0fe1 | ||
|
|
978fab817c | ||
|
|
81e960eb74 | ||
|
|
07d0aee11a | ||
|
|
e30cd800e2 | ||
|
|
6b36b756eb | ||
|
|
b64e6cb813 | ||
|
|
14cdb01f35 | ||
|
|
3aa43dc31c | ||
|
|
787fd0f1be | ||
|
|
057a5d4898 | ||
|
|
5a57610039 | ||
|
|
e93a05b6e4 | ||
|
|
c08c222d5e | ||
|
|
df4f77024e | ||
|
|
6536b409df | ||
|
|
b64cee2ec2 | ||
|
|
08d41da916 | ||
|
|
66d86eccbe | ||
|
|
7330a6102f | ||
|
|
f3db3b3c13 | ||
|
|
a038ef3570 | ||
|
|
c4d1597f50 | ||
|
|
c1793d6106 | ||
|
|
ed5a6d74ad | ||
|
|
173142b16a | ||
|
|
0d629421c9 | ||
|
|
3a3a738478 | ||
|
|
3787f34286 | ||
|
|
16aee1f58a | ||
|
|
4e28c2571d | ||
|
|
edcc7c72d1 | ||
|
|
d210628c91 | ||
|
|
b05e8d46ec | ||
|
|
655794f44f | ||
|
|
c766f3f9ca | ||
|
|
917bd4192d | ||
|
|
6cf7fb1177 | ||
|
|
ba3d18a80e | ||
|
|
e5a0e21a53 | ||
|
|
fb3b943b07 | ||
|
|
32efa68f90 | ||
|
|
b2a196e01d | ||
|
|
c051904903 | ||
|
|
10e9d47b49 | ||
|
|
2ef2f9d71f | ||
|
|
cd537f822b | ||
|
|
a2d5b0fabe | ||
|
|
3d93c89fc5 | ||
|
|
6756e545f4 | ||
|
|
1b23348f30 | ||
|
|
715d808f14 | ||
|
|
5f4c3e6557 | ||
|
|
dbb5da14f4 | ||
|
|
82219b1fd5 | ||
|
|
2933d6b848 | ||
|
|
fee0e6c8b9 | ||
|
|
a6f7a9ce2b | ||
|
|
d065f297ab | ||
|
|
6b10f03b4a | ||
|
|
bcf4d20289 | ||
|
|
1606dae728 | ||
|
|
7fb55ce2bb | ||
|
|
fbffece1b5 | ||
|
|
7db2aa1c25 | ||
|
|
1c0223899c | ||
|
|
f8b7ea119f | ||
|
|
09cff0d2bd | ||
|
|
8cc4eaea9f | ||
|
|
4d8f96dd88 | ||
|
|
eea2de108d | ||
|
|
214625587c | ||
|
|
010963ce43 | ||
|
|
c459edac18 | ||
|
|
72899da44b | ||
|
|
eb65410b62 | ||
|
|
62065a9aea | ||
|
|
a7346ea49f | ||
|
|
4b9e12be50 | ||
|
|
46e1c34fcf | ||
|
|
9bbd71c9ab | ||
|
|
3bd5c16f39 | ||
|
|
e3542196c0 | ||
|
|
9c12237d2d | ||
|
|
a4aee8b24d | ||
|
|
4208fa9ad9 | ||
|
|
383b8a032e | ||
|
|
2dce137d92 | ||
|
|
2be066d057 | ||
|
|
d4434dfb67 | ||
|
|
92fd2df054 | ||
|
|
0099583bd3 | ||
|
|
c00167e91a | ||
|
|
917103710e | ||
|
|
50bbb34594 | ||
|
|
be7cacfbbe | ||
|
|
d665948dcf | ||
|
|
24ee765318 | ||
|
|
b083ef18e3 | ||
|
|
9c0596e627 | ||
|
|
097a62555e | ||
|
|
043bd71621 | ||
|
|
b1db696c10 | ||
|
|
2f041239cb | ||
|
|
cfcf02489d | ||
|
|
d8ab301aa8 | ||
|
|
4ab7b459df | ||
|
|
94b504c9e4 | ||
|
|
a3beda27fc | ||
|
|
7432fb04d6 | ||
|
|
939ec878a0 | ||
|
|
60242e96df | ||
|
|
d1f9b8184d | ||
|
|
c19bdc2d37 | ||
|
|
a095db0df7 | ||
|
|
7a41af2632 | ||
|
|
07dfccf967 | ||
|
|
5d347c01cf | ||
|
|
6a34da963b | ||
|
|
09cbcf8841 | ||
|
|
70a9ee3dd6 | ||
|
|
6f0aa801c8 | ||
|
|
21c8d57fca | ||
|
|
14a00d3825 | ||
|
|
8c28b59605 | ||
|
|
27ed525e03 | ||
|
|
98bc2b73bf | ||
|
|
b612512bb5 | ||
|
|
cf8dde2d68 | ||
|
|
4dfd1f54db | ||
|
|
7dc71cdc4a | ||
|
|
3e3bdd577c | ||
|
|
e2fd37e75b | ||
|
|
f4798297de | ||
|
|
2f3b461703 | ||
|
|
1be4e87f0b | ||
|
|
077216b582 | ||
|
|
584dd2863a | ||
|
|
f86b8e4535 | ||
|
|
2f39da7cdd | ||
|
|
5c04c22bcc | ||
|
|
f6937db7d6 | ||
|
|
bd9c629c4c | ||
|
|
8cda4fd73a | ||
|
|
8d58dc715b | ||
|
|
fca3e3a73f | ||
|
|
3552180143 | ||
|
|
13a7b8586a | ||
|
|
26591d4f22 | ||
|
|
4d42275d03 | ||
|
|
a530a111a5 | ||
|
|
84682eb862 | ||
|
|
6fb677c4f6 | ||
|
|
f8117a0799 | ||
|
|
0afa2d040a | ||
|
|
f950ec0c16 | ||
|
|
3370e60dd9 | ||
|
|
8b7c59a414 | ||
|
|
c00c18de6a | ||
|
|
6e4f69a54a | ||
|
|
54a93e5393 | ||
|
|
40fe6afdad | ||
|
|
89d71a960b | ||
|
|
f94964cd05 | ||
|
|
7bbc8eb16c | ||
|
|
f53abf4063 | ||
|
|
bb0c5f7a2f | ||
|
|
d395ed2d40 | ||
|
|
0ce05fa621 | ||
|
|
1fabd6bbf3 | ||
|
|
79a139ac63 | ||
|
|
0a693b70e4 | ||
|
|
20458f56d8 | ||
|
|
8e700bf92a | ||
|
|
9dfd24a334 | ||
|
|
81767a658d | ||
|
|
b4f8d68e2e | ||
|
|
fd056752da | ||
|
|
a7f99c8ee9 | ||
|
|
01365be82f | ||
|
|
77383f968d | ||
|
|
b1a61a6d51 | ||
|
|
d2328ac71a | ||
|
|
75d42ace31 | ||
|
|
360ab8310b | ||
|
|
fe80c15c4b | ||
|
|
a4e506510b | ||
|
|
e3452ba21b | ||
|
|
da28811c50 | ||
|
|
4b6f350369 | ||
|
|
3c13aa178b | ||
|
|
8afa1e800b | ||
|
|
4e241263ff | ||
|
|
738562e990 | ||
|
|
d3c88a8949 | ||
|
|
9902b604cb | ||
|
|
fbcc559cdb | ||
|
|
6057513cc7 | ||
|
|
205e501e42 | ||
|
|
bc1840e18f | ||
|
|
66f3ef06e8 | ||
|
|
ad7927a748 | ||
|
|
dfada0cc77 | ||
|
|
d02489fd9a | ||
|
|
2d6520d5d4 | ||
|
|
ac3946620c | ||
|
|
efc5122fb6 | ||
|
|
6936f0514f | ||
|
|
28071ac637 | ||
|
|
c82acdbb9e | ||
|
|
1d95fdaf6e | ||
|
|
9ec4ccc68f | ||
|
|
4df2f3d74f | ||
|
|
afc33f00ee | ||
|
|
57f545eed8 | ||
|
|
92d9cef071 | ||
|
|
17ffe166c2 | ||
|
|
e1bf74fca3 | ||
|
|
535d419590 | ||
|
|
712274997e | ||
|
|
976080462c | ||
|
|
56e07622c6 | ||
|
|
8ef7f6febb | ||
|
|
fb2acaff06 | ||
|
|
733c547a65 | ||
|
|
01168e1577 | ||
|
|
e4825dbd77 | ||
|
|
12eff09ff4 | ||
|
|
074ddf1ac6 | ||
|
|
ad994c9642 | ||
|
|
7bafe2e490 | ||
|
|
06bf918436 | ||
|
|
5de934810f | ||
|
|
ed41955522 | ||
|
|
e4a86d4653 | ||
|
|
1a2e02e267 | ||
|
|
e553ade090 | ||
|
|
3bc361178c | ||
|
|
374d16793f | ||
|
|
b095e33667 | ||
|
|
57ec183c09 | ||
|
|
70c2e86da3 | ||
|
|
a44ad08954 | ||
|
|
9ea600b634 | ||
|
|
8d05330cf7 | ||
|
|
ab424bbb35 | ||
|
|
69bc5fd04d | ||
|
|
d3dd49c403 | ||
|
|
8ce130de3c | ||
|
|
b3598163df | ||
|
|
5765cbd2de | ||
|
|
af7daae26b | ||
|
|
e64c0dee35 | ||
|
|
0f8fc3b924 | ||
|
|
211f0a2226 | ||
|
|
217b95da31 | ||
|
|
9babcac7a6 | ||
|
|
66020856b2 | ||
|
|
bb25f212b3 | ||
|
|
22f5e5fd3e | ||
|
|
b864fe7e23 | ||
|
|
9b83fe6b4c | ||
|
|
907a7068ce | ||
|
|
c2542bb7b7 | ||
|
|
1030cc97ca | ||
|
|
f4c5fa7ff4 | ||
|
|
d44d2784e6 | ||
|
|
0286be127e | ||
|
|
19b8278f91 | ||
|
|
6d95c5d15c | ||
|
|
1fda44cbc8 | ||
|
|
3b6a4fe4cd | ||
|
|
a10a1efc83 | ||
|
|
ff3cdbc3a0 | ||
|
|
4ad7d09ba5 | ||
|
|
bc2d60c11f | ||
|
|
da8403bcdd | ||
|
|
89763c9a0d | ||
|
|
4c03746926 | ||
|
|
b29241fc08 | ||
|
|
611d4bc6a1 | ||
|
|
52caf311bb | ||
|
|
0c28a18d96 | ||
|
|
71bb8cd537 | ||
|
|
4e2f6ebf39 | ||
|
|
3226b5315e | ||
|
|
f488f3fd03 | ||
|
|
c8b60538ed | ||
|
|
4235982fe6 | ||
|
|
aa3f31ac0a | ||
|
|
f2119f9961 | ||
|
|
0a280b6062 | ||
|
|
6692cbbe18 | ||
|
|
579dd74114 | ||
|
|
f5d84250a3 | ||
|
|
3b8a85c941 | ||
|
|
a0d2185199 | ||
|
|
9465c6d538 | ||
|
|
5cb18e9c6f | ||
|
|
cc8cf94cb2 | ||
|
|
27253f09b6 | ||
|
|
63a970a548 | ||
|
|
0f1d92e2cf | ||
|
|
94e0871603 | ||
|
|
ecd0f89254 | ||
|
|
93d43d4529 | ||
|
|
22960a5fdf | ||
|
|
a2d8f03092 | ||
|
|
93528be6b1 | ||
|
|
fe9cd0b4bc | ||
|
|
68d7e4a1b6 | ||
|
|
a43fd7a550 | ||
|
|
4a2ccd6fb8 | ||
|
|
72bcd5a4a5 | ||
|
|
93e89b3b7e | ||
|
|
ea5518f69e | ||
|
|
9d229791c6 | ||
|
|
63f2e96eea | ||
|
|
6284a4c534 | ||
|
|
f860493f23 | ||
|
|
6f34d08aed | ||
|
|
5f8dbcac06 | ||
|
|
b960f1d922 | ||
|
|
4172fe986e | ||
|
|
3ce024dd85 | ||
|
|
a895c59971 | ||
|
|
27cd830ec8 | ||
|
|
51eb4ebec1 | ||
|
|
b59c65e986 | ||
|
|
38492b2ea4 | ||
|
|
29ec409b52 | ||
|
|
795b3e9b68 | ||
|
|
dff201540f | ||
|
|
8f5753ba9f | ||
|
|
78af62a19a | ||
|
|
87d8ecda46 | ||
|
|
30788a98b1 | ||
|
|
d3e1f32362 | ||
|
|
b3ecdfd7bf | ||
|
|
5f4fcd5030 | ||
|
|
ea1d2a2409 | ||
|
|
e309ad884a | ||
|
|
a4c7e4c4eb | ||
|
|
13798d26c7 | ||
|
|
666e879925 | ||
|
|
a71bfc249d | ||
|
|
60e2a04322 | ||
|
|
52934851f2 | ||
|
|
aff2e47821 | ||
|
|
dea1027f97 | ||
|
|
cca02a4cf8 | ||
|
|
98fa065de7 | ||
|
|
0bd4901a17 | ||
|
|
6cc443ee45 | ||
|
|
ecd2332bb5 |
11
.gitattributes
vendored
11
.gitattributes
vendored
@@ -1,10 +1,9 @@
|
||||
*.zig text eol=lf
|
||||
*.txt text eol=lf
|
||||
langref.html.in text eol=lf
|
||||
|
||||
c_headers/* linguist-vendored
|
||||
deps/* linguist-vendored
|
||||
libc/glibc/* linguist-vendored
|
||||
libc/musl/* linguist-vendored
|
||||
libc/include/* linguist-vendored
|
||||
libcxx/* linguist-vendored
|
||||
libunwind/* linguist-vendored
|
||||
lib/include/* linguist-vendored
|
||||
lib/libc/* linguist-vendored
|
||||
lib/libcxx/* linguist-vendored
|
||||
lib/libunwind/* linguist-vendored
|
||||
|
||||
1
.github/FUNDING.yml
vendored
Normal file
1
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
github: [andrewrk]
|
||||
6320
CMakeLists.txt
6320
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
125
CONTRIBUTING.md
Normal file
125
CONTRIBUTING.md
Normal file
@@ -0,0 +1,125 @@
|
||||
## Contributing
|
||||
|
||||
### Start a Project Using Zig
|
||||
|
||||
One of the best ways you can contribute to Zig is to start using it for a
|
||||
personal project. Here are some great examples:
|
||||
|
||||
* [Oxid](https://github.com/dbandstra/oxid) - arcade style game
|
||||
* [TM35-Metronome](https://github.com/TM35-Metronome) - tools for modifying and randomizing Pokémon games
|
||||
* [trOS](https://github.com/sjdh02/trOS) - tiny aarch64 baremetal OS thingy
|
||||
|
||||
Without fail, these projects lead to discovering bugs and helping flesh out use
|
||||
cases, which lead to further design iterations of Zig. Importantly, each issue
|
||||
found this way comes with real world motivations, so it is easy to explain
|
||||
your reasoning behind proposals and feature requests.
|
||||
|
||||
Ideally, such a project will help you to learn new skills and add something
|
||||
to your personal portfolio at the same time.
|
||||
|
||||
### Spread the Word
|
||||
|
||||
Another way to contribute is to write about Zig, or speak about Zig at a
|
||||
conference, or do either of those things for your project which uses Zig.
|
||||
Here are some examples:
|
||||
|
||||
* [Iterative Replacement of C with Zig](http://tiehuis.github.io/blog/zig1.html)
|
||||
* [The Right Tool for the Right Job: Redis Modules & Zig](https://www.youtube.com/watch?v=eCHM8-_poZY)
|
||||
* [Writing a small ray tracer in Rust and Zig](https://nelari.us/post/raytracer_with_rust_and_zig/)
|
||||
|
||||
Zig is a brand new language, with no advertising budget. Word of mouth is the
|
||||
only way people find out about the project, and the more people hear about it,
|
||||
the more people will use it, and the better chance we have to take over the
|
||||
world.
|
||||
|
||||
### Finding Contributor Friendly Issues
|
||||
|
||||
Please note that issues labeled
|
||||
[Proposal](https://github.com/ziglang/zig/issues?q=is%3Aissue+is%3Aopen+label%3Aproposal)
|
||||
but do not also have the
|
||||
[Accepted](https://github.com/ziglang/zig/issues?q=is%3Aissue+is%3Aopen+label%3Aaccepted)
|
||||
label are still under consideration, and efforts to implement such a proposal
|
||||
have a high risk of being wasted. If you are interested in a proposal which is
|
||||
still under consideration, please express your interest in the issue tracker,
|
||||
providing extra insights and considerations that others have not yet expressed.
|
||||
The most highly regarded argument in such a discussion is a real world use case.
|
||||
|
||||
The issue label
|
||||
[Contributor Friendly](https://github.com/ziglang/zig/issues?q=is%3Aissue+is%3Aopen+label%3A%22contributor+friendly%22)
|
||||
exists to help you find issues that are **limited in scope and/or
|
||||
knowledge of Zig internals.**
|
||||
|
||||
### Editing Source Code
|
||||
|
||||
First, build the Stage 1 compiler as described in [the Building section](#building).
|
||||
|
||||
One modification you may want to make is adding `-DZIG_SKIP_INSTALL_LIB_FILES=ON`
|
||||
to the cmake line. If you use the build directory as a working directory to run
|
||||
tests with, zig will find the lib files in the source directory, and they will not
|
||||
be "installed" every time you run `make`. This will allow you to make modifications
|
||||
directly to the standard library, for example, and have them effective immediately.
|
||||
Note that if you already ran `make` or `make install` with the default cmake
|
||||
settings, there will already be a `lib/` directory in your build directory. When
|
||||
executed from the build directory, zig will find this instead of the source lib/
|
||||
directory. Remove the unwanted directory so that the desired one can be found.
|
||||
|
||||
To test changes, do the following from the build directory:
|
||||
|
||||
1. Run `make install` (on POSIX) or
|
||||
`msbuild -p:Configuration=Release INSTALL.vcxproj` (on Windows).
|
||||
2. `bin/zig build test` (on POSIX) or `bin\zig.exe build test` (on Windows).
|
||||
|
||||
That runs the whole test suite, which does a lot of extra testing that you
|
||||
likely won't always need, and can take upwards of 1 hour. This is what the
|
||||
CI server runs when you make a pull request. (Note: actually it runs a few
|
||||
more tests; keep reading.)
|
||||
|
||||
To save time, you can add the `--help` option to the `zig build` command and
|
||||
see what options are available. One of the most helpful ones is
|
||||
`-Dskip-release`. Adding this option to the command in step 2 above will take
|
||||
the time down from around 2 hours to about 6 minutes, and this is a good
|
||||
enough amount of testing before making a pull request.
|
||||
|
||||
Another example is choosing a different set of things to test. For example,
|
||||
`test-std` instead of `test` will only run the standard library tests, and
|
||||
not the other ones. Combining this suggestion with the previous one, you could
|
||||
do this:
|
||||
|
||||
`bin/zig build test-std -Dskip-release` (on POSIX) or
|
||||
`bin\zig.exe build test-std -Dskip-release` (on Windows).
|
||||
|
||||
This will run only the standard library tests, in debug mode only, for all
|
||||
targets (it will cross-compile the tests for non-native targets but not run
|
||||
them).
|
||||
|
||||
When making changes to the compiler source code, the most helpful test step to
|
||||
run is `test-behavior`. When editing documentation it is `docs`. You can find
|
||||
this information and more in the `--help` menu.
|
||||
|
||||
#### Testing Non-Native Architectures with QEMU
|
||||
|
||||
The Linux CI server additionally has qemu installed and sets `-Denable-qemu`.
|
||||
This provides test coverage for, e.g. aarch64 even on x86_64 machines. It's
|
||||
recommended for Linux users to install qemu and enable this testing option
|
||||
when editing the standard library or anything related to a non-native
|
||||
architecture.
|
||||
|
||||
##### glibc
|
||||
|
||||
Testing foreign architectures with dynamically linked glibc is one step trickier.
|
||||
This requires enabling `-Denable-foreign-glibc=/path/to/glibc/multi/install/glibcs`.
|
||||
This path is obtained by building glibc for multiple architectures. This
|
||||
process for me took an entire day to complete and takes up 65 GiB on my hard
|
||||
drive. The CI server does not provide this test coverage. Instructions for
|
||||
producing this path can be found
|
||||
[on the wiki](https://github.com/ziglang/zig/wiki/Updating-libc#glibc).
|
||||
Just the part with `build-many-glibcs.py`.
|
||||
|
||||
It's understood that most contributors will not have these tests enabled.
|
||||
|
||||
#### Testing Windows from a Linux Machine with Wine
|
||||
|
||||
When developing on Linux, another option is available to you: `-Denable-wine`.
|
||||
This will enable running behavior tests and std lib tests with Wine. It's
|
||||
recommended for Linux users to install Wine and enable this testing option
|
||||
when editing the standard library or anything Windows-related.
|
||||
170
README.md
170
README.md
@@ -1,140 +1,18 @@
|
||||

|
||||
|
||||
A programming language designed for robustness, optimality, and
|
||||
clarity.
|
||||
A general-purpose programming language designed for **robustness**,
|
||||
**optimality**, and **maintainability**.
|
||||
|
||||
[Download & Documentation](https://ziglang.org/download/)
|
||||
## Resources
|
||||
|
||||
## Feature Highlights
|
||||
* [Introduction](https://ziglang.org/#Introduction)
|
||||
* [Download & Documentation](https://ziglang.org/download)
|
||||
* [Community](https://github.com/ziglang/zig/wiki/Community)
|
||||
* [Contributing](https://github.com/ziglang/zig/blob/master/CONTRIBUTING.md)
|
||||
* [Frequently Asked Questions](https://github.com/ziglang/zig/wiki/FAQ)
|
||||
* [Community Projects](https://github.com/ziglang/zig/wiki/Community-Projects)
|
||||
|
||||
* Small, simple language. Focus on debugging your application rather than
|
||||
debugging knowledge of your programming language.
|
||||
* Ships with a build system that obviates the need for a configure script
|
||||
or a makefile. In fact, existing C and C++ projects may choose to depend on
|
||||
Zig instead of e.g. cmake.
|
||||
* A fresh take on error handling which makes writing correct code easier than
|
||||
writing buggy code.
|
||||
* Debug mode optimizes for fast compilation time and crashing with a stack trace
|
||||
when undefined behavior *would* happen.
|
||||
* ReleaseFast mode produces heavily optimized code. What other projects call
|
||||
"Link Time Optimization" Zig does automatically.
|
||||
* Compatible with C libraries with no wrapper necessary. Directly include
|
||||
C .h files and get access to the functions and symbols therein.
|
||||
* Provides standard library which competes with the C standard library and is
|
||||
always compiled against statically in source form. Zig binaries do not
|
||||
depend on libc unless explicitly linked.
|
||||
* Optional type instead of null pointers.
|
||||
* Safe unions, tagged unions, and C ABI compatible unions.
|
||||
* Generics so that one can write efficient data structures that work for any
|
||||
data type.
|
||||
* No header files required. Top level declarations are entirely
|
||||
order-independent.
|
||||
* Compile-time code execution. Compile-time reflection.
|
||||
* Partial compile-time function evaluation which eliminates the need for
|
||||
a preprocessor or macros.
|
||||
* The binaries produced by Zig have complete debugging information so you can,
|
||||
for example, use GDB, MSVC, or LLDB to debug your software.
|
||||
* Built-in unit tests with `zig test`.
|
||||
* Friendly toward package maintainers. Reproducible build, bootstrapping
|
||||
process carefully documented. Issues filed by package maintainers are
|
||||
considered especially important.
|
||||
* Cross-compiling is a primary use case.
|
||||
* In addition to creating executables, creating a C library is a primary use
|
||||
case. You can export an auto-generated .h file.
|
||||
|
||||
### Supported Targets
|
||||
|
||||
#### Tier 1 Support
|
||||
|
||||
* Not only can Zig generate machine code for these targets, but the standard
|
||||
library cross-platform abstractions have implementations for these targets.
|
||||
Thus it is practical to write a pure Zig application with no dependency on
|
||||
libc.
|
||||
* The CI server automatically tests these targets on every commit to master
|
||||
branch, and updates ziglang.org/download with links to pre-built binaries.
|
||||
* These targets have debug info capabilities and therefore produce stack
|
||||
traces on failed assertions.
|
||||
* ([coming soon](https://github.com/ziglang/zig/issues/514)) libc is available
|
||||
for this target even when cross compiling.
|
||||
|
||||
#### Tier 2 Support
|
||||
|
||||
* There may be some standard library implementations, but many abstractions
|
||||
will give an "Unsupported OS" compile error. One can link with libc or other
|
||||
libraries to fill in the gaps in the standard library.
|
||||
* These targets are known to work, but are not automatically tested, so there
|
||||
are occasional regressions.
|
||||
* Some tests may be disabled for these targets as we work toward Tier 1
|
||||
support.
|
||||
|
||||
#### Tier 3 Support
|
||||
|
||||
* The standard library has little to no knowledge of the existence of this
|
||||
target.
|
||||
* Because Zig is based on LLVM, it has the capability to build for these
|
||||
targets, and LLVM has the target enabled by default.
|
||||
* These targets are not frequently tested; one will likely need to contribute
|
||||
to Zig in order to build for these targets.
|
||||
* The Zig compiler might need to be updated with a few things such as
|
||||
- what sizes are the C integer types
|
||||
- C ABI calling convention for this target
|
||||
- bootstrap code and default panic handler
|
||||
* `zig targets` is guaranteed to include this target.
|
||||
|
||||
#### Tier 4 Support
|
||||
|
||||
* Support for these targets is entirely experimental.
|
||||
* LLVM may have the target as an experimental target, which means that you
|
||||
need to use Zig-provided binaries for the target to be available, or
|
||||
build LLVM from source with special configure flags. `zig targets` will
|
||||
display the target if it is available.
|
||||
* This target may be considered deprecated by an official party,
|
||||
[such as macosx/i386](https://support.apple.com/en-us/HT208436) in which
|
||||
case this target will remain forever stuck in Tier 4.
|
||||
* This target may only support `--emit asm` and cannot emit object files.
|
||||
|
||||
#### Support Table
|
||||
|
||||
| | freestanding | linux | macosx | windows | freebsd | netbsd | UEFI | other |
|
||||
|-------------|--------------|--------|--------|---------|---------|------- | -------|--------|
|
||||
|x86_64 | Tier 2 | Tier 1 | Tier 1 | Tier 1 | Tier 2 | Tier 2 | Tier 2 | Tier 3 |
|
||||
|i386 | Tier 2 | Tier 2 | Tier 4 | Tier 2 | Tier 3 | Tier 3 | Tier 3 | Tier 3 |
|
||||
|arm | Tier 2 | Tier 3 | Tier 3 | Tier 3 | Tier 3 | Tier 3 | Tier 3 | Tier 3 |
|
||||
|arm64 | Tier 2 | Tier 2 | Tier 3 | Tier 3 | Tier 3 | Tier 3 | Tier 3 | Tier 3 |
|
||||
|bpf | Tier 3 | Tier 3 | N/A | N/A | Tier 3 | Tier 3 | N/A | Tier 3 |
|
||||
|hexagon | Tier 3 | Tier 3 | N/A | N/A | Tier 3 | Tier 3 | N/A | Tier 3 |
|
||||
|mips | Tier 3 | Tier 3 | N/A | N/A | Tier 3 | Tier 3 | N/A | Tier 3 |
|
||||
|powerpc | Tier 3 | Tier 3 | N/A | N/A | Tier 3 | Tier 3 | N/A | Tier 3 |
|
||||
|amdgcn | Tier 3 | Tier 3 | N/A | N/A | Tier 3 | Tier 3 | N/A | Tier 3 |
|
||||
|sparc | Tier 3 | Tier 3 | N/A | N/A | Tier 3 | Tier 3 | N/A | Tier 3 |
|
||||
|s390x | Tier 3 | Tier 3 | N/A | N/A | Tier 3 | Tier 3 | N/A | Tier 3 |
|
||||
|lanai | Tier 3 | Tier 3 | N/A | N/A | Tier 3 | Tier 3 | N/A | Tier 3 |
|
||||
|wasm32 | Tier 3 | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
|
||||
|wasm64 | Tier 3 | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
|
||||
|avr | Tier 4 | Tier 4 | N/A | N/A | Tier 4 | Tier 4 | N/A | Tier 4 |
|
||||
|riscv32 | Tier 4 | Tier 4 | N/A | N/A | Tier 4 | Tier 4 | Tier 4 | Tier 4 |
|
||||
|riscv64 | Tier 4 | Tier 4 | N/A | N/A | Tier 4 | Tier 4 | Tier 4 | Tier 4 |
|
||||
|xcore | Tier 4 | Tier 4 | N/A | N/A | Tier 4 | Tier 4 | N/A | Tier 4 |
|
||||
|nvptx | Tier 4 | Tier 4 | N/A | N/A | Tier 4 | Tier 4 | N/A | Tier 4 |
|
||||
|msp430 | Tier 4 | Tier 4 | N/A | N/A | Tier 4 | Tier 4 | N/A | Tier 4 |
|
||||
|r600 | Tier 4 | Tier 4 | N/A | N/A | Tier 4 | Tier 4 | N/A | Tier 4 |
|
||||
|arc | Tier 4 | Tier 4 | N/A | N/A | Tier 4 | Tier 4 | N/A | Tier 4 |
|
||||
|tce | Tier 4 | Tier 4 | N/A | N/A | Tier 4 | Tier 4 | N/A | Tier 4 |
|
||||
|le | Tier 4 | Tier 4 | N/A | N/A | Tier 4 | Tier 4 | N/A | Tier 4 |
|
||||
|amdil | Tier 4 | Tier 4 | N/A | N/A | Tier 4 | Tier 4 | N/A | Tier 4 |
|
||||
|hsail | Tier 4 | Tier 4 | N/A | N/A | Tier 4 | Tier 4 | N/A | Tier 4 |
|
||||
|spir | Tier 4 | Tier 4 | N/A | N/A | Tier 4 | Tier 4 | N/A | Tier 4 |
|
||||
|kalimba | Tier 4 | Tier 4 | N/A | N/A | Tier 4 | Tier 4 | N/A | Tier 4 |
|
||||
|shave | Tier 4 | Tier 4 | N/A | N/A | Tier 4 | Tier 4 | N/A | Tier 4 |
|
||||
|renderscript | Tier 4 | Tier 4 | N/A | N/A | Tier 4 | Tier 4 | N/A | Tier 4 |
|
||||
|
||||
## Community
|
||||
|
||||
* IRC: `#zig` on Freenode ([Channel Logs](https://irclog.whitequark.org/zig/)).
|
||||
* Reddit: [/r/zig](https://www.reddit.com/r/zig)
|
||||
* Email list: [~andrewrk/ziglang@lists.sr.ht](https://lists.sr.ht/%7Eandrewrk/ziglang)
|
||||
|
||||
## Building
|
||||
## Building from Source
|
||||
|
||||
[](https://dev.azure.com/ziglang/zig/_build/latest?definitionId=1&branchName=master)
|
||||
|
||||
@@ -149,13 +27,18 @@ Note that you can
|
||||
|
||||
* cmake >= 2.8.5
|
||||
* gcc >= 5.0.0 or clang >= 3.6.0
|
||||
* LLVM, Clang, LLD development libraries == 8.x, compiled with the same gcc or clang version above
|
||||
* LLVM, Clang, LLD development libraries == 9.x, compiled with the same gcc or clang version above
|
||||
- Use the system package manager, or [build from source](https://github.com/ziglang/zig/wiki/How-to-build-LLVM,-libclang,-and-liblld-from-source#posix).
|
||||
|
||||
##### Windows
|
||||
|
||||
* cmake >= 2.8.5
|
||||
* Microsoft Visual Studio 2017 (version 15.8)
|
||||
* LLVM, Clang, LLD development libraries == 8.x, compiled with the same MSVC version above
|
||||
* cmake >= 3.15.3
|
||||
* Microsoft Visual Studio. Supported versions:
|
||||
- 2015 (version 14)
|
||||
- 2017 (version 15.8)
|
||||
- 2019 (version 16)
|
||||
* LLVM, Clang, LLD development libraries == 9.x
|
||||
- Use the [pre-built binaries](https://github.com/ziglang/zig/wiki/Building-Zig-on-Windows) or [build from source](https://github.com/ziglang/zig/wiki/How-to-build-LLVM,-libclang,-and-liblld-from-source#windows).
|
||||
|
||||
#### Instructions
|
||||
|
||||
@@ -165,21 +48,18 @@ Note that you can
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
||||
make install
|
||||
bin/zig build --build-file ../build.zig test
|
||||
```
|
||||
|
||||
##### MacOS
|
||||
|
||||
```
|
||||
brew install cmake llvm@8
|
||||
brew outdated llvm@8 || brew upgrade llvm@8
|
||||
brew install cmake llvm@9
|
||||
brew outdated llvm@9 || brew upgrade llvm@9
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_PREFIX_PATH=/usr/local/Cellar/llvm/8.0.0
|
||||
cmake .. -DCMAKE_PREFIX_PATH=$(brew --prefix llvm)
|
||||
make install
|
||||
bin/zig build --build-file ../build.zig test
|
||||
```
|
||||
|
||||
##### Windows
|
||||
@@ -195,7 +75,7 @@ Dependencies are the same as Stage 1, except now you can use stage 1 to compile
|
||||
Zig code.
|
||||
|
||||
```
|
||||
bin/zig build --build-file ../build.zig --prefix $(pwd)/stage2 install
|
||||
bin/zig build --prefix $(pwd)/stage2
|
||||
```
|
||||
|
||||
This produces `./stage2/bin/zig` which can be used for testing and development.
|
||||
@@ -214,11 +94,11 @@ use stage 1.
|
||||
#### Debug / Development Build
|
||||
|
||||
```
|
||||
./stage2/bin/zig build --build-file ../build.zig --prefix $(pwd)/stage3 install
|
||||
./stage2/bin/zig build --prefix $(pwd)/stage3
|
||||
```
|
||||
|
||||
#### Release / Install Build
|
||||
|
||||
```
|
||||
./stage2/bin/zig build --build-file ../build.zig install -Drelease-fast
|
||||
./stage2/bin/zig build install -Drelease
|
||||
```
|
||||
|
||||
146
build.zig
146
build.zig
@@ -2,28 +2,30 @@ const builtin = @import("builtin");
|
||||
const std = @import("std");
|
||||
const Builder = std.build.Builder;
|
||||
const tests = @import("test/tests.zig");
|
||||
const os = std.os;
|
||||
const BufMap = std.BufMap;
|
||||
const warn = std.debug.warn;
|
||||
const mem = std.mem;
|
||||
const ArrayList = std.ArrayList;
|
||||
const Buffer = std.Buffer;
|
||||
const io = std.io;
|
||||
const fs = std.fs;
|
||||
const InstallDirectoryOptions = std.build.InstallDirectoryOptions;
|
||||
|
||||
pub fn build(b: *Builder) !void {
|
||||
b.setPreferredReleaseMode(.ReleaseFast);
|
||||
const mode = b.standardReleaseOptions();
|
||||
|
||||
var docgen_exe = b.addExecutable("docgen", "doc/docgen.zig");
|
||||
|
||||
const rel_zig_exe = try os.path.relative(b.allocator, b.build_root, b.zig_exe);
|
||||
const langref_out_path = os.path.join(
|
||||
const rel_zig_exe = try fs.path.relative(b.allocator, b.build_root, b.zig_exe);
|
||||
const langref_out_path = fs.path.join(
|
||||
b.allocator,
|
||||
[][]const u8{ b.cache_root, "langref.html" },
|
||||
[_][]const u8{ b.cache_root, "langref.html" },
|
||||
) catch unreachable;
|
||||
var docgen_cmd = docgen_exe.run();
|
||||
docgen_cmd.addArgs([][]const u8{
|
||||
docgen_cmd.addArgs([_][]const u8{
|
||||
rel_zig_exe,
|
||||
"doc" ++ os.path.sep_str ++ "langref.html.in",
|
||||
"doc" ++ fs.path.sep_str ++ "langref.html.in",
|
||||
langref_out_path,
|
||||
});
|
||||
docgen_cmd.step.dependOn(&docgen_exe.step);
|
||||
@@ -34,7 +36,7 @@ pub fn build(b: *Builder) !void {
|
||||
const test_step = b.step("test", "Run all the tests");
|
||||
|
||||
// find the stage0 build artifacts because we're going to re-use config.h and zig_cpp library
|
||||
const build_info = try b.exec([][]const u8{
|
||||
const build_info = try b.exec([_][]const u8{
|
||||
b.zig_exe,
|
||||
"BUILD_INFO",
|
||||
});
|
||||
@@ -45,8 +47,6 @@ pub fn build(b: *Builder) !void {
|
||||
.llvm_config_exe = nextValue(&index, build_info),
|
||||
.lld_include_dir = nextValue(&index, build_info),
|
||||
.lld_libraries = nextValue(&index, build_info),
|
||||
.std_files = nextValue(&index, build_info),
|
||||
.c_header_files = nextValue(&index, build_info),
|
||||
.dia_guids_lib = nextValue(&index, build_info),
|
||||
.llvm = undefined,
|
||||
};
|
||||
@@ -55,7 +55,7 @@ pub fn build(b: *Builder) !void {
|
||||
var test_stage2 = b.addTest("src-self-hosted/test.zig");
|
||||
test_stage2.setBuildMode(builtin.Mode.Debug);
|
||||
|
||||
const fmt_build_zig = b.addFmt([][]const u8{"build.zig"});
|
||||
const fmt_build_zig = b.addFmt([_][]const u8{"build.zig"});
|
||||
|
||||
var exe = b.addExecutable("zig", "src-self-hosted/main.zig");
|
||||
exe.setBuildMode(mode);
|
||||
@@ -63,25 +63,39 @@ pub fn build(b: *Builder) !void {
|
||||
try configureStage2(b, test_stage2, ctx);
|
||||
try configureStage2(b, exe, ctx);
|
||||
|
||||
b.default_step.dependOn(&exe.step);
|
||||
addLibUserlandStep(b, mode);
|
||||
|
||||
const skip_release = b.option(bool, "skip-release", "Main test suite skips release builds") orelse false;
|
||||
const skip_release_small = b.option(bool, "skip-release-small", "Main test suite skips release-small builds") orelse skip_release;
|
||||
const skip_release_fast = b.option(bool, "skip-release-fast", "Main test suite skips release-fast builds") orelse skip_release;
|
||||
const skip_release_safe = b.option(bool, "skip-release-safe", "Main test suite skips release-safe builds") orelse skip_release;
|
||||
const skip_non_native = b.option(bool, "skip-non-native", "Main test suite skips non-native builds") orelse false;
|
||||
const skip_libc = b.option(bool, "skip-libc", "Main test suite skips tests that link libc") orelse false;
|
||||
const skip_self_hosted = b.option(bool, "skip-self-hosted", "Main test suite skips building self hosted compiler") orelse false;
|
||||
if (!skip_self_hosted) {
|
||||
test_step.dependOn(&exe.step);
|
||||
// TODO re-enable this after https://github.com/ziglang/zig/issues/2377
|
||||
//test_step.dependOn(&exe.step);
|
||||
}
|
||||
const verbose_link_exe = b.option(bool, "verbose-link", "Print link command for self hosted compiler") orelse false;
|
||||
exe.setVerboseLink(verbose_link_exe);
|
||||
|
||||
b.installArtifact(exe);
|
||||
installStdLib(b, ctx.std_files);
|
||||
installCHeaders(b, ctx.c_header_files);
|
||||
const only_install_lib_files = b.option(bool, "lib-files-only", "Only install library files") orelse false;
|
||||
if (!only_install_lib_files) {
|
||||
b.default_step.dependOn(&exe.step);
|
||||
exe.install();
|
||||
}
|
||||
|
||||
b.installDirectory(InstallDirectoryOptions{
|
||||
.source_dir = "lib",
|
||||
.install_dir = .Lib,
|
||||
.install_subdir = "zig",
|
||||
.exclude_extensions = [_][]const u8{ "test.zig", "README.md" },
|
||||
});
|
||||
|
||||
const test_filter = b.option([]const u8, "test-filter", "Skip tests that do not match filter");
|
||||
|
||||
const is_wine_enabled = b.option(bool, "enable-wine", "Use Wine to run cross compiled Windows tests") orelse false;
|
||||
const is_qemu_enabled = b.option(bool, "enable-qemu", "Use QEMU to run cross compiled foreign architecture tests") orelse false;
|
||||
const glibc_multi_dir = b.option([]const u8, "enable-foreign-glibc", "Provide directory with glibc installations to run cross compiled tests that link glibc");
|
||||
|
||||
const test_stage2_step = b.step("test-stage2", "Run the stage2 compiler tests");
|
||||
test_stage2_step.dependOn(&test_stage2.step);
|
||||
|
||||
@@ -113,20 +127,21 @@ pub fn build(b: *Builder) !void {
|
||||
const fmt_step = b.step("test-fmt", "Run zig fmt against build.zig to make sure it works");
|
||||
fmt_step.dependOn(&fmt_build_zig.step);
|
||||
|
||||
test_step.dependOn(tests.addPkgTests(b, test_filter, "test/stage1/behavior.zig", "behavior", "Run the behavior tests", modes));
|
||||
test_step.dependOn(tests.addPkgTests(b, test_filter, "test/stage1/behavior.zig", "behavior", "Run the behavior tests", modes, false, skip_non_native, skip_libc, is_wine_enabled, is_qemu_enabled, glibc_multi_dir));
|
||||
|
||||
test_step.dependOn(tests.addPkgTests(b, test_filter, "std/std.zig", "std", "Run the standard library tests", modes));
|
||||
test_step.dependOn(tests.addPkgTests(b, test_filter, "lib/std/std.zig", "std", "Run the standard library tests", modes, false, skip_non_native, skip_libc, is_wine_enabled, is_qemu_enabled, glibc_multi_dir));
|
||||
|
||||
test_step.dependOn(tests.addPkgTests(b, test_filter, "std/special/compiler_rt.zig", "compiler-rt", "Run the compiler_rt tests", modes));
|
||||
test_step.dependOn(tests.addPkgTests(b, test_filter, "lib/std/special/compiler_rt.zig", "compiler-rt", "Run the compiler_rt tests", modes, true, skip_non_native, true, is_wine_enabled, is_qemu_enabled, glibc_multi_dir));
|
||||
|
||||
test_step.dependOn(tests.addCompareOutputTests(b, test_filter, modes));
|
||||
test_step.dependOn(tests.addBuildExampleTests(b, test_filter, modes));
|
||||
test_step.dependOn(tests.addStandaloneTests(b, test_filter, modes));
|
||||
test_step.dependOn(tests.addStackTraceTests(b, test_filter, modes));
|
||||
test_step.dependOn(tests.addCliTests(b, test_filter, modes));
|
||||
test_step.dependOn(tests.addCompileErrorTests(b, test_filter, modes));
|
||||
test_step.dependOn(tests.addAssembleAndLinkTests(b, test_filter, modes));
|
||||
test_step.dependOn(tests.addRuntimeSafetyTests(b, test_filter, modes));
|
||||
test_step.dependOn(tests.addTranslateCTests(b, test_filter));
|
||||
test_step.dependOn(tests.addGenHTests(b, test_filter));
|
||||
test_step.dependOn(tests.addCompileErrorTests(b, test_filter, modes));
|
||||
test_step.dependOn(docs_step);
|
||||
}
|
||||
|
||||
@@ -134,18 +149,18 @@ fn dependOnLib(b: *Builder, lib_exe_obj: var, dep: LibraryDep) void {
|
||||
for (dep.libdirs.toSliceConst()) |lib_dir| {
|
||||
lib_exe_obj.addLibPath(lib_dir);
|
||||
}
|
||||
const lib_dir = os.path.join(
|
||||
const lib_dir = fs.path.join(
|
||||
b.allocator,
|
||||
[][]const u8{ dep.prefix, "lib" },
|
||||
[_][]const u8{ dep.prefix, "lib" },
|
||||
) catch unreachable;
|
||||
for (dep.system_libs.toSliceConst()) |lib| {
|
||||
const static_bare_name = if (mem.eql(u8, lib, "curses"))
|
||||
([]const u8)("libncurses.a")
|
||||
else
|
||||
b.fmt("lib{}.a", lib);
|
||||
const static_lib_name = os.path.join(
|
||||
const static_lib_name = fs.path.join(
|
||||
b.allocator,
|
||||
[][]const u8{ lib_dir, static_bare_name },
|
||||
[_][]const u8{ lib_dir, static_bare_name },
|
||||
) catch unreachable;
|
||||
const have_static = fileExists(static_lib_name) catch unreachable;
|
||||
if (have_static) {
|
||||
@@ -163,21 +178,18 @@ fn dependOnLib(b: *Builder, lib_exe_obj: var, dep: LibraryDep) void {
|
||||
}
|
||||
|
||||
fn fileExists(filename: []const u8) !bool {
|
||||
os.File.access(filename) catch |err| switch (err) {
|
||||
error.PermissionDenied,
|
||||
error.FileNotFound,
|
||||
=> return false,
|
||||
fs.File.access(filename) catch |err| switch (err) {
|
||||
error.FileNotFound => return false,
|
||||
else => return err,
|
||||
};
|
||||
return true;
|
||||
}
|
||||
|
||||
fn addCppLib(b: *Builder, lib_exe_obj: var, cmake_binary_dir: []const u8, lib_name: []const u8) void {
|
||||
const lib_prefix = if (lib_exe_obj.target.isWindows()) "" else "lib";
|
||||
lib_exe_obj.addObjectFile(os.path.join(b.allocator, [][]const u8{
|
||||
lib_exe_obj.addObjectFile(fs.path.join(b.allocator, [_][]const u8{
|
||||
cmake_binary_dir,
|
||||
"zig_cpp",
|
||||
b.fmt("{}{}{}", lib_prefix, lib_name, lib_exe_obj.target.libFileExt()),
|
||||
b.fmt("{}{}{}", lib_exe_obj.target.libPrefix(), lib_name, lib_exe_obj.target.staticLibSuffix()),
|
||||
}) catch unreachable);
|
||||
}
|
||||
|
||||
@@ -190,22 +202,22 @@ const LibraryDep = struct {
|
||||
};
|
||||
|
||||
fn findLLVM(b: *Builder, llvm_config_exe: []const u8) !LibraryDep {
|
||||
const shared_mode = try b.exec([][]const u8{ llvm_config_exe, "--shared-mode" });
|
||||
const shared_mode = try b.exec([_][]const u8{ llvm_config_exe, "--shared-mode" });
|
||||
const is_static = mem.startsWith(u8, shared_mode, "static");
|
||||
const libs_output = if (is_static)
|
||||
try b.exec([][]const u8{
|
||||
try b.exec([_][]const u8{
|
||||
llvm_config_exe,
|
||||
"--libfiles",
|
||||
"--system-libs",
|
||||
})
|
||||
else
|
||||
try b.exec([][]const u8{
|
||||
try b.exec([_][]const u8{
|
||||
llvm_config_exe,
|
||||
"--libs",
|
||||
});
|
||||
const includes_output = try b.exec([][]const u8{ llvm_config_exe, "--includedir" });
|
||||
const libdir_output = try b.exec([][]const u8{ llvm_config_exe, "--libdir" });
|
||||
const prefix_output = try b.exec([][]const u8{ llvm_config_exe, "--prefix" });
|
||||
const includes_output = try b.exec([_][]const u8{ llvm_config_exe, "--includedir" });
|
||||
const libdir_output = try b.exec([_][]const u8{ llvm_config_exe, "--libdir" });
|
||||
const prefix_output = try b.exec([_][]const u8{ llvm_config_exe, "--prefix" });
|
||||
|
||||
var result = LibraryDep{
|
||||
.prefix = mem.tokenize(prefix_output, " \r\n").next().?,
|
||||
@@ -220,7 +232,7 @@ fn findLLVM(b: *Builder, llvm_config_exe: []const u8) !LibraryDep {
|
||||
if (mem.startsWith(u8, lib_arg, "-l")) {
|
||||
try result.system_libs.append(lib_arg[2..]);
|
||||
} else {
|
||||
if (os.path.isAbsolute(lib_arg)) {
|
||||
if (fs.path.isAbsolute(lib_arg)) {
|
||||
try result.libs.append(lib_arg);
|
||||
} else {
|
||||
try result.system_libs.append(lib_arg);
|
||||
@@ -251,30 +263,6 @@ fn findLLVM(b: *Builder, llvm_config_exe: []const u8) !LibraryDep {
|
||||
return result;
|
||||
}
|
||||
|
||||
pub fn installStdLib(b: *Builder, stdlib_files: []const u8) void {
|
||||
var it = mem.tokenize(stdlib_files, ";");
|
||||
while (it.next()) |stdlib_file| {
|
||||
const src_path = os.path.join(b.allocator, [][]const u8{ "std", stdlib_file }) catch unreachable;
|
||||
const dest_path = os.path.join(
|
||||
b.allocator,
|
||||
[][]const u8{ "lib", "zig", "std", stdlib_file },
|
||||
) catch unreachable;
|
||||
b.installFile(src_path, dest_path);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn installCHeaders(b: *Builder, c_header_files: []const u8) void {
|
||||
var it = mem.tokenize(c_header_files, ";");
|
||||
while (it.next()) |c_header_file| {
|
||||
const src_path = os.path.join(b.allocator, [][]const u8{ "c_headers", c_header_file }) catch unreachable;
|
||||
const dest_path = os.path.join(
|
||||
b.allocator,
|
||||
[][]const u8{ "lib", "zig", "include", c_header_file },
|
||||
) catch unreachable;
|
||||
b.installFile(src_path, dest_path);
|
||||
}
|
||||
}
|
||||
|
||||
fn nextValue(index: *usize, build_info: []const u8) []const u8 {
|
||||
const start = index.*;
|
||||
while (true) : (index.* += 1) {
|
||||
@@ -312,7 +300,7 @@ fn configureStage2(b: *Builder, exe: var, ctx: Context) !void {
|
||||
}
|
||||
dependOnLib(b, exe, ctx.llvm);
|
||||
|
||||
if (exe.target.getOs() == builtin.Os.linux) {
|
||||
if (exe.target.getOs() == .linux) {
|
||||
try addCxxKnownPath(b, ctx, exe, "libstdc++.a",
|
||||
\\Unable to determine path to libstdc++.a
|
||||
\\On Fedora, install libstdc++-static and try again.
|
||||
@@ -353,7 +341,7 @@ fn addCxxKnownPath(
|
||||
objname: []const u8,
|
||||
errtxt: ?[]const u8,
|
||||
) !void {
|
||||
const path_padded = try b.exec([][]const u8{
|
||||
const path_padded = try b.exec([_][]const u8{
|
||||
ctx.cxx_compiler,
|
||||
b.fmt("-print-file-name={}", objname),
|
||||
});
|
||||
@@ -375,8 +363,30 @@ const Context = struct {
|
||||
llvm_config_exe: []const u8,
|
||||
lld_include_dir: []const u8,
|
||||
lld_libraries: []const u8,
|
||||
std_files: []const u8,
|
||||
c_header_files: []const u8,
|
||||
dia_guids_lib: []const u8,
|
||||
llvm: LibraryDep,
|
||||
};
|
||||
|
||||
fn addLibUserlandStep(b: *Builder, mode: builtin.Mode) void {
|
||||
const artifact = b.addStaticLibrary("userland", "src-self-hosted/stage1.zig");
|
||||
artifact.disable_gen_h = true;
|
||||
artifact.bundle_compiler_rt = true;
|
||||
artifact.setTarget(builtin.arch, builtin.os, builtin.abi);
|
||||
artifact.setBuildMode(mode);
|
||||
if (mode != .Debug) {
|
||||
artifact.strip = true;
|
||||
}
|
||||
artifact.linkSystemLibrary("c");
|
||||
if (builtin.os == .windows) {
|
||||
artifact.linkSystemLibrary("ntdll");
|
||||
}
|
||||
const libuserland_step = b.step("libuserland", "Build the userland compiler library for use in stage1");
|
||||
libuserland_step.dependOn(&artifact.step);
|
||||
|
||||
const output_dir = b.option(
|
||||
[]const u8,
|
||||
"output-dir",
|
||||
"For libuserland step, where to put the output",
|
||||
) orelse return;
|
||||
artifact.setOutputDir(output_dir);
|
||||
}
|
||||
|
||||
@@ -1,466 +0,0 @@
|
||||
/*===-- __clang_cuda_libdevice_declares.h - decls for libdevice functions --===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __CLANG_CUDA_LIBDEVICE_DECLARES_H__
|
||||
#define __CLANG_CUDA_LIBDEVICE_DECLARES_H__
|
||||
|
||||
extern "C" {
|
||||
|
||||
__device__ int __nv_abs(int __a);
|
||||
__device__ double __nv_acos(double __a);
|
||||
__device__ float __nv_acosf(float __a);
|
||||
__device__ double __nv_acosh(double __a);
|
||||
__device__ float __nv_acoshf(float __a);
|
||||
__device__ double __nv_asin(double __a);
|
||||
__device__ float __nv_asinf(float __a);
|
||||
__device__ double __nv_asinh(double __a);
|
||||
__device__ float __nv_asinhf(float __a);
|
||||
__device__ double __nv_atan2(double __a, double __b);
|
||||
__device__ float __nv_atan2f(float __a, float __b);
|
||||
__device__ double __nv_atan(double __a);
|
||||
__device__ float __nv_atanf(float __a);
|
||||
__device__ double __nv_atanh(double __a);
|
||||
__device__ float __nv_atanhf(float __a);
|
||||
__device__ int __nv_brev(int __a);
|
||||
__device__ long long __nv_brevll(long long __a);
|
||||
__device__ int __nv_byte_perm(int __a, int __b, int __c);
|
||||
__device__ double __nv_cbrt(double __a);
|
||||
__device__ float __nv_cbrtf(float __a);
|
||||
__device__ double __nv_ceil(double __a);
|
||||
__device__ float __nv_ceilf(float __a);
|
||||
__device__ int __nv_clz(int __a);
|
||||
__device__ int __nv_clzll(long long __a);
|
||||
__device__ double __nv_copysign(double __a, double __b);
|
||||
__device__ float __nv_copysignf(float __a, float __b);
|
||||
__device__ double __nv_cos(double __a);
|
||||
__device__ float __nv_cosf(float __a);
|
||||
__device__ double __nv_cosh(double __a);
|
||||
__device__ float __nv_coshf(float __a);
|
||||
__device__ double __nv_cospi(double __a);
|
||||
__device__ float __nv_cospif(float __a);
|
||||
__device__ double __nv_cyl_bessel_i0(double __a);
|
||||
__device__ float __nv_cyl_bessel_i0f(float __a);
|
||||
__device__ double __nv_cyl_bessel_i1(double __a);
|
||||
__device__ float __nv_cyl_bessel_i1f(float __a);
|
||||
__device__ double __nv_dadd_rd(double __a, double __b);
|
||||
__device__ double __nv_dadd_rn(double __a, double __b);
|
||||
__device__ double __nv_dadd_ru(double __a, double __b);
|
||||
__device__ double __nv_dadd_rz(double __a, double __b);
|
||||
__device__ double __nv_ddiv_rd(double __a, double __b);
|
||||
__device__ double __nv_ddiv_rn(double __a, double __b);
|
||||
__device__ double __nv_ddiv_ru(double __a, double __b);
|
||||
__device__ double __nv_ddiv_rz(double __a, double __b);
|
||||
__device__ double __nv_dmul_rd(double __a, double __b);
|
||||
__device__ double __nv_dmul_rn(double __a, double __b);
|
||||
__device__ double __nv_dmul_ru(double __a, double __b);
|
||||
__device__ double __nv_dmul_rz(double __a, double __b);
|
||||
__device__ float __nv_double2float_rd(double __a);
|
||||
__device__ float __nv_double2float_rn(double __a);
|
||||
__device__ float __nv_double2float_ru(double __a);
|
||||
__device__ float __nv_double2float_rz(double __a);
|
||||
__device__ int __nv_double2hiint(double __a);
|
||||
__device__ int __nv_double2int_rd(double __a);
|
||||
__device__ int __nv_double2int_rn(double __a);
|
||||
__device__ int __nv_double2int_ru(double __a);
|
||||
__device__ int __nv_double2int_rz(double __a);
|
||||
__device__ long long __nv_double2ll_rd(double __a);
|
||||
__device__ long long __nv_double2ll_rn(double __a);
|
||||
__device__ long long __nv_double2ll_ru(double __a);
|
||||
__device__ long long __nv_double2ll_rz(double __a);
|
||||
__device__ int __nv_double2loint(double __a);
|
||||
__device__ unsigned int __nv_double2uint_rd(double __a);
|
||||
__device__ unsigned int __nv_double2uint_rn(double __a);
|
||||
__device__ unsigned int __nv_double2uint_ru(double __a);
|
||||
__device__ unsigned int __nv_double2uint_rz(double __a);
|
||||
__device__ unsigned long long __nv_double2ull_rd(double __a);
|
||||
__device__ unsigned long long __nv_double2ull_rn(double __a);
|
||||
__device__ unsigned long long __nv_double2ull_ru(double __a);
|
||||
__device__ unsigned long long __nv_double2ull_rz(double __a);
|
||||
__device__ unsigned long long __nv_double_as_longlong(double __a);
|
||||
__device__ double __nv_drcp_rd(double __a);
|
||||
__device__ double __nv_drcp_rn(double __a);
|
||||
__device__ double __nv_drcp_ru(double __a);
|
||||
__device__ double __nv_drcp_rz(double __a);
|
||||
__device__ double __nv_dsqrt_rd(double __a);
|
||||
__device__ double __nv_dsqrt_rn(double __a);
|
||||
__device__ double __nv_dsqrt_ru(double __a);
|
||||
__device__ double __nv_dsqrt_rz(double __a);
|
||||
__device__ double __nv_dsub_rd(double __a, double __b);
|
||||
__device__ double __nv_dsub_rn(double __a, double __b);
|
||||
__device__ double __nv_dsub_ru(double __a, double __b);
|
||||
__device__ double __nv_dsub_rz(double __a, double __b);
|
||||
__device__ double __nv_erfc(double __a);
|
||||
__device__ float __nv_erfcf(float __a);
|
||||
__device__ double __nv_erfcinv(double __a);
|
||||
__device__ float __nv_erfcinvf(float __a);
|
||||
__device__ double __nv_erfcx(double __a);
|
||||
__device__ float __nv_erfcxf(float __a);
|
||||
__device__ double __nv_erf(double __a);
|
||||
__device__ float __nv_erff(float __a);
|
||||
__device__ double __nv_erfinv(double __a);
|
||||
__device__ float __nv_erfinvf(float __a);
|
||||
__device__ double __nv_exp10(double __a);
|
||||
__device__ float __nv_exp10f(float __a);
|
||||
__device__ double __nv_exp2(double __a);
|
||||
__device__ float __nv_exp2f(float __a);
|
||||
__device__ double __nv_exp(double __a);
|
||||
__device__ float __nv_expf(float __a);
|
||||
__device__ double __nv_expm1(double __a);
|
||||
__device__ float __nv_expm1f(float __a);
|
||||
__device__ double __nv_fabs(double __a);
|
||||
__device__ float __nv_fabsf(float __a);
|
||||
__device__ float __nv_fadd_rd(float __a, float __b);
|
||||
__device__ float __nv_fadd_rn(float __a, float __b);
|
||||
__device__ float __nv_fadd_ru(float __a, float __b);
|
||||
__device__ float __nv_fadd_rz(float __a, float __b);
|
||||
__device__ float __nv_fast_cosf(float __a);
|
||||
__device__ float __nv_fast_exp10f(float __a);
|
||||
__device__ float __nv_fast_expf(float __a);
|
||||
__device__ float __nv_fast_fdividef(float __a, float __b);
|
||||
__device__ float __nv_fast_log10f(float __a);
|
||||
__device__ float __nv_fast_log2f(float __a);
|
||||
__device__ float __nv_fast_logf(float __a);
|
||||
__device__ float __nv_fast_powf(float __a, float __b);
|
||||
__device__ void __nv_fast_sincosf(float __a, float *__sptr, float *__cptr);
|
||||
__device__ float __nv_fast_sinf(float __a);
|
||||
__device__ float __nv_fast_tanf(float __a);
|
||||
__device__ double __nv_fdim(double __a, double __b);
|
||||
__device__ float __nv_fdimf(float __a, float __b);
|
||||
__device__ float __nv_fdiv_rd(float __a, float __b);
|
||||
__device__ float __nv_fdiv_rn(float __a, float __b);
|
||||
__device__ float __nv_fdiv_ru(float __a, float __b);
|
||||
__device__ float __nv_fdiv_rz(float __a, float __b);
|
||||
__device__ int __nv_ffs(int __a);
|
||||
__device__ int __nv_ffsll(long long __a);
|
||||
__device__ int __nv_finitef(float __a);
|
||||
__device__ unsigned short __nv_float2half_rn(float __a);
|
||||
__device__ int __nv_float2int_rd(float __a);
|
||||
__device__ int __nv_float2int_rn(float __a);
|
||||
__device__ int __nv_float2int_ru(float __a);
|
||||
__device__ int __nv_float2int_rz(float __a);
|
||||
__device__ long long __nv_float2ll_rd(float __a);
|
||||
__device__ long long __nv_float2ll_rn(float __a);
|
||||
__device__ long long __nv_float2ll_ru(float __a);
|
||||
__device__ long long __nv_float2ll_rz(float __a);
|
||||
__device__ unsigned int __nv_float2uint_rd(float __a);
|
||||
__device__ unsigned int __nv_float2uint_rn(float __a);
|
||||
__device__ unsigned int __nv_float2uint_ru(float __a);
|
||||
__device__ unsigned int __nv_float2uint_rz(float __a);
|
||||
__device__ unsigned long long __nv_float2ull_rd(float __a);
|
||||
__device__ unsigned long long __nv_float2ull_rn(float __a);
|
||||
__device__ unsigned long long __nv_float2ull_ru(float __a);
|
||||
__device__ unsigned long long __nv_float2ull_rz(float __a);
|
||||
__device__ int __nv_float_as_int(float __a);
|
||||
__device__ unsigned int __nv_float_as_uint(float __a);
|
||||
__device__ double __nv_floor(double __a);
|
||||
__device__ float __nv_floorf(float __a);
|
||||
__device__ double __nv_fma(double __a, double __b, double __c);
|
||||
__device__ float __nv_fmaf(float __a, float __b, float __c);
|
||||
__device__ float __nv_fmaf_ieee_rd(float __a, float __b, float __c);
|
||||
__device__ float __nv_fmaf_ieee_rn(float __a, float __b, float __c);
|
||||
__device__ float __nv_fmaf_ieee_ru(float __a, float __b, float __c);
|
||||
__device__ float __nv_fmaf_ieee_rz(float __a, float __b, float __c);
|
||||
__device__ float __nv_fmaf_rd(float __a, float __b, float __c);
|
||||
__device__ float __nv_fmaf_rn(float __a, float __b, float __c);
|
||||
__device__ float __nv_fmaf_ru(float __a, float __b, float __c);
|
||||
__device__ float __nv_fmaf_rz(float __a, float __b, float __c);
|
||||
__device__ double __nv_fma_rd(double __a, double __b, double __c);
|
||||
__device__ double __nv_fma_rn(double __a, double __b, double __c);
|
||||
__device__ double __nv_fma_ru(double __a, double __b, double __c);
|
||||
__device__ double __nv_fma_rz(double __a, double __b, double __c);
|
||||
__device__ double __nv_fmax(double __a, double __b);
|
||||
__device__ float __nv_fmaxf(float __a, float __b);
|
||||
__device__ double __nv_fmin(double __a, double __b);
|
||||
__device__ float __nv_fminf(float __a, float __b);
|
||||
__device__ double __nv_fmod(double __a, double __b);
|
||||
__device__ float __nv_fmodf(float __a, float __b);
|
||||
__device__ float __nv_fmul_rd(float __a, float __b);
|
||||
__device__ float __nv_fmul_rn(float __a, float __b);
|
||||
__device__ float __nv_fmul_ru(float __a, float __b);
|
||||
__device__ float __nv_fmul_rz(float __a, float __b);
|
||||
__device__ float __nv_frcp_rd(float __a);
|
||||
__device__ float __nv_frcp_rn(float __a);
|
||||
__device__ float __nv_frcp_ru(float __a);
|
||||
__device__ float __nv_frcp_rz(float __a);
|
||||
__device__ double __nv_frexp(double __a, int *__b);
|
||||
__device__ float __nv_frexpf(float __a, int *__b);
|
||||
__device__ float __nv_frsqrt_rn(float __a);
|
||||
__device__ float __nv_fsqrt_rd(float __a);
|
||||
__device__ float __nv_fsqrt_rn(float __a);
|
||||
__device__ float __nv_fsqrt_ru(float __a);
|
||||
__device__ float __nv_fsqrt_rz(float __a);
|
||||
__device__ float __nv_fsub_rd(float __a, float __b);
|
||||
__device__ float __nv_fsub_rn(float __a, float __b);
|
||||
__device__ float __nv_fsub_ru(float __a, float __b);
|
||||
__device__ float __nv_fsub_rz(float __a, float __b);
|
||||
__device__ int __nv_hadd(int __a, int __b);
|
||||
__device__ float __nv_half2float(unsigned short __h);
|
||||
__device__ double __nv_hiloint2double(int __a, int __b);
|
||||
__device__ double __nv_hypot(double __a, double __b);
|
||||
__device__ float __nv_hypotf(float __a, float __b);
|
||||
__device__ int __nv_ilogb(double __a);
|
||||
__device__ int __nv_ilogbf(float __a);
|
||||
__device__ double __nv_int2double_rn(int __a);
|
||||
__device__ float __nv_int2float_rd(int __a);
|
||||
__device__ float __nv_int2float_rn(int __a);
|
||||
__device__ float __nv_int2float_ru(int __a);
|
||||
__device__ float __nv_int2float_rz(int __a);
|
||||
__device__ float __nv_int_as_float(int __a);
|
||||
__device__ int __nv_isfinited(double __a);
|
||||
__device__ int __nv_isinfd(double __a);
|
||||
__device__ int __nv_isinff(float __a);
|
||||
__device__ int __nv_isnand(double __a);
|
||||
__device__ int __nv_isnanf(float __a);
|
||||
__device__ double __nv_j0(double __a);
|
||||
__device__ float __nv_j0f(float __a);
|
||||
__device__ double __nv_j1(double __a);
|
||||
__device__ float __nv_j1f(float __a);
|
||||
__device__ float __nv_jnf(int __a, float __b);
|
||||
__device__ double __nv_jn(int __a, double __b);
|
||||
__device__ double __nv_ldexp(double __a, int __b);
|
||||
__device__ float __nv_ldexpf(float __a, int __b);
|
||||
__device__ double __nv_lgamma(double __a);
|
||||
__device__ float __nv_lgammaf(float __a);
|
||||
__device__ double __nv_ll2double_rd(long long __a);
|
||||
__device__ double __nv_ll2double_rn(long long __a);
|
||||
__device__ double __nv_ll2double_ru(long long __a);
|
||||
__device__ double __nv_ll2double_rz(long long __a);
|
||||
__device__ float __nv_ll2float_rd(long long __a);
|
||||
__device__ float __nv_ll2float_rn(long long __a);
|
||||
__device__ float __nv_ll2float_ru(long long __a);
|
||||
__device__ float __nv_ll2float_rz(long long __a);
|
||||
__device__ long long __nv_llabs(long long __a);
|
||||
__device__ long long __nv_llmax(long long __a, long long __b);
|
||||
__device__ long long __nv_llmin(long long __a, long long __b);
|
||||
__device__ long long __nv_llrint(double __a);
|
||||
__device__ long long __nv_llrintf(float __a);
|
||||
__device__ long long __nv_llround(double __a);
|
||||
__device__ long long __nv_llroundf(float __a);
|
||||
__device__ double __nv_log10(double __a);
|
||||
__device__ float __nv_log10f(float __a);
|
||||
__device__ double __nv_log1p(double __a);
|
||||
__device__ float __nv_log1pf(float __a);
|
||||
__device__ double __nv_log2(double __a);
|
||||
__device__ float __nv_log2f(float __a);
|
||||
__device__ double __nv_logb(double __a);
|
||||
__device__ float __nv_logbf(float __a);
|
||||
__device__ double __nv_log(double __a);
|
||||
__device__ float __nv_logf(float __a);
|
||||
__device__ double __nv_longlong_as_double(long long __a);
|
||||
__device__ int __nv_max(int __a, int __b);
|
||||
__device__ int __nv_min(int __a, int __b);
|
||||
__device__ double __nv_modf(double __a, double *__b);
|
||||
__device__ float __nv_modff(float __a, float *__b);
|
||||
__device__ int __nv_mul24(int __a, int __b);
|
||||
__device__ long long __nv_mul64hi(long long __a, long long __b);
|
||||
__device__ int __nv_mulhi(int __a, int __b);
|
||||
__device__ double __nv_nan(const signed char *__a);
|
||||
__device__ float __nv_nanf(const signed char *__a);
|
||||
__device__ double __nv_nearbyint(double __a);
|
||||
__device__ float __nv_nearbyintf(float __a);
|
||||
__device__ double __nv_nextafter(double __a, double __b);
|
||||
__device__ float __nv_nextafterf(float __a, float __b);
|
||||
__device__ double __nv_norm3d(double __a, double __b, double __c);
|
||||
__device__ float __nv_norm3df(float __a, float __b, float __c);
|
||||
__device__ double __nv_norm4d(double __a, double __b, double __c, double __d);
|
||||
__device__ float __nv_norm4df(float __a, float __b, float __c, float __d);
|
||||
__device__ double __nv_normcdf(double __a);
|
||||
__device__ float __nv_normcdff(float __a);
|
||||
__device__ double __nv_normcdfinv(double __a);
|
||||
__device__ float __nv_normcdfinvf(float __a);
|
||||
__device__ float __nv_normf(int __a, const float *__b);
|
||||
__device__ double __nv_norm(int __a, const double *__b);
|
||||
__device__ int __nv_popc(int __a);
|
||||
__device__ int __nv_popcll(long long __a);
|
||||
__device__ double __nv_pow(double __a, double __b);
|
||||
__device__ float __nv_powf(float __a, float __b);
|
||||
__device__ double __nv_powi(double __a, int __b);
|
||||
__device__ float __nv_powif(float __a, int __b);
|
||||
__device__ double __nv_rcbrt(double __a);
|
||||
__device__ float __nv_rcbrtf(float __a);
|
||||
__device__ double __nv_rcp64h(double __a);
|
||||
__device__ double __nv_remainder(double __a, double __b);
|
||||
__device__ float __nv_remainderf(float __a, float __b);
|
||||
__device__ double __nv_remquo(double __a, double __b, int *__c);
|
||||
__device__ float __nv_remquof(float __a, float __b, int *__c);
|
||||
__device__ int __nv_rhadd(int __a, int __b);
|
||||
__device__ double __nv_rhypot(double __a, double __b);
|
||||
__device__ float __nv_rhypotf(float __a, float __b);
|
||||
__device__ double __nv_rint(double __a);
|
||||
__device__ float __nv_rintf(float __a);
|
||||
__device__ double __nv_rnorm3d(double __a, double __b, double __c);
|
||||
__device__ float __nv_rnorm3df(float __a, float __b, float __c);
|
||||
__device__ double __nv_rnorm4d(double __a, double __b, double __c, double __d);
|
||||
__device__ float __nv_rnorm4df(float __a, float __b, float __c, float __d);
|
||||
__device__ float __nv_rnormf(int __a, const float *__b);
|
||||
__device__ double __nv_rnorm(int __a, const double *__b);
|
||||
__device__ double __nv_round(double __a);
|
||||
__device__ float __nv_roundf(float __a);
|
||||
__device__ double __nv_rsqrt(double __a);
|
||||
__device__ float __nv_rsqrtf(float __a);
|
||||
__device__ int __nv_sad(int __a, int __b, int __c);
|
||||
__device__ float __nv_saturatef(float __a);
|
||||
__device__ double __nv_scalbn(double __a, int __b);
|
||||
__device__ float __nv_scalbnf(float __a, int __b);
|
||||
__device__ int __nv_signbitd(double __a);
|
||||
__device__ int __nv_signbitf(float __a);
|
||||
__device__ void __nv_sincos(double __a, double *__b, double *__c);
|
||||
__device__ void __nv_sincosf(float __a, float *__b, float *__c);
|
||||
__device__ void __nv_sincospi(double __a, double *__b, double *__c);
|
||||
__device__ void __nv_sincospif(float __a, float *__b, float *__c);
|
||||
__device__ double __nv_sin(double __a);
|
||||
__device__ float __nv_sinf(float __a);
|
||||
__device__ double __nv_sinh(double __a);
|
||||
__device__ float __nv_sinhf(float __a);
|
||||
__device__ double __nv_sinpi(double __a);
|
||||
__device__ float __nv_sinpif(float __a);
|
||||
__device__ double __nv_sqrt(double __a);
|
||||
__device__ float __nv_sqrtf(float __a);
|
||||
__device__ double __nv_tan(double __a);
|
||||
__device__ float __nv_tanf(float __a);
|
||||
__device__ double __nv_tanh(double __a);
|
||||
__device__ float __nv_tanhf(float __a);
|
||||
__device__ double __nv_tgamma(double __a);
|
||||
__device__ float __nv_tgammaf(float __a);
|
||||
__device__ double __nv_trunc(double __a);
|
||||
__device__ float __nv_truncf(float __a);
|
||||
__device__ int __nv_uhadd(unsigned int __a, unsigned int __b);
|
||||
__device__ double __nv_uint2double_rn(unsigned int __i);
|
||||
__device__ float __nv_uint2float_rd(unsigned int __a);
|
||||
__device__ float __nv_uint2float_rn(unsigned int __a);
|
||||
__device__ float __nv_uint2float_ru(unsigned int __a);
|
||||
__device__ float __nv_uint2float_rz(unsigned int __a);
|
||||
__device__ float __nv_uint_as_float(unsigned int __a);
|
||||
__device__ double __nv_ull2double_rd(unsigned long long __a);
|
||||
__device__ double __nv_ull2double_rn(unsigned long long __a);
|
||||
__device__ double __nv_ull2double_ru(unsigned long long __a);
|
||||
__device__ double __nv_ull2double_rz(unsigned long long __a);
|
||||
__device__ float __nv_ull2float_rd(unsigned long long __a);
|
||||
__device__ float __nv_ull2float_rn(unsigned long long __a);
|
||||
__device__ float __nv_ull2float_ru(unsigned long long __a);
|
||||
__device__ float __nv_ull2float_rz(unsigned long long __a);
|
||||
__device__ unsigned long long __nv_ullmax(unsigned long long __a,
|
||||
unsigned long long __b);
|
||||
__device__ unsigned long long __nv_ullmin(unsigned long long __a,
|
||||
unsigned long long __b);
|
||||
__device__ unsigned int __nv_umax(unsigned int __a, unsigned int __b);
|
||||
__device__ unsigned int __nv_umin(unsigned int __a, unsigned int __b);
|
||||
__device__ unsigned int __nv_umul24(unsigned int __a, unsigned int __b);
|
||||
__device__ unsigned long long __nv_umul64hi(unsigned long long __a,
|
||||
unsigned long long __b);
|
||||
__device__ unsigned int __nv_umulhi(unsigned int __a, unsigned int __b);
|
||||
__device__ unsigned int __nv_urhadd(unsigned int __a, unsigned int __b);
|
||||
__device__ unsigned int __nv_usad(unsigned int __a, unsigned int __b,
|
||||
unsigned int __c);
|
||||
#if CUDA_VERSION >= 9000 && CUDA_VERSION < 9020
|
||||
__device__ int __nv_vabs2(int __a);
|
||||
__device__ int __nv_vabs4(int __a);
|
||||
__device__ int __nv_vabsdiffs2(int __a, int __b);
|
||||
__device__ int __nv_vabsdiffs4(int __a, int __b);
|
||||
__device__ int __nv_vabsdiffu2(int __a, int __b);
|
||||
__device__ int __nv_vabsdiffu4(int __a, int __b);
|
||||
__device__ int __nv_vabsss2(int __a);
|
||||
__device__ int __nv_vabsss4(int __a);
|
||||
__device__ int __nv_vadd2(int __a, int __b);
|
||||
__device__ int __nv_vadd4(int __a, int __b);
|
||||
__device__ int __nv_vaddss2(int __a, int __b);
|
||||
__device__ int __nv_vaddss4(int __a, int __b);
|
||||
__device__ int __nv_vaddus2(int __a, int __b);
|
||||
__device__ int __nv_vaddus4(int __a, int __b);
|
||||
__device__ int __nv_vavgs2(int __a, int __b);
|
||||
__device__ int __nv_vavgs4(int __a, int __b);
|
||||
__device__ int __nv_vavgu2(int __a, int __b);
|
||||
__device__ int __nv_vavgu4(int __a, int __b);
|
||||
__device__ int __nv_vcmpeq2(int __a, int __b);
|
||||
__device__ int __nv_vcmpeq4(int __a, int __b);
|
||||
__device__ int __nv_vcmpges2(int __a, int __b);
|
||||
__device__ int __nv_vcmpges4(int __a, int __b);
|
||||
__device__ int __nv_vcmpgeu2(int __a, int __b);
|
||||
__device__ int __nv_vcmpgeu4(int __a, int __b);
|
||||
__device__ int __nv_vcmpgts2(int __a, int __b);
|
||||
__device__ int __nv_vcmpgts4(int __a, int __b);
|
||||
__device__ int __nv_vcmpgtu2(int __a, int __b);
|
||||
__device__ int __nv_vcmpgtu4(int __a, int __b);
|
||||
__device__ int __nv_vcmples2(int __a, int __b);
|
||||
__device__ int __nv_vcmples4(int __a, int __b);
|
||||
__device__ int __nv_vcmpleu2(int __a, int __b);
|
||||
__device__ int __nv_vcmpleu4(int __a, int __b);
|
||||
__device__ int __nv_vcmplts2(int __a, int __b);
|
||||
__device__ int __nv_vcmplts4(int __a, int __b);
|
||||
__device__ int __nv_vcmpltu2(int __a, int __b);
|
||||
__device__ int __nv_vcmpltu4(int __a, int __b);
|
||||
__device__ int __nv_vcmpne2(int __a, int __b);
|
||||
__device__ int __nv_vcmpne4(int __a, int __b);
|
||||
__device__ int __nv_vhaddu2(int __a, int __b);
|
||||
__device__ int __nv_vhaddu4(int __a, int __b);
|
||||
__device__ int __nv_vmaxs2(int __a, int __b);
|
||||
__device__ int __nv_vmaxs4(int __a, int __b);
|
||||
__device__ int __nv_vmaxu2(int __a, int __b);
|
||||
__device__ int __nv_vmaxu4(int __a, int __b);
|
||||
__device__ int __nv_vmins2(int __a, int __b);
|
||||
__device__ int __nv_vmins4(int __a, int __b);
|
||||
__device__ int __nv_vminu2(int __a, int __b);
|
||||
__device__ int __nv_vminu4(int __a, int __b);
|
||||
__device__ int __nv_vneg2(int __a);
|
||||
__device__ int __nv_vneg4(int __a);
|
||||
__device__ int __nv_vnegss2(int __a);
|
||||
__device__ int __nv_vnegss4(int __a);
|
||||
__device__ int __nv_vsads2(int __a, int __b);
|
||||
__device__ int __nv_vsads4(int __a, int __b);
|
||||
__device__ int __nv_vsadu2(int __a, int __b);
|
||||
__device__ int __nv_vsadu4(int __a, int __b);
|
||||
__device__ int __nv_vseteq2(int __a, int __b);
|
||||
__device__ int __nv_vseteq4(int __a, int __b);
|
||||
__device__ int __nv_vsetges2(int __a, int __b);
|
||||
__device__ int __nv_vsetges4(int __a, int __b);
|
||||
__device__ int __nv_vsetgeu2(int __a, int __b);
|
||||
__device__ int __nv_vsetgeu4(int __a, int __b);
|
||||
__device__ int __nv_vsetgts2(int __a, int __b);
|
||||
__device__ int __nv_vsetgts4(int __a, int __b);
|
||||
__device__ int __nv_vsetgtu2(int __a, int __b);
|
||||
__device__ int __nv_vsetgtu4(int __a, int __b);
|
||||
__device__ int __nv_vsetles2(int __a, int __b);
|
||||
__device__ int __nv_vsetles4(int __a, int __b);
|
||||
__device__ int __nv_vsetleu2(int __a, int __b);
|
||||
__device__ int __nv_vsetleu4(int __a, int __b);
|
||||
__device__ int __nv_vsetlts2(int __a, int __b);
|
||||
__device__ int __nv_vsetlts4(int __a, int __b);
|
||||
__device__ int __nv_vsetltu2(int __a, int __b);
|
||||
__device__ int __nv_vsetltu4(int __a, int __b);
|
||||
__device__ int __nv_vsetne2(int __a, int __b);
|
||||
__device__ int __nv_vsetne4(int __a, int __b);
|
||||
__device__ int __nv_vsub2(int __a, int __b);
|
||||
__device__ int __nv_vsub4(int __a, int __b);
|
||||
__device__ int __nv_vsubss2(int __a, int __b);
|
||||
__device__ int __nv_vsubss4(int __a, int __b);
|
||||
__device__ int __nv_vsubus2(int __a, int __b);
|
||||
__device__ int __nv_vsubus4(int __a, int __b);
|
||||
#endif // CUDA_VERSION
|
||||
__device__ double __nv_y0(double __a);
|
||||
__device__ float __nv_y0f(float __a);
|
||||
__device__ double __nv_y1(double __a);
|
||||
__device__ float __nv_y1f(float __a);
|
||||
__device__ float __nv_ynf(int __a, float __b);
|
||||
__device__ double __nv_yn(int __a, double __b);
|
||||
} // extern "C"
|
||||
#endif // __CLANG_CUDA_LIBDEVICE_DECLARES_H__
|
||||
@@ -1,43 +0,0 @@
|
||||
/*===---- __stddef_max_align_t.h - Definition of max_align_t for modules ---===
|
||||
*
|
||||
* Copyright (c) 2014 Chandler Carruth
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __CLANG_MAX_ALIGN_T_DEFINED
|
||||
#define __CLANG_MAX_ALIGN_T_DEFINED
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
typedef double max_align_t;
|
||||
#elif defined(__APPLE__)
|
||||
typedef long double max_align_t;
|
||||
#else
|
||||
// Define 'max_align_t' to match the GCC definition.
|
||||
typedef struct {
|
||||
long long __clang_max_align_nonce1
|
||||
__attribute__((__aligned__(__alignof__(long long))));
|
||||
long double __clang_max_align_nonce2
|
||||
__attribute__((__aligned__(__alignof__(long double))));
|
||||
} max_align_t;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,62 +0,0 @@
|
||||
/*===---- __wmmintrin_pclmul.h - PCMUL intrinsics ---------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __WMMINTRIN_H
|
||||
#error "Never use <__wmmintrin_pclmul.h> directly; include <wmmintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __WMMINTRIN_PCLMUL_H
|
||||
#define __WMMINTRIN_PCLMUL_H
|
||||
|
||||
/// Multiplies two 64-bit integer values, which are selected from source
|
||||
/// operands using the immediate-value operand. The multiplication is a
|
||||
/// carry-less multiplication, and the 128-bit integer product is stored in
|
||||
/// the destination.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// \code
|
||||
/// __m128i _mm_clmulepi64_si128(__m128i __X, __m128i __Y, const int __I);
|
||||
/// \endcode
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> VPCLMULQDQ </c> instruction.
|
||||
///
|
||||
/// \param __X
|
||||
/// A 128-bit vector of [2 x i64] containing one of the source operands.
|
||||
/// \param __Y
|
||||
/// A 128-bit vector of [2 x i64] containing one of the source operands.
|
||||
/// \param __I
|
||||
/// An immediate value specifying which 64-bit values to select from the
|
||||
/// operands. Bit 0 is used to select a value from operand \a __X, and bit
|
||||
/// 4 is used to select a value from operand \a __Y: \n
|
||||
/// Bit[0]=0 indicates that bits[63:0] of operand \a __X are used. \n
|
||||
/// Bit[0]=1 indicates that bits[127:64] of operand \a __X are used. \n
|
||||
/// Bit[4]=0 indicates that bits[63:0] of operand \a __Y are used. \n
|
||||
/// Bit[4]=1 indicates that bits[127:64] of operand \a __Y are used.
|
||||
/// \returns The 128-bit integer vector containing the result of the carry-less
|
||||
/// multiplication of the selected 64-bit values.
|
||||
#define _mm_clmulepi64_si128(X, Y, I) \
|
||||
((__m128i)__builtin_ia32_pclmulqdq128((__v2di)(__m128i)(X), \
|
||||
(__v2di)(__m128i)(Y), (char)(I)))
|
||||
|
||||
#endif /* __WMMINTRIN_PCLMUL_H */
|
||||
@@ -1,86 +0,0 @@
|
||||
/*===---- adxintrin.h - ADX intrinsics -------------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <adxintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __ADXINTRIN_H
|
||||
#define __ADXINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__))
|
||||
|
||||
/* Intrinsics that are available only if __ADX__ defined */
|
||||
static __inline unsigned char __attribute__((__always_inline__, __nodebug__, __target__("adx")))
|
||||
_addcarryx_u32(unsigned char __cf, unsigned int __x, unsigned int __y,
|
||||
unsigned int *__p)
|
||||
{
|
||||
return __builtin_ia32_addcarryx_u32(__cf, __x, __y, __p);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
static __inline unsigned char __attribute__((__always_inline__, __nodebug__, __target__("adx")))
|
||||
_addcarryx_u64(unsigned char __cf, unsigned long long __x,
|
||||
unsigned long long __y, unsigned long long *__p)
|
||||
{
|
||||
return __builtin_ia32_addcarryx_u64(__cf, __x, __y, __p);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Intrinsics that are also available if __ADX__ undefined */
|
||||
static __inline unsigned char __DEFAULT_FN_ATTRS
|
||||
_addcarry_u32(unsigned char __cf, unsigned int __x, unsigned int __y,
|
||||
unsigned int *__p)
|
||||
{
|
||||
return __builtin_ia32_addcarryx_u32(__cf, __x, __y, __p);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
static __inline unsigned char __DEFAULT_FN_ATTRS
|
||||
_addcarry_u64(unsigned char __cf, unsigned long long __x,
|
||||
unsigned long long __y, unsigned long long *__p)
|
||||
{
|
||||
return __builtin_ia32_addcarryx_u64(__cf, __x, __y, __p);
|
||||
}
|
||||
#endif
|
||||
|
||||
static __inline unsigned char __DEFAULT_FN_ATTRS
|
||||
_subborrow_u32(unsigned char __cf, unsigned int __x, unsigned int __y,
|
||||
unsigned int *__p)
|
||||
{
|
||||
return __builtin_ia32_subborrow_u32(__cf, __x, __y, __p);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
static __inline unsigned char __DEFAULT_FN_ATTRS
|
||||
_subborrow_u64(unsigned char __cf, unsigned long long __x,
|
||||
unsigned long long __y, unsigned long long *__p)
|
||||
{
|
||||
return __builtin_ia32_subborrow_u64(__cf, __x, __y, __p);
|
||||
}
|
||||
#endif
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif /* __ADXINTRIN_H */
|
||||
@@ -1,49 +0,0 @@
|
||||
/*===---- arm64intr.h - ARM64 Windows intrinsics -------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
/* Only include this if we're compiling for the windows platform. */
|
||||
#ifndef _MSC_VER
|
||||
#include_next <arm64intr.h>
|
||||
#else
|
||||
|
||||
#ifndef __ARM64INTR_H
|
||||
#define __ARM64INTR_H
|
||||
|
||||
typedef enum
|
||||
{
|
||||
_ARM64_BARRIER_SY = 0xF,
|
||||
_ARM64_BARRIER_ST = 0xE,
|
||||
_ARM64_BARRIER_LD = 0xD,
|
||||
_ARM64_BARRIER_ISH = 0xB,
|
||||
_ARM64_BARRIER_ISHST = 0xA,
|
||||
_ARM64_BARRIER_ISHLD = 0x9,
|
||||
_ARM64_BARRIER_NSH = 0x7,
|
||||
_ARM64_BARRIER_NSHST = 0x6,
|
||||
_ARM64_BARRIER_NSHLD = 0x5,
|
||||
_ARM64_BARRIER_OSH = 0x3,
|
||||
_ARM64_BARRIER_OSHST = 0x2,
|
||||
_ARM64_BARRIER_OSHLD = 0x1
|
||||
} _ARM64INTR_BARRIER_TYPE;
|
||||
|
||||
#endif /* __ARM64INTR_H */
|
||||
#endif /* _MSC_VER */
|
||||
@@ -1,45 +0,0 @@
|
||||
/*===---- armintr.h - ARM Windows intrinsics -------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
/* Only include this if we're compiling for the windows platform. */
|
||||
#ifndef _MSC_VER
|
||||
#include_next <armintr.h>
|
||||
#else
|
||||
|
||||
#ifndef __ARMINTR_H
|
||||
#define __ARMINTR_H
|
||||
|
||||
typedef enum
|
||||
{
|
||||
_ARM_BARRIER_SY = 0xF,
|
||||
_ARM_BARRIER_ST = 0xE,
|
||||
_ARM_BARRIER_ISH = 0xB,
|
||||
_ARM_BARRIER_ISHST = 0xA,
|
||||
_ARM_BARRIER_NSH = 0x7,
|
||||
_ARM_BARRIER_NSHST = 0x6,
|
||||
_ARM_BARRIER_OSH = 0x3,
|
||||
_ARM_BARRIER_OSHST = 0x2
|
||||
} _ARMINTR_BARRIER_TYPE;
|
||||
|
||||
#endif /* __ARMINTR_H */
|
||||
#endif /* _MSC_VER */
|
||||
@@ -1,97 +0,0 @@
|
||||
/*===------------- avx512bitalgintrin.h - BITALG intrinsics ------------------===
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <avx512bitalgintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __AVX512BITALGINTRIN_H
|
||||
#define __AVX512BITALGINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx512bitalg"), __min_vector_width__(512)))
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_popcnt_epi16(__m512i __A)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_vpopcntw_512((__v32hi) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_popcnt_epi16(__m512i __A, __mmask32 __U, __m512i __B)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_selectw_512((__mmask32) __U,
|
||||
(__v32hi) _mm512_popcnt_epi16(__B),
|
||||
(__v32hi) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_popcnt_epi16(__mmask32 __U, __m512i __B)
|
||||
{
|
||||
return _mm512_mask_popcnt_epi16((__m512i) _mm512_setzero_si512(),
|
||||
__U,
|
||||
__B);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_popcnt_epi8(__m512i __A)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_vpopcntb_512((__v64qi) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_popcnt_epi8(__m512i __A, __mmask64 __U, __m512i __B)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_selectb_512((__mmask64) __U,
|
||||
(__v64qi) _mm512_popcnt_epi8(__B),
|
||||
(__v64qi) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_popcnt_epi8(__mmask64 __U, __m512i __B)
|
||||
{
|
||||
return _mm512_mask_popcnt_epi8((__m512i) _mm512_setzero_si512(),
|
||||
__U,
|
||||
__B);
|
||||
}
|
||||
|
||||
static __inline__ __mmask64 __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_bitshuffle_epi64_mask(__mmask64 __U, __m512i __A, __m512i __B)
|
||||
{
|
||||
return (__mmask64) __builtin_ia32_vpshufbitqmb512_mask((__v64qi) __A,
|
||||
(__v64qi) __B,
|
||||
__U);
|
||||
}
|
||||
|
||||
static __inline__ __mmask64 __DEFAULT_FN_ATTRS
|
||||
_mm512_bitshuffle_epi64_mask(__m512i __A, __m512i __B)
|
||||
{
|
||||
return _mm512_mask_bitshuffle_epi64_mask((__mmask64) -1,
|
||||
__A,
|
||||
__B);
|
||||
}
|
||||
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif
|
||||
@@ -1,141 +0,0 @@
|
||||
/*===------------- avx512cdintrin.h - AVX512CD intrinsics ------------------===
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <avx512cdintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __AVX512CDINTRIN_H
|
||||
#define __AVX512CDINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx512cd"), __min_vector_width__(512)))
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_conflict_epi64 (__m512i __A)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_vpconflictdi_512_mask ((__v8di) __A,
|
||||
(__v8di) _mm512_setzero_si512 (),
|
||||
(__mmask8) -1);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_conflict_epi64 (__m512i __W, __mmask8 __U, __m512i __A)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_vpconflictdi_512_mask ((__v8di) __A,
|
||||
(__v8di) __W,
|
||||
(__mmask8) __U);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_conflict_epi64 (__mmask8 __U, __m512i __A)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_vpconflictdi_512_mask ((__v8di) __A,
|
||||
(__v8di) _mm512_setzero_si512 (),
|
||||
(__mmask8) __U);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_conflict_epi32 (__m512i __A)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_vpconflictsi_512_mask ((__v16si) __A,
|
||||
(__v16si) _mm512_setzero_si512 (),
|
||||
(__mmask16) -1);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_conflict_epi32 (__m512i __W, __mmask16 __U, __m512i __A)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_vpconflictsi_512_mask ((__v16si) __A,
|
||||
(__v16si) __W,
|
||||
(__mmask16) __U);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_conflict_epi32 (__mmask16 __U, __m512i __A)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_vpconflictsi_512_mask ((__v16si) __A,
|
||||
(__v16si) _mm512_setzero_si512 (),
|
||||
(__mmask16) __U);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_lzcnt_epi32 (__m512i __A)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_vplzcntd_512 ((__v16si) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_lzcnt_epi32 (__m512i __W, __mmask16 __U, __m512i __A)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectd_512((__mmask16)__U,
|
||||
(__v16si)_mm512_lzcnt_epi32(__A),
|
||||
(__v16si)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_lzcnt_epi32 (__mmask16 __U, __m512i __A)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectd_512((__mmask16)__U,
|
||||
(__v16si)_mm512_lzcnt_epi32(__A),
|
||||
(__v16si)_mm512_setzero_si512());
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_lzcnt_epi64 (__m512i __A)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_vplzcntq_512 ((__v8di) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_lzcnt_epi64 (__m512i __W, __mmask8 __U, __m512i __A)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectq_512((__mmask8)__U,
|
||||
(__v8di)_mm512_lzcnt_epi64(__A),
|
||||
(__v8di)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_lzcnt_epi64 (__mmask8 __U, __m512i __A)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectq_512((__mmask8)__U,
|
||||
(__v8di)_mm512_lzcnt_epi64(__A),
|
||||
(__v8di)_mm512_setzero_si512());
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_broadcastmb_epi64 (__mmask8 __A)
|
||||
{
|
||||
return (__m512i) _mm512_set1_epi64((long long) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_broadcastmw_epi32 (__mmask16 __A)
|
||||
{
|
||||
return (__m512i) _mm512_set1_epi32((int) __A);
|
||||
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif
|
||||
@@ -1,82 +0,0 @@
|
||||
/*===------------- avx512ifmaintrin.h - IFMA intrinsics ------------------===
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <avx512ifmaintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __IFMAINTRIN_H
|
||||
#define __IFMAINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx512ifma"), __min_vector_width__(512)))
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_madd52hi_epu64 (__m512i __X, __m512i __Y, __m512i __Z)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_vpmadd52huq512((__v8di) __X, (__v8di) __Y,
|
||||
(__v8di) __Z);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_madd52hi_epu64 (__m512i __W, __mmask8 __M, __m512i __X, __m512i __Y)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectq_512(__M,
|
||||
(__v8di)_mm512_madd52hi_epu64(__W, __X, __Y),
|
||||
(__v8di)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_madd52hi_epu64 (__mmask8 __M, __m512i __X, __m512i __Y, __m512i __Z)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectq_512(__M,
|
||||
(__v8di)_mm512_madd52hi_epu64(__X, __Y, __Z),
|
||||
(__v8di)_mm512_setzero_si512());
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_madd52lo_epu64 (__m512i __X, __m512i __Y, __m512i __Z)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_vpmadd52luq512((__v8di) __X, (__v8di) __Y,
|
||||
(__v8di) __Z);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_madd52lo_epu64 (__m512i __W, __mmask8 __M, __m512i __X, __m512i __Y)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectq_512(__M,
|
||||
(__v8di)_mm512_madd52lo_epu64(__W, __X, __Y),
|
||||
(__v8di)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_madd52lo_epu64 (__mmask8 __M, __m512i __X, __m512i __Y, __m512i __Z)
|
||||
{
|
||||
return (__m512i)__builtin_ia32_selectq_512(__M,
|
||||
(__v8di)_mm512_madd52lo_epu64(__X, __Y, __Z),
|
||||
(__v8di)_mm512_setzero_si512());
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif
|
||||
@@ -1,249 +0,0 @@
|
||||
/*===---- avx512vlcdintrin.h - AVX512VL and AVX512CD intrinsics ------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <avx512vlcdintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __AVX512VLCDINTRIN_H
|
||||
#define __AVX512VLCDINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS128 __attribute__((__always_inline__, __nodebug__, __target__("avx512vl,avx512cd"), __min_vector_width__(128)))
|
||||
#define __DEFAULT_FN_ATTRS256 __attribute__((__always_inline__, __nodebug__, __target__("avx512vl,avx512cd"), __min_vector_width__(256)))
|
||||
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_broadcastmb_epi64 (__mmask8 __A)
|
||||
{
|
||||
return (__m128i) _mm_set1_epi64x((long long) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_broadcastmb_epi64 (__mmask8 __A)
|
||||
{
|
||||
return (__m256i) _mm256_set1_epi64x((long long)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_broadcastmw_epi32 (__mmask16 __A)
|
||||
{
|
||||
return (__m128i) _mm_set1_epi32((int)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_broadcastmw_epi32 (__mmask16 __A)
|
||||
{
|
||||
return (__m256i) _mm256_set1_epi32((int)__A);
|
||||
}
|
||||
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_conflict_epi64 (__m128i __A)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_vpconflictdi_128_mask ((__v2di) __A,
|
||||
(__v2di) _mm_undefined_si128 (),
|
||||
(__mmask8) -1);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_conflict_epi64 (__m128i __W, __mmask8 __U, __m128i __A)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_vpconflictdi_128_mask ((__v2di) __A,
|
||||
(__v2di) __W,
|
||||
(__mmask8) __U);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_conflict_epi64 (__mmask8 __U, __m128i __A)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_vpconflictdi_128_mask ((__v2di) __A,
|
||||
(__v2di)
|
||||
_mm_setzero_si128 (),
|
||||
(__mmask8) __U);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_conflict_epi64 (__m256i __A)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_vpconflictdi_256_mask ((__v4di) __A,
|
||||
(__v4di) _mm256_undefined_si256 (),
|
||||
(__mmask8) -1);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_conflict_epi64 (__m256i __W, __mmask8 __U, __m256i __A)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_vpconflictdi_256_mask ((__v4di) __A,
|
||||
(__v4di) __W,
|
||||
(__mmask8) __U);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_conflict_epi64 (__mmask8 __U, __m256i __A)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_vpconflictdi_256_mask ((__v4di) __A,
|
||||
(__v4di) _mm256_setzero_si256 (),
|
||||
(__mmask8) __U);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_conflict_epi32 (__m128i __A)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_vpconflictsi_128_mask ((__v4si) __A,
|
||||
(__v4si) _mm_undefined_si128 (),
|
||||
(__mmask8) -1);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_conflict_epi32 (__m128i __W, __mmask8 __U, __m128i __A)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_vpconflictsi_128_mask ((__v4si) __A,
|
||||
(__v4si) __W,
|
||||
(__mmask8) __U);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_conflict_epi32 (__mmask8 __U, __m128i __A)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_vpconflictsi_128_mask ((__v4si) __A,
|
||||
(__v4si) _mm_setzero_si128 (),
|
||||
(__mmask8) __U);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_conflict_epi32 (__m256i __A)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_vpconflictsi_256_mask ((__v8si) __A,
|
||||
(__v8si) _mm256_undefined_si256 (),
|
||||
(__mmask8) -1);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_conflict_epi32 (__m256i __W, __mmask8 __U, __m256i __A)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_vpconflictsi_256_mask ((__v8si) __A,
|
||||
(__v8si) __W,
|
||||
(__mmask8) __U);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_conflict_epi32 (__mmask8 __U, __m256i __A)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_vpconflictsi_256_mask ((__v8si) __A,
|
||||
(__v8si)
|
||||
_mm256_setzero_si256 (),
|
||||
(__mmask8) __U);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_lzcnt_epi32 (__m128i __A)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_vplzcntd_128 ((__v4si) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_lzcnt_epi32 (__m128i __W, __mmask8 __U, __m128i __A)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectd_128((__mmask8)__U,
|
||||
(__v4si)_mm_lzcnt_epi32(__A),
|
||||
(__v4si)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_lzcnt_epi32 (__mmask8 __U, __m128i __A)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectd_128((__mmask8)__U,
|
||||
(__v4si)_mm_lzcnt_epi32(__A),
|
||||
(__v4si)_mm_setzero_si128());
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_lzcnt_epi32 (__m256i __A)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_vplzcntd_256 ((__v8si) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_lzcnt_epi32 (__m256i __W, __mmask8 __U, __m256i __A)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectd_256((__mmask8)__U,
|
||||
(__v8si)_mm256_lzcnt_epi32(__A),
|
||||
(__v8si)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_lzcnt_epi32 (__mmask8 __U, __m256i __A)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectd_256((__mmask8)__U,
|
||||
(__v8si)_mm256_lzcnt_epi32(__A),
|
||||
(__v8si)_mm256_setzero_si256());
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_lzcnt_epi64 (__m128i __A)
|
||||
{
|
||||
return (__m128i) __builtin_ia32_vplzcntq_128 ((__v2di) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_lzcnt_epi64 (__m128i __W, __mmask8 __U, __m128i __A)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectq_128((__mmask8)__U,
|
||||
(__v2di)_mm_lzcnt_epi64(__A),
|
||||
(__v2di)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_lzcnt_epi64 (__mmask8 __U, __m128i __A)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_selectq_128((__mmask8)__U,
|
||||
(__v2di)_mm_lzcnt_epi64(__A),
|
||||
(__v2di)_mm_setzero_si128());
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_lzcnt_epi64 (__m256i __A)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_vplzcntq_256 ((__v4di) __A);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_lzcnt_epi64 (__m256i __W, __mmask8 __U, __m256i __A)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectq_256((__mmask8)__U,
|
||||
(__v4di)_mm256_lzcnt_epi64(__A),
|
||||
(__v4di)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_lzcnt_epi64 (__mmask8 __U, __m256i __A)
|
||||
{
|
||||
return (__m256i)__builtin_ia32_selectq_256((__mmask8)__U,
|
||||
(__v4di)_mm256_lzcnt_epi64(__A),
|
||||
(__v4di)_mm256_setzero_si256());
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS128
|
||||
#undef __DEFAULT_FN_ATTRS256
|
||||
|
||||
#endif /* __AVX512VLCDINTRIN_H */
|
||||
@@ -1,68 +0,0 @@
|
||||
/*===----- avx512vpopcntdqintrin.h - AVX512VPOPCNTDQ intrinsics-------------===
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error \
|
||||
"Never use <avx512vpopcntdqintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __AVX512VPOPCNTDQINTRIN_H
|
||||
#define __AVX512VPOPCNTDQINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS \
|
||||
__attribute__((__always_inline__, __nodebug__, __target__("avx512vpopcntdq"), __min_vector_width__(512)))
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS _mm512_popcnt_epi64(__m512i __A) {
|
||||
return (__m512i)__builtin_ia32_vpopcntq_512((__v8di)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_popcnt_epi64(__m512i __W, __mmask8 __U, __m512i __A) {
|
||||
return (__m512i)__builtin_ia32_selectq_512(
|
||||
(__mmask8)__U, (__v8di)_mm512_popcnt_epi64(__A), (__v8di)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_popcnt_epi64(__mmask8 __U, __m512i __A) {
|
||||
return _mm512_mask_popcnt_epi64((__m512i)_mm512_setzero_si512(), __U, __A);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS _mm512_popcnt_epi32(__m512i __A) {
|
||||
return (__m512i)__builtin_ia32_vpopcntd_512((__v16si)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_popcnt_epi32(__m512i __W, __mmask16 __U, __m512i __A) {
|
||||
return (__m512i)__builtin_ia32_selectd_512(
|
||||
(__mmask16)__U, (__v16si)_mm512_popcnt_epi32(__A), (__v16si)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_popcnt_epi32(__mmask16 __U, __m512i __A) {
|
||||
return _mm512_mask_popcnt_epi32((__m512i)_mm512_setzero_si512(), __U, __A);
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif
|
||||
@@ -1,105 +0,0 @@
|
||||
/*===---- avx512vpopcntdqintrin.h - AVX512VPOPCNTDQ intrinsics -------------===
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error \
|
||||
"Never use <avx512vpopcntdqvlintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __AVX512VPOPCNTDQVLINTRIN_H
|
||||
#define __AVX512VPOPCNTDQVLINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS128 \
|
||||
__attribute__((__always_inline__, __nodebug__, __target__("avx512vpopcntdq,avx512vl"), __min_vector_width__(128)))
|
||||
#define __DEFAULT_FN_ATTRS256 \
|
||||
__attribute__((__always_inline__, __nodebug__, __target__("avx512vpopcntdq,avx512vl"), __min_vector_width__(256)))
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_popcnt_epi64(__m128i __A) {
|
||||
return (__m128i)__builtin_ia32_vpopcntq_128((__v2di)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_popcnt_epi64(__m128i __W, __mmask8 __U, __m128i __A) {
|
||||
return (__m128i)__builtin_ia32_selectq_128(
|
||||
(__mmask8)__U, (__v2di)_mm_popcnt_epi64(__A), (__v2di)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_popcnt_epi64(__mmask8 __U, __m128i __A) {
|
||||
return _mm_mask_popcnt_epi64((__m128i)_mm_setzero_si128(), __U, __A);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_popcnt_epi32(__m128i __A) {
|
||||
return (__m128i)__builtin_ia32_vpopcntd_128((__v4si)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_mask_popcnt_epi32(__m128i __W, __mmask8 __U, __m128i __A) {
|
||||
return (__m128i)__builtin_ia32_selectd_128(
|
||||
(__mmask8)__U, (__v4si)_mm_popcnt_epi32(__A), (__v4si)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS128
|
||||
_mm_maskz_popcnt_epi32(__mmask8 __U, __m128i __A) {
|
||||
return _mm_mask_popcnt_epi32((__m128i)_mm_setzero_si128(), __U, __A);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_popcnt_epi64(__m256i __A) {
|
||||
return (__m256i)__builtin_ia32_vpopcntq_256((__v4di)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_popcnt_epi64(__m256i __W, __mmask8 __U, __m256i __A) {
|
||||
return (__m256i)__builtin_ia32_selectq_256(
|
||||
(__mmask8)__U, (__v4di)_mm256_popcnt_epi64(__A), (__v4di)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_popcnt_epi64(__mmask8 __U, __m256i __A) {
|
||||
return _mm256_mask_popcnt_epi64((__m256i)_mm256_setzero_si256(), __U, __A);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_popcnt_epi32(__m256i __A) {
|
||||
return (__m256i)__builtin_ia32_vpopcntd_256((__v8si)__A);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_mask_popcnt_epi32(__m256i __W, __mmask8 __U, __m256i __A) {
|
||||
return (__m256i)__builtin_ia32_selectd_256(
|
||||
(__mmask8)__U, (__v8si)_mm256_popcnt_epi32(__A), (__v8si)__W);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS256
|
||||
_mm256_maskz_popcnt_epi32(__mmask8 __U, __m256i __A) {
|
||||
return _mm256_mask_popcnt_epi32((__m256i)_mm256_setzero_si256(), __U, __A);
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS128
|
||||
#undef __DEFAULT_FN_ATTRS256
|
||||
|
||||
#endif
|
||||
@@ -1,95 +0,0 @@
|
||||
/*===---- bmi2intrin.h - BMI2 intrinsics -----------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H
|
||||
#error "Never use <bmi2intrin.h> directly; include <x86intrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __BMI2INTRIN_H
|
||||
#define __BMI2INTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("bmi2")))
|
||||
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
||||
_bzhi_u32(unsigned int __X, unsigned int __Y)
|
||||
{
|
||||
return __builtin_ia32_bzhi_si(__X, __Y);
|
||||
}
|
||||
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
||||
_pdep_u32(unsigned int __X, unsigned int __Y)
|
||||
{
|
||||
return __builtin_ia32_pdep_si(__X, __Y);
|
||||
}
|
||||
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
||||
_pext_u32(unsigned int __X, unsigned int __Y)
|
||||
{
|
||||
return __builtin_ia32_pext_si(__X, __Y);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
|
||||
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
||||
_bzhi_u64(unsigned long long __X, unsigned long long __Y)
|
||||
{
|
||||
return __builtin_ia32_bzhi_di(__X, __Y);
|
||||
}
|
||||
|
||||
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
||||
_pdep_u64(unsigned long long __X, unsigned long long __Y)
|
||||
{
|
||||
return __builtin_ia32_pdep_di(__X, __Y);
|
||||
}
|
||||
|
||||
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
||||
_pext_u64(unsigned long long __X, unsigned long long __Y)
|
||||
{
|
||||
return __builtin_ia32_pext_di(__X, __Y);
|
||||
}
|
||||
|
||||
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
||||
_mulx_u64 (unsigned long long __X, unsigned long long __Y,
|
||||
unsigned long long *__P)
|
||||
{
|
||||
unsigned __int128 __res = (unsigned __int128) __X * __Y;
|
||||
*__P = (unsigned long long) (__res >> 64);
|
||||
return (unsigned long long) __res;
|
||||
}
|
||||
|
||||
#else /* !__x86_64__ */
|
||||
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
||||
_mulx_u32 (unsigned int __X, unsigned int __Y, unsigned int *__P)
|
||||
{
|
||||
unsigned long long __res = (unsigned long long) __X * __Y;
|
||||
*__P = (unsigned int) (__res >> 32);
|
||||
return (unsigned int) __res;
|
||||
}
|
||||
|
||||
#endif /* !__x86_64__ */
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif /* __BMI2INTRIN_H */
|
||||
@@ -1,113 +0,0 @@
|
||||
/*===---- cetintrin.h - CET intrinsic --------------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <cetintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __CETINTRIN_H
|
||||
#define __CETINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS \
|
||||
__attribute__((__always_inline__, __nodebug__, __target__("shstk")))
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS _incsspd(int __a) {
|
||||
__builtin_ia32_incsspd(__a);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
static __inline__ void __DEFAULT_FN_ATTRS _incsspq(unsigned long long __a) {
|
||||
__builtin_ia32_incsspq(__a);
|
||||
}
|
||||
#endif /* __x86_64__ */
|
||||
|
||||
#ifdef __x86_64__
|
||||
static __inline__ void __DEFAULT_FN_ATTRS _inc_ssp(unsigned int __a) {
|
||||
__builtin_ia32_incsspq(__a);
|
||||
}
|
||||
#else /* __x86_64__ */
|
||||
static __inline__ void __DEFAULT_FN_ATTRS _inc_ssp(unsigned int __a) {
|
||||
__builtin_ia32_incsspd((int)__a);
|
||||
}
|
||||
#endif /* __x86_64__ */
|
||||
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS _rdsspd(unsigned int __a) {
|
||||
return __builtin_ia32_rdsspd(__a);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
static __inline__ unsigned long long __DEFAULT_FN_ATTRS _rdsspq(unsigned long long __a) {
|
||||
return __builtin_ia32_rdsspq(__a);
|
||||
}
|
||||
#endif /* __x86_64__ */
|
||||
|
||||
#ifdef __x86_64__
|
||||
static __inline__ unsigned long long __DEFAULT_FN_ATTRS _get_ssp(void) {
|
||||
return __builtin_ia32_rdsspq(0);
|
||||
}
|
||||
#else /* __x86_64__ */
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS _get_ssp(void) {
|
||||
return __builtin_ia32_rdsspd(0);
|
||||
}
|
||||
#endif /* __x86_64__ */
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS _saveprevssp() {
|
||||
__builtin_ia32_saveprevssp();
|
||||
}
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS _rstorssp(void * __p) {
|
||||
__builtin_ia32_rstorssp(__p);
|
||||
}
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS _wrssd(unsigned int __a, void * __p) {
|
||||
__builtin_ia32_wrssd(__a, __p);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
static __inline__ void __DEFAULT_FN_ATTRS _wrssq(unsigned long long __a, void * __p) {
|
||||
__builtin_ia32_wrssq(__a, __p);
|
||||
}
|
||||
#endif /* __x86_64__ */
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS _wrussd(unsigned int __a, void * __p) {
|
||||
__builtin_ia32_wrussd(__a, __p);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
static __inline__ void __DEFAULT_FN_ATTRS _wrussq(unsigned long long __a, void * __p) {
|
||||
__builtin_ia32_wrussq(__a, __p);
|
||||
}
|
||||
#endif /* __x86_64__ */
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS _setssbsy() {
|
||||
__builtin_ia32_setssbsy();
|
||||
}
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS _clrssbsy(void * __p) {
|
||||
__builtin_ia32_clrssbsy(__p);
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif /* __CETINTRIN_H */
|
||||
@@ -1,42 +0,0 @@
|
||||
/*===---- cldemoteintrin.h - CLDEMOTE intrinsic ----------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H
|
||||
#error "Never use <cldemoteintrin.h> directly; include <x86intrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __CLDEMOTEINTRIN_H
|
||||
#define __CLDEMOTEINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS \
|
||||
__attribute__((__always_inline__, __nodebug__, __target__("cldemote")))
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_cldemote(const void * __P) {
|
||||
__builtin_ia32_cldemote(__P);
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif
|
||||
@@ -1,41 +0,0 @@
|
||||
/*===---- clflushoptintrin.h - CLFLUSHOPT intrinsic ------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <clflushoptintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __CLFLUSHOPTINTRIN_H
|
||||
#define __CLFLUSHOPTINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("clflushopt")))
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_mm_clflushopt(void const * __m) {
|
||||
__builtin_ia32_clflushopt(__m);
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif
|
||||
@@ -1,52 +0,0 @@
|
||||
/*===---- clwbintrin.h - CLWB intrinsic ------------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <clwbintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __CLWBINTRIN_H
|
||||
#define __CLWBINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("clwb")))
|
||||
|
||||
/// Writes back to memory the cache line (if modified) that contains the
|
||||
/// linear address specified in \a __p from any level of the cache hierarchy in
|
||||
/// the cache coherence domain
|
||||
///
|
||||
/// \headerfile <immintrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> CLWB </c> instruction.
|
||||
///
|
||||
/// \param __p
|
||||
/// A pointer to the memory location used to identify the cache line to be
|
||||
/// written back.
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_mm_clwb(void const *__p) {
|
||||
__builtin_ia32_clwb(__p);
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif
|
||||
@@ -1,50 +0,0 @@
|
||||
/*===----------------------- clzerointrin.h - CLZERO ----------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H
|
||||
#error "Never use <clzerointrin.h> directly; include <x86intrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __CLZEROINTRIN_H
|
||||
#define __CLZEROINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS \
|
||||
__attribute__((__always_inline__, __nodebug__, __target__("clzero")))
|
||||
|
||||
/// Loads the cache line address and zero's out the cacheline
|
||||
///
|
||||
/// \headerfile <clzerointrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> CLZERO </c> instruction.
|
||||
///
|
||||
/// \param __line
|
||||
/// A pointer to a cacheline which needs to be zeroed out.
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_mm_clzero (void * __line)
|
||||
{
|
||||
__builtin_ia32_clzero ((void *)__line);
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif /* __CLZEROINTRIN_H */
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,166 +0,0 @@
|
||||
/*===---- float.h - Characteristics of floating point types ----------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __CLANG_FLOAT_H
|
||||
#define __CLANG_FLOAT_H
|
||||
|
||||
/* If we're on MinGW, fall back to the system's float.h, which might have
|
||||
* additional definitions provided for Windows.
|
||||
* For more details see http://msdn.microsoft.com/en-us/library/y0ybw9fy.aspx
|
||||
*
|
||||
* Also fall back on Darwin to allow additional definitions and
|
||||
* implementation-defined values.
|
||||
*/
|
||||
#if (defined(__APPLE__) || (defined(__MINGW32__) || defined(_MSC_VER))) && \
|
||||
__STDC_HOSTED__ && __has_include_next(<float.h>)
|
||||
|
||||
/* Prior to Apple's 10.7 SDK, float.h SDK header used to apply an extra level
|
||||
* of #include_next<float.h> to keep Metrowerks compilers happy. Avoid this
|
||||
* extra indirection.
|
||||
*/
|
||||
#ifdef __APPLE__
|
||||
#define _FLOAT_H_
|
||||
#endif
|
||||
|
||||
# include_next <float.h>
|
||||
|
||||
/* Undefine anything that we'll be redefining below. */
|
||||
# undef FLT_EVAL_METHOD
|
||||
# undef FLT_ROUNDS
|
||||
# undef FLT_RADIX
|
||||
# undef FLT_MANT_DIG
|
||||
# undef DBL_MANT_DIG
|
||||
# undef LDBL_MANT_DIG
|
||||
# if __STDC_VERSION__ >= 199901L || !defined(__STRICT_ANSI__)
|
||||
# undef DECIMAL_DIG
|
||||
# endif
|
||||
# undef FLT_DIG
|
||||
# undef DBL_DIG
|
||||
# undef LDBL_DIG
|
||||
# undef FLT_MIN_EXP
|
||||
# undef DBL_MIN_EXP
|
||||
# undef LDBL_MIN_EXP
|
||||
# undef FLT_MIN_10_EXP
|
||||
# undef DBL_MIN_10_EXP
|
||||
# undef LDBL_MIN_10_EXP
|
||||
# undef FLT_MAX_EXP
|
||||
# undef DBL_MAX_EXP
|
||||
# undef LDBL_MAX_EXP
|
||||
# undef FLT_MAX_10_EXP
|
||||
# undef DBL_MAX_10_EXP
|
||||
# undef LDBL_MAX_10_EXP
|
||||
# undef FLT_MAX
|
||||
# undef DBL_MAX
|
||||
# undef LDBL_MAX
|
||||
# undef FLT_EPSILON
|
||||
# undef DBL_EPSILON
|
||||
# undef LDBL_EPSILON
|
||||
# undef FLT_MIN
|
||||
# undef DBL_MIN
|
||||
# undef LDBL_MIN
|
||||
# if __STDC_VERSION__ >= 201112L || !defined(__STRICT_ANSI__)
|
||||
# undef FLT_TRUE_MIN
|
||||
# undef DBL_TRUE_MIN
|
||||
# undef LDBL_TRUE_MIN
|
||||
# undef FLT_DECIMAL_DIG
|
||||
# undef DBL_DECIMAL_DIG
|
||||
# undef LDBL_DECIMAL_DIG
|
||||
# undef FLT_HAS_SUBNORM
|
||||
# undef DBL_HAS_SUBNORM
|
||||
# undef LDBL_HAS_SUBNORM
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Characteristics of floating point types, C99 5.2.4.2.2 */
|
||||
|
||||
#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
|
||||
#define FLT_ROUNDS (__builtin_flt_rounds())
|
||||
#define FLT_RADIX __FLT_RADIX__
|
||||
|
||||
#define FLT_MANT_DIG __FLT_MANT_DIG__
|
||||
#define DBL_MANT_DIG __DBL_MANT_DIG__
|
||||
#define LDBL_MANT_DIG __LDBL_MANT_DIG__
|
||||
|
||||
#if __STDC_VERSION__ >= 199901L || !defined(__STRICT_ANSI__)
|
||||
# define DECIMAL_DIG __DECIMAL_DIG__
|
||||
#endif
|
||||
|
||||
#define FLT_DIG __FLT_DIG__
|
||||
#define DBL_DIG __DBL_DIG__
|
||||
#define LDBL_DIG __LDBL_DIG__
|
||||
|
||||
#define FLT_MIN_EXP __FLT_MIN_EXP__
|
||||
#define DBL_MIN_EXP __DBL_MIN_EXP__
|
||||
#define LDBL_MIN_EXP __LDBL_MIN_EXP__
|
||||
|
||||
#define FLT_MIN_10_EXP __FLT_MIN_10_EXP__
|
||||
#define DBL_MIN_10_EXP __DBL_MIN_10_EXP__
|
||||
#define LDBL_MIN_10_EXP __LDBL_MIN_10_EXP__
|
||||
|
||||
#define FLT_MAX_EXP __FLT_MAX_EXP__
|
||||
#define DBL_MAX_EXP __DBL_MAX_EXP__
|
||||
#define LDBL_MAX_EXP __LDBL_MAX_EXP__
|
||||
|
||||
#define FLT_MAX_10_EXP __FLT_MAX_10_EXP__
|
||||
#define DBL_MAX_10_EXP __DBL_MAX_10_EXP__
|
||||
#define LDBL_MAX_10_EXP __LDBL_MAX_10_EXP__
|
||||
|
||||
#define FLT_MAX __FLT_MAX__
|
||||
#define DBL_MAX __DBL_MAX__
|
||||
#define LDBL_MAX __LDBL_MAX__
|
||||
|
||||
#define FLT_EPSILON __FLT_EPSILON__
|
||||
#define DBL_EPSILON __DBL_EPSILON__
|
||||
#define LDBL_EPSILON __LDBL_EPSILON__
|
||||
|
||||
#define FLT_MIN __FLT_MIN__
|
||||
#define DBL_MIN __DBL_MIN__
|
||||
#define LDBL_MIN __LDBL_MIN__
|
||||
|
||||
#if __STDC_VERSION__ >= 201112L || !defined(__STRICT_ANSI__)
|
||||
# define FLT_TRUE_MIN __FLT_DENORM_MIN__
|
||||
# define DBL_TRUE_MIN __DBL_DENORM_MIN__
|
||||
# define LDBL_TRUE_MIN __LDBL_DENORM_MIN__
|
||||
# define FLT_DECIMAL_DIG __FLT_DECIMAL_DIG__
|
||||
# define DBL_DECIMAL_DIG __DBL_DECIMAL_DIG__
|
||||
# define LDBL_DECIMAL_DIG __LDBL_DECIMAL_DIG__
|
||||
# define FLT_HAS_SUBNORM __FLT_HAS_DENORM__
|
||||
# define DBL_HAS_SUBNORM __DBL_HAS_DENORM__
|
||||
# define LDBL_HAS_SUBNORM __LDBL_HAS_DENORM__
|
||||
#endif
|
||||
|
||||
#ifdef __STDC_WANT_IEC_60559_TYPES_EXT__
|
||||
# define FLT16_MANT_DIG __FLT16_MANT_DIG__
|
||||
# define FLT16_DECIMAL_DIG __FLT16_DECIMAL_DIG__
|
||||
# define FLT16_DIG __FLT16_DIG__
|
||||
# define FLT16_MIN_EXP __FLT16_MIN_EXP__
|
||||
# define FLT16_MIN_10_EXP __FLT16_MIN_10_EXP__
|
||||
# define FLT16_MAX_EXP __FLT16_MAX_EXP__
|
||||
# define FLT16_MAX_10_EXP __FLT16_MAX_10_EXP__
|
||||
# define FLT16_MAX __FLT16_MAX__
|
||||
# define FLT16_EPSILON __FLT16_EPSILON__
|
||||
# define FLT16_MIN __FLT16_MIN__
|
||||
# define FLT16_TRUE_MIN __FLT16_TRUE_MIN__
|
||||
#endif /* __STDC_WANT_IEC_60559_TYPES_EXT__ */
|
||||
|
||||
#endif /* __CLANG_FLOAT_H */
|
||||
@@ -1,105 +0,0 @@
|
||||
/*===---- fxsrintrin.h - FXSR intrinsic ------------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <fxsrintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __FXSRINTRIN_H
|
||||
#define __FXSRINTRIN_H
|
||||
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("fxsr")))
|
||||
|
||||
/// Saves the XMM, MMX, MXCSR and x87 FPU registers into a 512-byte
|
||||
/// memory region pointed to by the input parameter \a __p.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> FXSAVE </c> instruction.
|
||||
///
|
||||
/// \param __p
|
||||
/// A pointer to a 512-byte memory region. The beginning of this memory
|
||||
/// region should be aligned on a 16-byte boundary.
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_fxsave(void *__p)
|
||||
{
|
||||
__builtin_ia32_fxsave(__p);
|
||||
}
|
||||
|
||||
/// Restores the XMM, MMX, MXCSR and x87 FPU registers from the 512-byte
|
||||
/// memory region pointed to by the input parameter \a __p. The contents of
|
||||
/// this memory region should have been written to by a previous \c _fxsave
|
||||
/// or \c _fxsave64 intrinsic.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> FXRSTOR </c> instruction.
|
||||
///
|
||||
/// \param __p
|
||||
/// A pointer to a 512-byte memory region. The beginning of this memory
|
||||
/// region should be aligned on a 16-byte boundary.
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_fxrstor(void *__p)
|
||||
{
|
||||
__builtin_ia32_fxrstor(__p);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
/// Saves the XMM, MMX, MXCSR and x87 FPU registers into a 512-byte
|
||||
/// memory region pointed to by the input parameter \a __p.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> FXSAVE64 </c> instruction.
|
||||
///
|
||||
/// \param __p
|
||||
/// A pointer to a 512-byte memory region. The beginning of this memory
|
||||
/// region should be aligned on a 16-byte boundary.
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_fxsave64(void *__p)
|
||||
{
|
||||
__builtin_ia32_fxsave64(__p);
|
||||
}
|
||||
|
||||
/// Restores the XMM, MMX, MXCSR and x87 FPU registers from the 512-byte
|
||||
/// memory region pointed to by the input parameter \a __p. The contents of
|
||||
/// this memory region should have been written to by a previous \c _fxsave
|
||||
/// or \c _fxsave64 intrinsic.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> FXRSTOR64 </c> instruction.
|
||||
///
|
||||
/// \param __p
|
||||
/// A pointer to a 512-byte memory region. The beginning of this memory
|
||||
/// region should be aligned on a 16-byte boundary.
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_fxrstor64(void *__p)
|
||||
{
|
||||
__builtin_ia32_fxrstor64(__p);
|
||||
}
|
||||
#endif
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif
|
||||
@@ -1,78 +0,0 @@
|
||||
/* ===-------- ia32intrin.h ---------------------------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __X86INTRIN_H
|
||||
#error "Never use <ia32intrin.h> directly; include <x86intrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __IA32INTRIN_H
|
||||
#define __IA32INTRIN_H
|
||||
|
||||
#ifdef __x86_64__
|
||||
static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__))
|
||||
__readeflags(void)
|
||||
{
|
||||
return __builtin_ia32_readeflags_u64();
|
||||
}
|
||||
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||
__writeeflags(unsigned long long __f)
|
||||
{
|
||||
__builtin_ia32_writeeflags_u64(__f);
|
||||
}
|
||||
|
||||
#else /* !__x86_64__ */
|
||||
static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
|
||||
__readeflags(void)
|
||||
{
|
||||
return __builtin_ia32_readeflags_u32();
|
||||
}
|
||||
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||
__writeeflags(unsigned int __f)
|
||||
{
|
||||
__builtin_ia32_writeeflags_u32(__f);
|
||||
}
|
||||
#endif /* !__x86_64__ */
|
||||
|
||||
static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__))
|
||||
__rdpmc(int __A) {
|
||||
return __builtin_ia32_rdpmc(__A);
|
||||
}
|
||||
|
||||
/* __rdtscp */
|
||||
static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__))
|
||||
__rdtscp(unsigned int *__A) {
|
||||
return __builtin_ia32_rdtscp(__A);
|
||||
}
|
||||
|
||||
#define _rdtsc() __rdtsc()
|
||||
|
||||
#define _rdpmc(A) __rdpmc(A)
|
||||
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||
_wbinvd(void) {
|
||||
__builtin_ia32_wbinvd();
|
||||
}
|
||||
|
||||
#endif /* __IA32INTRIN_H */
|
||||
@@ -1,619 +0,0 @@
|
||||
/* ===-------- intrin.h ---------------------------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
/* Only include this if we're compiling for the windows platform. */
|
||||
#ifndef _MSC_VER
|
||||
#include_next <intrin.h>
|
||||
#else
|
||||
|
||||
#ifndef __INTRIN_H
|
||||
#define __INTRIN_H
|
||||
|
||||
/* First include the standard intrinsics. */
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
#include <x86intrin.h>
|
||||
#endif
|
||||
|
||||
#if defined(__arm__)
|
||||
#include <armintr.h>
|
||||
#endif
|
||||
|
||||
#if defined(__aarch64__)
|
||||
#include <arm64intr.h>
|
||||
#endif
|
||||
|
||||
/* For the definition of jmp_buf. */
|
||||
#if __STDC_HOSTED__
|
||||
#include <setjmp.h>
|
||||
#endif
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__))
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(__MMX__)
|
||||
/* And the random ones that aren't in those files. */
|
||||
__m64 _m_from_float(float);
|
||||
float _m_to_float(__m64);
|
||||
#endif
|
||||
|
||||
/* Other assorted instruction intrinsics. */
|
||||
void __addfsbyte(unsigned long, unsigned char);
|
||||
void __addfsdword(unsigned long, unsigned long);
|
||||
void __addfsword(unsigned long, unsigned short);
|
||||
void __code_seg(const char *);
|
||||
static __inline__
|
||||
void __cpuid(int[4], int);
|
||||
static __inline__
|
||||
void __cpuidex(int[4], int, int);
|
||||
static __inline__
|
||||
__int64 __emul(int, int);
|
||||
static __inline__
|
||||
unsigned __int64 __emulu(unsigned int, unsigned int);
|
||||
unsigned int __getcallerseflags(void);
|
||||
static __inline__
|
||||
void __halt(void);
|
||||
unsigned char __inbyte(unsigned short);
|
||||
void __inbytestring(unsigned short, unsigned char *, unsigned long);
|
||||
void __incfsbyte(unsigned long);
|
||||
void __incfsdword(unsigned long);
|
||||
void __incfsword(unsigned long);
|
||||
unsigned long __indword(unsigned short);
|
||||
void __indwordstring(unsigned short, unsigned long *, unsigned long);
|
||||
void __int2c(void);
|
||||
void __invlpg(void *);
|
||||
unsigned short __inword(unsigned short);
|
||||
void __inwordstring(unsigned short, unsigned short *, unsigned long);
|
||||
void __lidt(void *);
|
||||
unsigned __int64 __ll_lshift(unsigned __int64, int);
|
||||
__int64 __ll_rshift(__int64, int);
|
||||
static __inline__
|
||||
void __movsb(unsigned char *, unsigned char const *, size_t);
|
||||
static __inline__
|
||||
void __movsd(unsigned long *, unsigned long const *, size_t);
|
||||
static __inline__
|
||||
void __movsw(unsigned short *, unsigned short const *, size_t);
|
||||
static __inline__
|
||||
void __nop(void);
|
||||
void __nvreg_restore_fence(void);
|
||||
void __nvreg_save_fence(void);
|
||||
void __outbyte(unsigned short, unsigned char);
|
||||
void __outbytestring(unsigned short, unsigned char *, unsigned long);
|
||||
void __outdword(unsigned short, unsigned long);
|
||||
void __outdwordstring(unsigned short, unsigned long *, unsigned long);
|
||||
void __outword(unsigned short, unsigned short);
|
||||
void __outwordstring(unsigned short, unsigned short *, unsigned long);
|
||||
unsigned long __readcr0(void);
|
||||
unsigned long __readcr2(void);
|
||||
static __inline__
|
||||
unsigned long __readcr3(void);
|
||||
unsigned long __readcr4(void);
|
||||
unsigned long __readcr8(void);
|
||||
unsigned int __readdr(unsigned int);
|
||||
#ifdef __i386__
|
||||
static __inline__
|
||||
unsigned char __readfsbyte(unsigned long);
|
||||
static __inline__
|
||||
unsigned __int64 __readfsqword(unsigned long);
|
||||
static __inline__
|
||||
unsigned short __readfsword(unsigned long);
|
||||
#endif
|
||||
static __inline__
|
||||
unsigned __int64 __readmsr(unsigned long);
|
||||
unsigned __int64 __readpmc(unsigned long);
|
||||
unsigned long __segmentlimit(unsigned long);
|
||||
void __sidt(void *);
|
||||
static __inline__
|
||||
void __stosb(unsigned char *, unsigned char, size_t);
|
||||
static __inline__
|
||||
void __stosd(unsigned long *, unsigned long, size_t);
|
||||
static __inline__
|
||||
void __stosw(unsigned short *, unsigned short, size_t);
|
||||
void __svm_clgi(void);
|
||||
void __svm_invlpga(void *, int);
|
||||
void __svm_skinit(int);
|
||||
void __svm_stgi(void);
|
||||
void __svm_vmload(size_t);
|
||||
void __svm_vmrun(size_t);
|
||||
void __svm_vmsave(size_t);
|
||||
void __ud2(void);
|
||||
unsigned __int64 __ull_rshift(unsigned __int64, int);
|
||||
void __vmx_off(void);
|
||||
void __vmx_vmptrst(unsigned __int64 *);
|
||||
void __wbinvd(void);
|
||||
void __writecr0(unsigned int);
|
||||
static __inline__
|
||||
void __writecr3(unsigned int);
|
||||
void __writecr4(unsigned int);
|
||||
void __writecr8(unsigned int);
|
||||
void __writedr(unsigned int, unsigned int);
|
||||
void __writefsbyte(unsigned long, unsigned char);
|
||||
void __writefsdword(unsigned long, unsigned long);
|
||||
void __writefsqword(unsigned long, unsigned __int64);
|
||||
void __writefsword(unsigned long, unsigned short);
|
||||
void __writemsr(unsigned long, unsigned __int64);
|
||||
static __inline__
|
||||
void *_AddressOfReturnAddress(void);
|
||||
static __inline__
|
||||
unsigned char _BitScanForward(unsigned long *_Index, unsigned long _Mask);
|
||||
static __inline__
|
||||
unsigned char _BitScanReverse(unsigned long *_Index, unsigned long _Mask);
|
||||
unsigned char _bittest(long const *, long);
|
||||
unsigned char _bittestandcomplement(long *, long);
|
||||
unsigned char _bittestandreset(long *, long);
|
||||
unsigned char _bittestandset(long *, long);
|
||||
void __cdecl _disable(void);
|
||||
void __cdecl _enable(void);
|
||||
long _InterlockedAddLargeStatistic(__int64 volatile *_Addend, long _Value);
|
||||
unsigned char _interlockedbittestandreset(long volatile *, long);
|
||||
unsigned char _interlockedbittestandset(long volatile *, long);
|
||||
void *_InterlockedCompareExchangePointer_HLEAcquire(void *volatile *, void *,
|
||||
void *);
|
||||
void *_InterlockedCompareExchangePointer_HLERelease(void *volatile *, void *,
|
||||
void *);
|
||||
long _InterlockedExchangeAdd_HLEAcquire(long volatile *, long);
|
||||
long _InterlockedExchangeAdd_HLERelease(long volatile *, long);
|
||||
__int64 _InterlockedExchangeAdd64_HLEAcquire(__int64 volatile *, __int64);
|
||||
__int64 _InterlockedExchangeAdd64_HLERelease(__int64 volatile *, __int64);
|
||||
void __cdecl _invpcid(unsigned int, void *);
|
||||
static __inline__ void
|
||||
__attribute__((__deprecated__("use other intrinsics or C++11 atomics instead")))
|
||||
_ReadBarrier(void);
|
||||
static __inline__ void
|
||||
__attribute__((__deprecated__("use other intrinsics or C++11 atomics instead")))
|
||||
_ReadWriteBarrier(void);
|
||||
unsigned int _rorx_u32(unsigned int, const unsigned int);
|
||||
int _sarx_i32(int, unsigned int);
|
||||
#if __STDC_HOSTED__
|
||||
int __cdecl _setjmp(jmp_buf);
|
||||
#endif
|
||||
unsigned int _shlx_u32(unsigned int, unsigned int);
|
||||
unsigned int _shrx_u32(unsigned int, unsigned int);
|
||||
void _Store_HLERelease(long volatile *, long);
|
||||
void _Store64_HLERelease(__int64 volatile *, __int64);
|
||||
void _StorePointer_HLERelease(void *volatile *, void *);
|
||||
static __inline__ void
|
||||
__attribute__((__deprecated__("use other intrinsics or C++11 atomics instead")))
|
||||
_WriteBarrier(void);
|
||||
unsigned __int32 xbegin(void);
|
||||
void _xend(void);
|
||||
static __inline__
|
||||
#define _XCR_XFEATURE_ENABLED_MASK 0
|
||||
unsigned __int64 __cdecl _xgetbv(unsigned int);
|
||||
void __cdecl _xsetbv(unsigned int, unsigned __int64);
|
||||
|
||||
/* These additional intrinsics are turned on in x64/amd64/x86_64 mode. */
|
||||
#ifdef __x86_64__
|
||||
void __addgsbyte(unsigned long, unsigned char);
|
||||
void __addgsdword(unsigned long, unsigned long);
|
||||
void __addgsqword(unsigned long, unsigned __int64);
|
||||
void __addgsword(unsigned long, unsigned short);
|
||||
static __inline__
|
||||
void __faststorefence(void);
|
||||
void __incgsbyte(unsigned long);
|
||||
void __incgsdword(unsigned long);
|
||||
void __incgsqword(unsigned long);
|
||||
void __incgsword(unsigned long);
|
||||
static __inline__
|
||||
void __movsq(unsigned long long *, unsigned long long const *, size_t);
|
||||
static __inline__
|
||||
unsigned char __readgsbyte(unsigned long);
|
||||
static __inline__
|
||||
unsigned long __readgsdword(unsigned long);
|
||||
static __inline__
|
||||
unsigned __int64 __readgsqword(unsigned long);
|
||||
unsigned short __readgsword(unsigned long);
|
||||
unsigned __int64 __shiftleft128(unsigned __int64 _LowPart,
|
||||
unsigned __int64 _HighPart,
|
||||
unsigned char _Shift);
|
||||
unsigned __int64 __shiftright128(unsigned __int64 _LowPart,
|
||||
unsigned __int64 _HighPart,
|
||||
unsigned char _Shift);
|
||||
static __inline__
|
||||
void __stosq(unsigned __int64 *, unsigned __int64, size_t);
|
||||
unsigned char __vmx_on(unsigned __int64 *);
|
||||
unsigned char __vmx_vmclear(unsigned __int64 *);
|
||||
unsigned char __vmx_vmlaunch(void);
|
||||
unsigned char __vmx_vmptrld(unsigned __int64 *);
|
||||
unsigned char __vmx_vmread(size_t, size_t *);
|
||||
unsigned char __vmx_vmresume(void);
|
||||
unsigned char __vmx_vmwrite(size_t, size_t);
|
||||
void __writegsbyte(unsigned long, unsigned char);
|
||||
void __writegsdword(unsigned long, unsigned long);
|
||||
void __writegsqword(unsigned long, unsigned __int64);
|
||||
void __writegsword(unsigned long, unsigned short);
|
||||
unsigned char _bittest64(__int64 const *, __int64);
|
||||
unsigned char _bittestandcomplement64(__int64 *, __int64);
|
||||
unsigned char _bittestandreset64(__int64 *, __int64);
|
||||
unsigned char _bittestandset64(__int64 *, __int64);
|
||||
long _InterlockedAnd_np(long volatile *_Value, long _Mask);
|
||||
short _InterlockedAnd16_np(short volatile *_Value, short _Mask);
|
||||
__int64 _InterlockedAnd64_np(__int64 volatile *_Value, __int64 _Mask);
|
||||
char _InterlockedAnd8_np(char volatile *_Value, char _Mask);
|
||||
unsigned char _interlockedbittestandreset64(__int64 volatile *, __int64);
|
||||
unsigned char _interlockedbittestandset64(__int64 volatile *, __int64);
|
||||
long _InterlockedCompareExchange_np(long volatile *_Destination, long _Exchange,
|
||||
long _Comparand);
|
||||
unsigned char _InterlockedCompareExchange128(__int64 volatile *_Destination,
|
||||
__int64 _ExchangeHigh,
|
||||
__int64 _ExchangeLow,
|
||||
__int64 *_CompareandResult);
|
||||
unsigned char _InterlockedCompareExchange128_np(__int64 volatile *_Destination,
|
||||
__int64 _ExchangeHigh,
|
||||
__int64 _ExchangeLow,
|
||||
__int64 *_ComparandResult);
|
||||
short _InterlockedCompareExchange16_np(short volatile *_Destination,
|
||||
short _Exchange, short _Comparand);
|
||||
__int64 _InterlockedCompareExchange64_np(__int64 volatile *_Destination,
|
||||
__int64 _Exchange, __int64 _Comparand);
|
||||
void *_InterlockedCompareExchangePointer_np(void *volatile *_Destination,
|
||||
void *_Exchange, void *_Comparand);
|
||||
long _InterlockedOr_np(long volatile *_Value, long _Mask);
|
||||
short _InterlockedOr16_np(short volatile *_Value, short _Mask);
|
||||
__int64 _InterlockedOr64_np(__int64 volatile *_Value, __int64 _Mask);
|
||||
char _InterlockedOr8_np(char volatile *_Value, char _Mask);
|
||||
long _InterlockedXor_np(long volatile *_Value, long _Mask);
|
||||
short _InterlockedXor16_np(short volatile *_Value, short _Mask);
|
||||
__int64 _InterlockedXor64_np(__int64 volatile *_Value, __int64 _Mask);
|
||||
char _InterlockedXor8_np(char volatile *_Value, char _Mask);
|
||||
unsigned __int64 _rorx_u64(unsigned __int64, const unsigned int);
|
||||
__int64 _sarx_i64(__int64, unsigned int);
|
||||
unsigned __int64 _shlx_u64(unsigned __int64, unsigned int);
|
||||
unsigned __int64 _shrx_u64(unsigned __int64, unsigned int);
|
||||
static __inline__
|
||||
__int64 __mulh(__int64, __int64);
|
||||
static __inline__
|
||||
unsigned __int64 __umulh(unsigned __int64, unsigned __int64);
|
||||
static __inline__
|
||||
__int64 _mul128(__int64, __int64, __int64*);
|
||||
static __inline__
|
||||
unsigned __int64 _umul128(unsigned __int64,
|
||||
unsigned __int64,
|
||||
unsigned __int64*);
|
||||
|
||||
#endif /* __x86_64__ */
|
||||
|
||||
#if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__)
|
||||
|
||||
static __inline__
|
||||
unsigned char _BitScanForward64(unsigned long *_Index, unsigned __int64 _Mask);
|
||||
static __inline__
|
||||
unsigned char _BitScanReverse64(unsigned long *_Index, unsigned __int64 _Mask);
|
||||
|
||||
static __inline__
|
||||
__int64 _InterlockedDecrement64(__int64 volatile *_Addend);
|
||||
static __inline__
|
||||
__int64 _InterlockedExchange64(__int64 volatile *_Target, __int64 _Value);
|
||||
static __inline__
|
||||
__int64 _InterlockedExchangeAdd64(__int64 volatile *_Addend, __int64 _Value);
|
||||
static __inline__
|
||||
__int64 _InterlockedExchangeSub64(__int64 volatile *_Subend, __int64 _Value);
|
||||
static __inline__
|
||||
__int64 _InterlockedIncrement64(__int64 volatile *_Addend);
|
||||
static __inline__
|
||||
__int64 _InterlockedOr64(__int64 volatile *_Value, __int64 _Mask);
|
||||
static __inline__
|
||||
__int64 _InterlockedXor64(__int64 volatile *_Value, __int64 _Mask);
|
||||
static __inline__
|
||||
__int64 _InterlockedAnd64(__int64 volatile *_Value, __int64 _Mask);
|
||||
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------*\
|
||||
|* Interlocked Exchange Add
|
||||
\*----------------------------------------------------------------------------*/
|
||||
#if defined(__arm__) || defined(__aarch64__)
|
||||
char _InterlockedExchangeAdd8_acq(char volatile *_Addend, char _Value);
|
||||
char _InterlockedExchangeAdd8_nf(char volatile *_Addend, char _Value);
|
||||
char _InterlockedExchangeAdd8_rel(char volatile *_Addend, char _Value);
|
||||
short _InterlockedExchangeAdd16_acq(short volatile *_Addend, short _Value);
|
||||
short _InterlockedExchangeAdd16_nf(short volatile *_Addend, short _Value);
|
||||
short _InterlockedExchangeAdd16_rel(short volatile *_Addend, short _Value);
|
||||
long _InterlockedExchangeAdd_acq(long volatile *_Addend, long _Value);
|
||||
long _InterlockedExchangeAdd_nf(long volatile *_Addend, long _Value);
|
||||
long _InterlockedExchangeAdd_rel(long volatile *_Addend, long _Value);
|
||||
__int64 _InterlockedExchangeAdd64_acq(__int64 volatile *_Addend, __int64 _Value);
|
||||
__int64 _InterlockedExchangeAdd64_nf(__int64 volatile *_Addend, __int64 _Value);
|
||||
__int64 _InterlockedExchangeAdd64_rel(__int64 volatile *_Addend, __int64 _Value);
|
||||
#endif
|
||||
/*----------------------------------------------------------------------------*\
|
||||
|* Interlocked Increment
|
||||
\*----------------------------------------------------------------------------*/
|
||||
#if defined(__arm__) || defined(__aarch64__)
|
||||
short _InterlockedIncrement16_acq(short volatile *_Value);
|
||||
short _InterlockedIncrement16_nf(short volatile *_Value);
|
||||
short _InterlockedIncrement16_rel(short volatile *_Value);
|
||||
long _InterlockedIncrement_acq(long volatile *_Value);
|
||||
long _InterlockedIncrement_nf(long volatile *_Value);
|
||||
long _InterlockedIncrement_rel(long volatile *_Value);
|
||||
__int64 _InterlockedIncrement64_acq(__int64 volatile *_Value);
|
||||
__int64 _InterlockedIncrement64_nf(__int64 volatile *_Value);
|
||||
__int64 _InterlockedIncrement64_rel(__int64 volatile *_Value);
|
||||
#endif
|
||||
/*----------------------------------------------------------------------------*\
|
||||
|* Interlocked Decrement
|
||||
\*----------------------------------------------------------------------------*/
|
||||
#if defined(__arm__) || defined(__aarch64__)
|
||||
short _InterlockedDecrement16_acq(short volatile *_Value);
|
||||
short _InterlockedDecrement16_nf(short volatile *_Value);
|
||||
short _InterlockedDecrement16_rel(short volatile *_Value);
|
||||
long _InterlockedDecrement_acq(long volatile *_Value);
|
||||
long _InterlockedDecrement_nf(long volatile *_Value);
|
||||
long _InterlockedDecrement_rel(long volatile *_Value);
|
||||
__int64 _InterlockedDecrement64_acq(__int64 volatile *_Value);
|
||||
__int64 _InterlockedDecrement64_nf(__int64 volatile *_Value);
|
||||
__int64 _InterlockedDecrement64_rel(__int64 volatile *_Value);
|
||||
#endif
|
||||
/*----------------------------------------------------------------------------*\
|
||||
|* Interlocked And
|
||||
\*----------------------------------------------------------------------------*/
|
||||
#if defined(__arm__) || defined(__aarch64__)
|
||||
char _InterlockedAnd8_acq(char volatile *_Value, char _Mask);
|
||||
char _InterlockedAnd8_nf(char volatile *_Value, char _Mask);
|
||||
char _InterlockedAnd8_rel(char volatile *_Value, char _Mask);
|
||||
short _InterlockedAnd16_acq(short volatile *_Value, short _Mask);
|
||||
short _InterlockedAnd16_nf(short volatile *_Value, short _Mask);
|
||||
short _InterlockedAnd16_rel(short volatile *_Value, short _Mask);
|
||||
long _InterlockedAnd_acq(long volatile *_Value, long _Mask);
|
||||
long _InterlockedAnd_nf(long volatile *_Value, long _Mask);
|
||||
long _InterlockedAnd_rel(long volatile *_Value, long _Mask);
|
||||
__int64 _InterlockedAnd64_acq(__int64 volatile *_Value, __int64 _Mask);
|
||||
__int64 _InterlockedAnd64_nf(__int64 volatile *_Value, __int64 _Mask);
|
||||
__int64 _InterlockedAnd64_rel(__int64 volatile *_Value, __int64 _Mask);
|
||||
#endif
|
||||
/*----------------------------------------------------------------------------*\
|
||||
|* Bit Counting and Testing
|
||||
\*----------------------------------------------------------------------------*/
|
||||
#if defined(__arm__) || defined(__aarch64__)
|
||||
unsigned char _interlockedbittestandset_acq(long volatile *_BitBase,
|
||||
long _BitPos);
|
||||
unsigned char _interlockedbittestandset_nf(long volatile *_BitBase,
|
||||
long _BitPos);
|
||||
unsigned char _interlockedbittestandset_rel(long volatile *_BitBase,
|
||||
long _BitPos);
|
||||
unsigned char _interlockedbittestandreset_acq(long volatile *_BitBase,
|
||||
long _BitPos);
|
||||
unsigned char _interlockedbittestandreset_nf(long volatile *_BitBase,
|
||||
long _BitPos);
|
||||
unsigned char _interlockedbittestandreset_rel(long volatile *_BitBase,
|
||||
long _BitPos);
|
||||
#endif
|
||||
/*----------------------------------------------------------------------------*\
|
||||
|* Interlocked Or
|
||||
\*----------------------------------------------------------------------------*/
|
||||
#if defined(__arm__) || defined(__aarch64__)
|
||||
char _InterlockedOr8_acq(char volatile *_Value, char _Mask);
|
||||
char _InterlockedOr8_nf(char volatile *_Value, char _Mask);
|
||||
char _InterlockedOr8_rel(char volatile *_Value, char _Mask);
|
||||
short _InterlockedOr16_acq(short volatile *_Value, short _Mask);
|
||||
short _InterlockedOr16_nf(short volatile *_Value, short _Mask);
|
||||
short _InterlockedOr16_rel(short volatile *_Value, short _Mask);
|
||||
long _InterlockedOr_acq(long volatile *_Value, long _Mask);
|
||||
long _InterlockedOr_nf(long volatile *_Value, long _Mask);
|
||||
long _InterlockedOr_rel(long volatile *_Value, long _Mask);
|
||||
__int64 _InterlockedOr64_acq(__int64 volatile *_Value, __int64 _Mask);
|
||||
__int64 _InterlockedOr64_nf(__int64 volatile *_Value, __int64 _Mask);
|
||||
__int64 _InterlockedOr64_rel(__int64 volatile *_Value, __int64 _Mask);
|
||||
#endif
|
||||
/*----------------------------------------------------------------------------*\
|
||||
|* Interlocked Xor
|
||||
\*----------------------------------------------------------------------------*/
|
||||
#if defined(__arm__) || defined(__aarch64__)
|
||||
char _InterlockedXor8_acq(char volatile *_Value, char _Mask);
|
||||
char _InterlockedXor8_nf(char volatile *_Value, char _Mask);
|
||||
char _InterlockedXor8_rel(char volatile *_Value, char _Mask);
|
||||
short _InterlockedXor16_acq(short volatile *_Value, short _Mask);
|
||||
short _InterlockedXor16_nf(short volatile *_Value, short _Mask);
|
||||
short _InterlockedXor16_rel(short volatile *_Value, short _Mask);
|
||||
long _InterlockedXor_acq(long volatile *_Value, long _Mask);
|
||||
long _InterlockedXor_nf(long volatile *_Value, long _Mask);
|
||||
long _InterlockedXor_rel(long volatile *_Value, long _Mask);
|
||||
__int64 _InterlockedXor64_acq(__int64 volatile *_Value, __int64 _Mask);
|
||||
__int64 _InterlockedXor64_nf(__int64 volatile *_Value, __int64 _Mask);
|
||||
__int64 _InterlockedXor64_rel(__int64 volatile *_Value, __int64 _Mask);
|
||||
#endif
|
||||
/*----------------------------------------------------------------------------*\
|
||||
|* Interlocked Exchange
|
||||
\*----------------------------------------------------------------------------*/
|
||||
#if defined(__arm__) || defined(__aarch64__)
|
||||
char _InterlockedExchange8_acq(char volatile *_Target, char _Value);
|
||||
char _InterlockedExchange8_nf(char volatile *_Target, char _Value);
|
||||
char _InterlockedExchange8_rel(char volatile *_Target, char _Value);
|
||||
short _InterlockedExchange16_acq(short volatile *_Target, short _Value);
|
||||
short _InterlockedExchange16_nf(short volatile *_Target, short _Value);
|
||||
short _InterlockedExchange16_rel(short volatile *_Target, short _Value);
|
||||
long _InterlockedExchange_acq(long volatile *_Target, long _Value);
|
||||
long _InterlockedExchange_nf(long volatile *_Target, long _Value);
|
||||
long _InterlockedExchange_rel(long volatile *_Target, long _Value);
|
||||
__int64 _InterlockedExchange64_acq(__int64 volatile *_Target, __int64 _Value);
|
||||
__int64 _InterlockedExchange64_nf(__int64 volatile *_Target, __int64 _Value);
|
||||
__int64 _InterlockedExchange64_rel(__int64 volatile *_Target, __int64 _Value);
|
||||
#endif
|
||||
/*----------------------------------------------------------------------------*\
|
||||
|* Interlocked Compare Exchange
|
||||
\*----------------------------------------------------------------------------*/
|
||||
#if defined(__arm__) || defined(__aarch64__)
|
||||
char _InterlockedCompareExchange8_acq(char volatile *_Destination,
|
||||
char _Exchange, char _Comparand);
|
||||
char _InterlockedCompareExchange8_nf(char volatile *_Destination,
|
||||
char _Exchange, char _Comparand);
|
||||
char _InterlockedCompareExchange8_rel(char volatile *_Destination,
|
||||
char _Exchange, char _Comparand);
|
||||
short _InterlockedCompareExchange16_acq(short volatile *_Destination,
|
||||
short _Exchange, short _Comparand);
|
||||
short _InterlockedCompareExchange16_nf(short volatile *_Destination,
|
||||
short _Exchange, short _Comparand);
|
||||
short _InterlockedCompareExchange16_rel(short volatile *_Destination,
|
||||
short _Exchange, short _Comparand);
|
||||
long _InterlockedCompareExchange_acq(long volatile *_Destination,
|
||||
long _Exchange, long _Comparand);
|
||||
long _InterlockedCompareExchange_nf(long volatile *_Destination,
|
||||
long _Exchange, long _Comparand);
|
||||
long _InterlockedCompareExchange_rel(long volatile *_Destination,
|
||||
long _Exchange, long _Comparand);
|
||||
__int64 _InterlockedCompareExchange64_acq(__int64 volatile *_Destination,
|
||||
__int64 _Exchange, __int64 _Comparand);
|
||||
__int64 _InterlockedCompareExchange64_nf(__int64 volatile *_Destination,
|
||||
__int64 _Exchange, __int64 _Comparand);
|
||||
__int64 _InterlockedCompareExchange64_rel(__int64 volatile *_Destination,
|
||||
__int64 _Exchange, __int64 _Comparand);
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------*\
|
||||
|* movs, stos
|
||||
\*----------------------------------------------------------------------------*/
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
__movsb(unsigned char *__dst, unsigned char const *__src, size_t __n) {
|
||||
__asm__ __volatile__("rep movsb" : "+D"(__dst), "+S"(__src), "+c"(__n)
|
||||
: : "memory");
|
||||
}
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
__movsd(unsigned long *__dst, unsigned long const *__src, size_t __n) {
|
||||
__asm__ __volatile__("rep movsl" : "+D"(__dst), "+S"(__src), "+c"(__n)
|
||||
: : "memory");
|
||||
}
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
__movsw(unsigned short *__dst, unsigned short const *__src, size_t __n) {
|
||||
__asm__ __volatile__("rep movsw" : "+D"(__dst), "+S"(__src), "+c"(__n)
|
||||
: : "memory");
|
||||
}
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
__stosd(unsigned long *__dst, unsigned long __x, size_t __n) {
|
||||
__asm__ __volatile__("rep stosl" : "+D"(__dst), "+c"(__n) : "a"(__x)
|
||||
: "memory");
|
||||
}
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
__stosw(unsigned short *__dst, unsigned short __x, size_t __n) {
|
||||
__asm__ __volatile__("rep stosw" : "+D"(__dst), "+c"(__n) : "a"(__x)
|
||||
: "memory");
|
||||
}
|
||||
#endif
|
||||
#ifdef __x86_64__
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
__movsq(unsigned long long *__dst, unsigned long long const *__src, size_t __n) {
|
||||
__asm__ __volatile__("rep movsq" : "+D"(__dst), "+S"(__src), "+c"(__n)
|
||||
: : "memory");
|
||||
}
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
__stosq(unsigned __int64 *__dst, unsigned __int64 __x, size_t __n) {
|
||||
__asm__ __volatile__("rep stosq" : "+D"(__dst), "+c"(__n) : "a"(__x)
|
||||
: "memory");
|
||||
}
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------*\
|
||||
|* Misc
|
||||
\*----------------------------------------------------------------------------*/
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
__cpuid(int __info[4], int __level) {
|
||||
__asm__ ("cpuid" : "=a"(__info[0]), "=b" (__info[1]), "=c"(__info[2]), "=d"(__info[3])
|
||||
: "a"(__level), "c"(0));
|
||||
}
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
__cpuidex(int __info[4], int __level, int __ecx) {
|
||||
__asm__ ("cpuid" : "=a"(__info[0]), "=b" (__info[1]), "=c"(__info[2]), "=d"(__info[3])
|
||||
: "a"(__level), "c"(__ecx));
|
||||
}
|
||||
static __inline__ unsigned __int64 __cdecl __DEFAULT_FN_ATTRS
|
||||
_xgetbv(unsigned int __xcr_no) {
|
||||
unsigned int __eax, __edx;
|
||||
__asm__ ("xgetbv" : "=a" (__eax), "=d" (__edx) : "c" (__xcr_no));
|
||||
return ((unsigned __int64)__edx << 32) | __eax;
|
||||
}
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
__halt(void) {
|
||||
__asm__ volatile ("hlt");
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__)
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
__nop(void) {
|
||||
__asm__ volatile ("nop");
|
||||
}
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------*\
|
||||
|* MS AArch64 specific
|
||||
\*----------------------------------------------------------------------------*/
|
||||
#if defined(__aarch64__)
|
||||
unsigned __int64 __getReg(int);
|
||||
long _InterlockedAdd(long volatile *Addend, long Value);
|
||||
__int64 _ReadStatusReg(int);
|
||||
void _WriteStatusReg(int, __int64);
|
||||
|
||||
static inline unsigned short _byteswap_ushort (unsigned short val) {
|
||||
return __builtin_bswap16(val);
|
||||
}
|
||||
static inline unsigned long _byteswap_ulong (unsigned long val) {
|
||||
return __builtin_bswap32(val);
|
||||
}
|
||||
static inline unsigned __int64 _byteswap_uint64 (unsigned __int64 val) {
|
||||
return __builtin_bswap64(val);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------*\
|
||||
|* Privileged intrinsics
|
||||
\*----------------------------------------------------------------------------*/
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
static __inline__ unsigned __int64 __DEFAULT_FN_ATTRS
|
||||
__readmsr(unsigned long __register) {
|
||||
// Loads the contents of a 64-bit model specific register (MSR) specified in
|
||||
// the ECX register into registers EDX:EAX. The EDX register is loaded with
|
||||
// the high-order 32 bits of the MSR and the EAX register is loaded with the
|
||||
// low-order 32 bits. If less than 64 bits are implemented in the MSR being
|
||||
// read, the values returned to EDX:EAX in unimplemented bit locations are
|
||||
// undefined.
|
||||
unsigned long __edx;
|
||||
unsigned long __eax;
|
||||
__asm__ ("rdmsr" : "=d"(__edx), "=a"(__eax) : "c"(__register));
|
||||
return (((unsigned __int64)__edx) << 32) | (unsigned __int64)__eax;
|
||||
}
|
||||
|
||||
static __inline__ unsigned long __DEFAULT_FN_ATTRS
|
||||
__readcr3(void) {
|
||||
unsigned long __cr3_val;
|
||||
__asm__ __volatile__ ("mov %%cr3, %0" : "=q"(__cr3_val) : : "memory");
|
||||
return __cr3_val;
|
||||
}
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
__writecr3(unsigned int __cr3_val) {
|
||||
__asm__ ("mov %0, %%cr3" : : "q"(__cr3_val) : "memory");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif /* __INTRIN_H */
|
||||
#endif /* _MSC_VER */
|
||||
@@ -1,106 +0,0 @@
|
||||
/*===---- inttypes.h - Standard header for integer printf macros ----------===*\
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
\*===----------------------------------------------------------------------===*/
|
||||
|
||||
#ifndef __CLANG_INTTYPES_H
|
||||
#define __CLANG_INTTYPES_H
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1800
|
||||
#error MSVC does not have inttypes.h prior to Visual Studio 2013
|
||||
#endif
|
||||
|
||||
#include_next <inttypes.h>
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
/* MSVC headers define int32_t as int, but PRIx32 as "lx" instead of "x".
|
||||
* This triggers format warnings, so fix it up here. */
|
||||
#undef PRId32
|
||||
#undef PRIdLEAST32
|
||||
#undef PRIdFAST32
|
||||
#undef PRIi32
|
||||
#undef PRIiLEAST32
|
||||
#undef PRIiFAST32
|
||||
#undef PRIo32
|
||||
#undef PRIoLEAST32
|
||||
#undef PRIoFAST32
|
||||
#undef PRIu32
|
||||
#undef PRIuLEAST32
|
||||
#undef PRIuFAST32
|
||||
#undef PRIx32
|
||||
#undef PRIxLEAST32
|
||||
#undef PRIxFAST32
|
||||
#undef PRIX32
|
||||
#undef PRIXLEAST32
|
||||
#undef PRIXFAST32
|
||||
|
||||
#undef SCNd32
|
||||
#undef SCNdLEAST32
|
||||
#undef SCNdFAST32
|
||||
#undef SCNi32
|
||||
#undef SCNiLEAST32
|
||||
#undef SCNiFAST32
|
||||
#undef SCNo32
|
||||
#undef SCNoLEAST32
|
||||
#undef SCNoFAST32
|
||||
#undef SCNu32
|
||||
#undef SCNuLEAST32
|
||||
#undef SCNuFAST32
|
||||
#undef SCNx32
|
||||
#undef SCNxLEAST32
|
||||
#undef SCNxFAST32
|
||||
|
||||
#define PRId32 "d"
|
||||
#define PRIdLEAST32 "d"
|
||||
#define PRIdFAST32 "d"
|
||||
#define PRIi32 "i"
|
||||
#define PRIiLEAST32 "i"
|
||||
#define PRIiFAST32 "i"
|
||||
#define PRIo32 "o"
|
||||
#define PRIoLEAST32 "o"
|
||||
#define PRIoFAST32 "o"
|
||||
#define PRIu32 "u"
|
||||
#define PRIuLEAST32 "u"
|
||||
#define PRIuFAST32 "u"
|
||||
#define PRIx32 "x"
|
||||
#define PRIxLEAST32 "x"
|
||||
#define PRIxFAST32 "x"
|
||||
#define PRIX32 "X"
|
||||
#define PRIXLEAST32 "X"
|
||||
#define PRIXFAST32 "X"
|
||||
|
||||
#define SCNd32 "d"
|
||||
#define SCNdLEAST32 "d"
|
||||
#define SCNdFAST32 "d"
|
||||
#define SCNi32 "i"
|
||||
#define SCNiLEAST32 "i"
|
||||
#define SCNiFAST32 "i"
|
||||
#define SCNo32 "o"
|
||||
#define SCNoLEAST32 "o"
|
||||
#define SCNoFAST32 "o"
|
||||
#define SCNu32 "u"
|
||||
#define SCNuLEAST32 "u"
|
||||
#define SCNuFAST32 "u"
|
||||
#define SCNx32 "x"
|
||||
#define SCNxLEAST32 "x"
|
||||
#define SCNxFAST32 "x"
|
||||
#endif
|
||||
|
||||
#endif /* __CLANG_INTTYPES_H */
|
||||
@@ -1,37 +0,0 @@
|
||||
/*===------------- invpcidintrin.h - INVPCID intrinsic ---------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <invpcidintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __INVPCIDINTRIN_H
|
||||
#define __INVPCIDINTRIN_H
|
||||
|
||||
static __inline__ void
|
||||
__attribute__((__always_inline__, __nodebug__, __target__("invpcid")))
|
||||
_invpcid(unsigned int __type, void *__descriptor) {
|
||||
__builtin_ia32_invpcid(__type, __descriptor);
|
||||
}
|
||||
|
||||
#endif /* __INVPCIDINTRIN_H */
|
||||
@@ -1,43 +0,0 @@
|
||||
/*===---- iso646.h - Standard header for alternate spellings of operators---===
|
||||
*
|
||||
* Copyright (c) 2008 Eli Friedman
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __ISO646_H
|
||||
#define __ISO646_H
|
||||
|
||||
#ifndef __cplusplus
|
||||
#define and &&
|
||||
#define and_eq &=
|
||||
#define bitand &
|
||||
#define bitor |
|
||||
#define compl ~
|
||||
#define not !
|
||||
#define not_eq !=
|
||||
#define or ||
|
||||
#define or_eq |=
|
||||
#define xor ^
|
||||
#define xor_eq ^=
|
||||
#endif
|
||||
|
||||
#endif /* __ISO646_H */
|
||||
@@ -1,118 +0,0 @@
|
||||
/*===---- limits.h - Standard header for integer sizes --------------------===*\
|
||||
*
|
||||
* Copyright (c) 2009 Chris Lattner
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
\*===----------------------------------------------------------------------===*/
|
||||
|
||||
#ifndef __CLANG_LIMITS_H
|
||||
#define __CLANG_LIMITS_H
|
||||
|
||||
/* The system's limits.h may, in turn, try to #include_next GCC's limits.h.
|
||||
Avert this #include_next madness. */
|
||||
#if defined __GNUC__ && !defined _GCC_LIMITS_H_
|
||||
#define _GCC_LIMITS_H_
|
||||
#endif
|
||||
|
||||
/* System headers include a number of constants from POSIX in <limits.h>.
|
||||
Include it if we're hosted. */
|
||||
#if __STDC_HOSTED__ && __has_include_next(<limits.h>)
|
||||
#include_next <limits.h>
|
||||
#endif
|
||||
|
||||
/* Many system headers try to "help us out" by defining these. No really, we
|
||||
know how big each datatype is. */
|
||||
#undef SCHAR_MIN
|
||||
#undef SCHAR_MAX
|
||||
#undef UCHAR_MAX
|
||||
#undef SHRT_MIN
|
||||
#undef SHRT_MAX
|
||||
#undef USHRT_MAX
|
||||
#undef INT_MIN
|
||||
#undef INT_MAX
|
||||
#undef UINT_MAX
|
||||
#undef LONG_MIN
|
||||
#undef LONG_MAX
|
||||
#undef ULONG_MAX
|
||||
|
||||
#undef CHAR_BIT
|
||||
#undef CHAR_MIN
|
||||
#undef CHAR_MAX
|
||||
|
||||
/* C90/99 5.2.4.2.1 */
|
||||
#define SCHAR_MAX __SCHAR_MAX__
|
||||
#define SHRT_MAX __SHRT_MAX__
|
||||
#define INT_MAX __INT_MAX__
|
||||
#define LONG_MAX __LONG_MAX__
|
||||
|
||||
#define SCHAR_MIN (-__SCHAR_MAX__-1)
|
||||
#define SHRT_MIN (-__SHRT_MAX__ -1)
|
||||
#define INT_MIN (-__INT_MAX__ -1)
|
||||
#define LONG_MIN (-__LONG_MAX__ -1L)
|
||||
|
||||
#define UCHAR_MAX (__SCHAR_MAX__*2 +1)
|
||||
#define USHRT_MAX (__SHRT_MAX__ *2 +1)
|
||||
#define UINT_MAX (__INT_MAX__ *2U +1U)
|
||||
#define ULONG_MAX (__LONG_MAX__ *2UL+1UL)
|
||||
|
||||
#ifndef MB_LEN_MAX
|
||||
#define MB_LEN_MAX 1
|
||||
#endif
|
||||
|
||||
#define CHAR_BIT __CHAR_BIT__
|
||||
|
||||
#ifdef __CHAR_UNSIGNED__ /* -funsigned-char */
|
||||
#define CHAR_MIN 0
|
||||
#define CHAR_MAX UCHAR_MAX
|
||||
#else
|
||||
#define CHAR_MIN SCHAR_MIN
|
||||
#define CHAR_MAX __SCHAR_MAX__
|
||||
#endif
|
||||
|
||||
/* C99 5.2.4.2.1: Added long long.
|
||||
C++11 18.3.3.2: same contents as the Standard C Library header <limits.h>.
|
||||
*/
|
||||
#if __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L
|
||||
|
||||
#undef LLONG_MIN
|
||||
#undef LLONG_MAX
|
||||
#undef ULLONG_MAX
|
||||
|
||||
#define LLONG_MAX __LONG_LONG_MAX__
|
||||
#define LLONG_MIN (-__LONG_LONG_MAX__-1LL)
|
||||
#define ULLONG_MAX (__LONG_LONG_MAX__*2ULL+1ULL)
|
||||
#endif
|
||||
|
||||
/* LONG_LONG_MIN/LONG_LONG_MAX/ULONG_LONG_MAX are a GNU extension. It's too bad
|
||||
that we don't have something like #pragma poison that could be used to
|
||||
deprecate a macro - the code should just use LLONG_MAX and friends.
|
||||
*/
|
||||
#if defined(__GNU_LIBRARY__) ? defined(__USE_GNU) : !defined(__STRICT_ANSI__)
|
||||
|
||||
#undef LONG_LONG_MIN
|
||||
#undef LONG_LONG_MAX
|
||||
#undef ULONG_LONG_MAX
|
||||
|
||||
#define LONG_LONG_MAX __LONG_LONG_MAX__
|
||||
#define LONG_LONG_MIN (-__LONG_LONG_MAX__-1LL)
|
||||
#define ULONG_LONG_MAX (__LONG_LONG_MAX__*2ULL+1ULL)
|
||||
#endif
|
||||
|
||||
#endif /* __CLANG_LIMITS_H */
|
||||
@@ -1,118 +0,0 @@
|
||||
/*===---- lzcntintrin.h - LZCNT intrinsics ---------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H
|
||||
#error "Never use <lzcntintrin.h> directly; include <x86intrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __LZCNTINTRIN_H
|
||||
#define __LZCNTINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("lzcnt")))
|
||||
|
||||
#ifndef _MSC_VER
|
||||
/// Counts the number of leading zero bits in the operand.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the \c LZCNT instruction.
|
||||
///
|
||||
/// \param __X
|
||||
/// An unsigned 16-bit integer whose leading zeros are to be counted.
|
||||
/// \returns An unsigned 16-bit integer containing the number of leading zero
|
||||
/// bits in the operand.
|
||||
#define __lzcnt16(X) __builtin_ia32_lzcnt_u16((unsigned short)(X))
|
||||
#endif // _MSC_VER
|
||||
|
||||
/// Counts the number of leading zero bits in the operand.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the \c LZCNT instruction.
|
||||
///
|
||||
/// \param __X
|
||||
/// An unsigned 32-bit integer whose leading zeros are to be counted.
|
||||
/// \returns An unsigned 32-bit integer containing the number of leading zero
|
||||
/// bits in the operand.
|
||||
/// \see _lzcnt_u32
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
||||
__lzcnt32(unsigned int __X)
|
||||
{
|
||||
return __builtin_ia32_lzcnt_u32(__X);
|
||||
}
|
||||
|
||||
/// Counts the number of leading zero bits in the operand.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the \c LZCNT instruction.
|
||||
///
|
||||
/// \param __X
|
||||
/// An unsigned 32-bit integer whose leading zeros are to be counted.
|
||||
/// \returns An unsigned 32-bit integer containing the number of leading zero
|
||||
/// bits in the operand.
|
||||
/// \see __lzcnt32
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
||||
_lzcnt_u32(unsigned int __X)
|
||||
{
|
||||
return __builtin_ia32_lzcnt_u32(__X);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
#ifndef _MSC_VER
|
||||
/// Counts the number of leading zero bits in the operand.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the \c LZCNT instruction.
|
||||
///
|
||||
/// \param __X
|
||||
/// An unsigned 64-bit integer whose leading zeros are to be counted.
|
||||
/// \returns An unsigned 64-bit integer containing the number of leading zero
|
||||
/// bits in the operand.
|
||||
/// \see _lzcnt_u64
|
||||
#define __lzcnt64(X) __builtin_ia32_lzcnt_u64((unsigned long long)(X))
|
||||
#endif // _MSC_VER
|
||||
|
||||
/// Counts the number of leading zero bits in the operand.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the \c LZCNT instruction.
|
||||
///
|
||||
/// \param __X
|
||||
/// An unsigned 64-bit integer whose leading zeros are to be counted.
|
||||
/// \returns An unsigned 64-bit integer containing the number of leading zero
|
||||
/// bits in the operand.
|
||||
/// \see __lzcnt64
|
||||
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
||||
_lzcnt_u64(unsigned long long __X)
|
||||
{
|
||||
return __builtin_ia32_lzcnt_u64(__X);
|
||||
}
|
||||
#endif
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif /* __LZCNTINTRIN_H */
|
||||
@@ -1,75 +0,0 @@
|
||||
/*===---- mm_malloc.h - Allocating and Freeing Aligned Memory Blocks -------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __MM_MALLOC_H
|
||||
#define __MM_MALLOC_H
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <malloc.h>
|
||||
#else
|
||||
#ifndef __cplusplus
|
||||
extern int posix_memalign(void **__memptr, size_t __alignment, size_t __size);
|
||||
#else
|
||||
// Some systems (e.g. those with GNU libc) declare posix_memalign with an
|
||||
// exception specifier. Via an "egregious workaround" in
|
||||
// Sema::CheckEquivalentExceptionSpec, Clang accepts the following as a valid
|
||||
// redeclaration of glibc's declaration.
|
||||
extern "C" int posix_memalign(void **__memptr, size_t __alignment, size_t __size);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !(defined(_WIN32) && defined(_mm_malloc))
|
||||
static __inline__ void *__attribute__((__always_inline__, __nodebug__,
|
||||
__malloc__))
|
||||
_mm_malloc(size_t __size, size_t __align)
|
||||
{
|
||||
if (__align == 1) {
|
||||
return malloc(__size);
|
||||
}
|
||||
|
||||
if (!(__align & (__align - 1)) && __align < sizeof(void *))
|
||||
__align = sizeof(void *);
|
||||
|
||||
void *__mallocedMemory;
|
||||
#if defined(__MINGW32__)
|
||||
__mallocedMemory = __mingw_aligned_malloc(__size, __align);
|
||||
#elif defined(_WIN32)
|
||||
__mallocedMemory = _aligned_malloc(__size, __align);
|
||||
#else
|
||||
if (posix_memalign(&__mallocedMemory, __align, __size))
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
return __mallocedMemory;
|
||||
}
|
||||
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||
_mm_free(void *__p)
|
||||
{
|
||||
free(__p);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __MM_MALLOC_H */
|
||||
1572
c_headers/mmintrin.h
1572
c_headers/mmintrin.h
File diff suppressed because it is too large
Load Diff
@@ -1,171 +0,0 @@
|
||||
/*===---- module.modulemap - intrinsics module map -------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
module _Builtin_intrinsics [system] [extern_c] {
|
||||
explicit module altivec {
|
||||
requires altivec
|
||||
header "altivec.h"
|
||||
}
|
||||
|
||||
explicit module arm {
|
||||
requires arm
|
||||
|
||||
explicit module acle {
|
||||
header "arm_acle.h"
|
||||
export *
|
||||
}
|
||||
|
||||
explicit module neon {
|
||||
requires neon
|
||||
header "arm_neon.h"
|
||||
header "arm_fp16.h"
|
||||
export *
|
||||
}
|
||||
}
|
||||
|
||||
explicit module intel {
|
||||
requires x86
|
||||
export *
|
||||
|
||||
header "immintrin.h"
|
||||
textual header "f16cintrin.h"
|
||||
textual header "avxintrin.h"
|
||||
textual header "avx2intrin.h"
|
||||
textual header "avx512fintrin.h"
|
||||
textual header "avx512erintrin.h"
|
||||
textual header "fmaintrin.h"
|
||||
|
||||
header "x86intrin.h"
|
||||
textual header "bmiintrin.h"
|
||||
textual header "bmi2intrin.h"
|
||||
textual header "lzcntintrin.h"
|
||||
textual header "xopintrin.h"
|
||||
textual header "fma4intrin.h"
|
||||
textual header "mwaitxintrin.h"
|
||||
textual header "clzerointrin.h"
|
||||
textual header "wbnoinvdintrin.h"
|
||||
textual header "cldemoteintrin.h"
|
||||
textual header "waitpkgintrin.h"
|
||||
textual header "movdirintrin.h"
|
||||
textual header "pconfigintrin.h"
|
||||
textual header "sgxintrin.h"
|
||||
textual header "ptwriteintrin.h"
|
||||
textual header "invpcidintrin.h"
|
||||
|
||||
textual header "__wmmintrin_aes.h"
|
||||
textual header "__wmmintrin_pclmul.h"
|
||||
|
||||
explicit module mm_malloc {
|
||||
requires !freestanding
|
||||
header "mm_malloc.h"
|
||||
export * // note: for <stdlib.h> dependency
|
||||
}
|
||||
|
||||
explicit module cpuid {
|
||||
requires gnuinlineasm
|
||||
header "cpuid.h"
|
||||
}
|
||||
|
||||
explicit module mmx {
|
||||
header "mmintrin.h"
|
||||
}
|
||||
|
||||
explicit module sse {
|
||||
export mm_malloc
|
||||
export mmx
|
||||
export sse2 // note: for hackish <emmintrin.h> dependency
|
||||
header "xmmintrin.h"
|
||||
}
|
||||
|
||||
explicit module sse2 {
|
||||
export sse
|
||||
header "emmintrin.h"
|
||||
}
|
||||
|
||||
explicit module sse3 {
|
||||
export sse2
|
||||
header "pmmintrin.h"
|
||||
}
|
||||
|
||||
explicit module ssse3 {
|
||||
export sse3
|
||||
header "tmmintrin.h"
|
||||
}
|
||||
|
||||
explicit module sse4_1 {
|
||||
export ssse3
|
||||
header "smmintrin.h"
|
||||
}
|
||||
|
||||
explicit module sse4_2 {
|
||||
export sse4_1
|
||||
header "nmmintrin.h"
|
||||
}
|
||||
|
||||
explicit module sse4a {
|
||||
export sse3
|
||||
header "ammintrin.h"
|
||||
}
|
||||
|
||||
explicit module popcnt {
|
||||
header "popcntintrin.h"
|
||||
}
|
||||
|
||||
explicit module mm3dnow {
|
||||
header "mm3dnow.h"
|
||||
}
|
||||
|
||||
explicit module aes_pclmul {
|
||||
header "wmmintrin.h"
|
||||
export aes
|
||||
export pclmul
|
||||
}
|
||||
}
|
||||
|
||||
explicit module systemz {
|
||||
requires systemz
|
||||
export *
|
||||
|
||||
header "s390intrin.h"
|
||||
|
||||
explicit module htm {
|
||||
requires htm
|
||||
header "htmintrin.h"
|
||||
header "htmxlintrin.h"
|
||||
}
|
||||
|
||||
explicit module zvector {
|
||||
requires zvector, vx
|
||||
header "vecintrin.h"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module _Builtin_stddef_max_align_t [system] [extern_c] {
|
||||
header "__stddef_max_align_t.h"
|
||||
}
|
||||
|
||||
module opencl_c {
|
||||
requires opencl
|
||||
header "opencl-c.h"
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
/*===------------------------- movdirintrin.h ------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H
|
||||
#error "Never use <movdirintrin.h> directly; include <x86intrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef _MOVDIRINTRIN_H
|
||||
#define _MOVDIRINTRIN_H
|
||||
|
||||
/* Move doubleword as direct store */
|
||||
static __inline__ void
|
||||
__attribute__((__always_inline__, __nodebug__, __target__("movdiri")))
|
||||
_directstoreu_u32 (void *__dst, unsigned int __value)
|
||||
{
|
||||
__builtin_ia32_directstore_u32((unsigned int *)__dst, (unsigned int)__value);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
|
||||
/* Move quadword as direct store */
|
||||
static __inline__ void
|
||||
__attribute__((__always_inline__, __nodebug__, __target__("movdiri")))
|
||||
_directstoreu_u64 (void *__dst, unsigned long __value)
|
||||
{
|
||||
__builtin_ia32_directstore_u64((unsigned long *)__dst, __value);
|
||||
}
|
||||
|
||||
#endif /* __x86_64__ */
|
||||
|
||||
/*
|
||||
* movdir64b - Move 64 bytes as direct store.
|
||||
* The destination must be 64 byte aligned, and the store is atomic.
|
||||
* The source address has no alignment requirement, and the load from
|
||||
* the source address is not atomic.
|
||||
*/
|
||||
static __inline__ void
|
||||
__attribute__((__always_inline__, __nodebug__, __target__("movdir64b")))
|
||||
_movdir64b (void *__dst __attribute__((align_value(64))), const void *__src)
|
||||
{
|
||||
__builtin_ia32_movdir64b(__dst, __src);
|
||||
}
|
||||
|
||||
#endif /* _MOVDIRINTRIN_H */
|
||||
@@ -1,47 +0,0 @@
|
||||
/*===---- mwaitxintrin.h - MONITORX/MWAITX intrinsics ----------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __X86INTRIN_H
|
||||
#error "Never use <mwaitxintrin.h> directly; include <x86intrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __MWAITXINTRIN_H
|
||||
#define __MWAITXINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("mwaitx")))
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_mm_monitorx(void const * __p, unsigned __extensions, unsigned __hints)
|
||||
{
|
||||
__builtin_ia32_monitorx((void *)__p, __extensions, __hints);
|
||||
}
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_mm_mwaitx(unsigned __extensions, unsigned __hints, unsigned __clock)
|
||||
{
|
||||
__builtin_ia32_mwaitx(__extensions, __hints, __clock);
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif /* __MWAITXINTRIN_H */
|
||||
@@ -1,30 +0,0 @@
|
||||
/*===---- nmmintrin.h - SSE4 intrinsics ------------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __NMMINTRIN_H
|
||||
#define __NMMINTRIN_H
|
||||
|
||||
/* To match expectations of gcc we put the sse4.2 definitions into smmintrin.h,
|
||||
just include it now then. */
|
||||
#include <smmintrin.h>
|
||||
#endif /* __NMMINTRIN_H */
|
||||
@@ -1,50 +0,0 @@
|
||||
/*===---- pconfigintrin.h - X86 platform configuration ---------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H
|
||||
#error "Never use <pconfigintrin.h> directly; include <x86intrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __PCONFIGINTRIN_H
|
||||
#define __PCONFIGINTRIN_H
|
||||
|
||||
#define __PCONFIG_KEY_PROGRAM 0x00000001
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS \
|
||||
__attribute__((__always_inline__, __nodebug__, __target__("pconfig")))
|
||||
|
||||
static __inline unsigned int __DEFAULT_FN_ATTRS
|
||||
_pconfig_u32(unsigned int __leaf, __SIZE_TYPE__ __d[])
|
||||
{
|
||||
unsigned int __result;
|
||||
__asm__ ("pconfig"
|
||||
: "=a" (__result), "=b" (__d[0]), "=c" (__d[1]), "=d" (__d[2])
|
||||
: "a" (__leaf), "b" (__d[0]), "c" (__d[1]), "d" (__d[2])
|
||||
: "cc");
|
||||
return __result;
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif
|
||||
@@ -1,48 +0,0 @@
|
||||
/*===---- pkuintrin.h - PKU intrinsics -------------------------------------===
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <pkuintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __PKUINTRIN_H
|
||||
#define __PKUINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("pku")))
|
||||
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
||||
_rdpkru_u32(void)
|
||||
{
|
||||
return __builtin_ia32_rdpkru();
|
||||
}
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_wrpkru(unsigned int __val)
|
||||
{
|
||||
__builtin_ia32_wrpkru(__val);
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif
|
||||
@@ -1,98 +0,0 @@
|
||||
/*===---- popcntintrin.h - POPCNT intrinsics -------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __POPCNTINTRIN_H
|
||||
#define __POPCNTINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("popcnt")))
|
||||
|
||||
/// Counts the number of bits in the source operand having a value of 1.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> POPCNT </c> instruction.
|
||||
///
|
||||
/// \param __A
|
||||
/// An unsigned 32-bit integer operand.
|
||||
/// \returns A 32-bit integer containing the number of bits with value 1 in the
|
||||
/// source operand.
|
||||
static __inline__ int __DEFAULT_FN_ATTRS
|
||||
_mm_popcnt_u32(unsigned int __A)
|
||||
{
|
||||
return __builtin_popcount(__A);
|
||||
}
|
||||
|
||||
/// Counts the number of bits in the source operand having a value of 1.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> POPCNT </c> instruction.
|
||||
///
|
||||
/// \param __A
|
||||
/// A signed 32-bit integer operand.
|
||||
/// \returns A 32-bit integer containing the number of bits with value 1 in the
|
||||
/// source operand.
|
||||
static __inline__ int __DEFAULT_FN_ATTRS
|
||||
_popcnt32(int __A)
|
||||
{
|
||||
return __builtin_popcount(__A);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
/// Counts the number of bits in the source operand having a value of 1.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> POPCNT </c> instruction.
|
||||
///
|
||||
/// \param __A
|
||||
/// An unsigned 64-bit integer operand.
|
||||
/// \returns A 64-bit integer containing the number of bits with value 1 in the
|
||||
/// source operand.
|
||||
static __inline__ long long __DEFAULT_FN_ATTRS
|
||||
_mm_popcnt_u64(unsigned long long __A)
|
||||
{
|
||||
return __builtin_popcountll(__A);
|
||||
}
|
||||
|
||||
/// Counts the number of bits in the source operand having a value of 1.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the <c> POPCNT </c> instruction.
|
||||
///
|
||||
/// \param __A
|
||||
/// A signed 64-bit integer operand.
|
||||
/// \returns A 64-bit integer containing the number of bits with value 1 in the
|
||||
/// source operand.
|
||||
static __inline__ long long __DEFAULT_FN_ATTRS
|
||||
_popcnt64(long long __A)
|
||||
{
|
||||
return __builtin_popcountll(__A);
|
||||
}
|
||||
#endif /* __x86_64__ */
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif /* __POPCNTINTRIN_H */
|
||||
@@ -1,69 +0,0 @@
|
||||
/*===---- prfchwintrin.h - PREFETCHW intrinsic -----------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#if !defined(__X86INTRIN_H) && !defined(_MM3DNOW_H_INCLUDED)
|
||||
#error "Never use <prfchwintrin.h> directly; include <x86intrin.h> or <mm3dnow.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __PRFCHWINTRIN_H
|
||||
#define __PRFCHWINTRIN_H
|
||||
|
||||
/// Loads a memory sequence containing the specified memory address into
|
||||
/// all data cache levels. The cache-coherency state is set to exclusive.
|
||||
/// Data can be read from and written to the cache line without additional
|
||||
/// delay.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the \c PREFETCHT0 instruction.
|
||||
///
|
||||
/// \param __P
|
||||
/// A pointer specifying the memory address to be prefetched.
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||
_m_prefetch(void *__P)
|
||||
{
|
||||
__builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
|
||||
}
|
||||
|
||||
/// Loads a memory sequence containing the specified memory address into
|
||||
/// the L1 data cache and sets the cache-coherency to modified. This
|
||||
/// provides a hint to the processor that the cache line will be modified.
|
||||
/// It is intended for use when the cache line will be written to shortly
|
||||
/// after the prefetch is performed.
|
||||
///
|
||||
/// Note that the effect of this intrinsic is dependent on the processor
|
||||
/// implementation.
|
||||
///
|
||||
/// \headerfile <x86intrin.h>
|
||||
///
|
||||
/// This intrinsic corresponds to the \c PREFETCHW instruction.
|
||||
///
|
||||
/// \param __P
|
||||
/// A pointer specifying the memory address to be prefetched.
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||
_m_prefetchw(void *__P)
|
||||
{
|
||||
__builtin_prefetch (__P, 1, 3 /* _MM_HINT_T0 */);
|
||||
}
|
||||
|
||||
#endif /* __PRFCHWINTRIN_H */
|
||||
@@ -1,51 +0,0 @@
|
||||
/*===------------ ptwriteintrin.h - PTWRITE intrinsic --------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H
|
||||
#error "Never use <ptwriteintrin.h> directly; include <x86intrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __PTWRITEINTRIN_H
|
||||
#define __PTWRITEINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS \
|
||||
__attribute__((__always_inline__, __nodebug__, __target__("ptwrite")))
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_ptwrite32(unsigned int __value) {
|
||||
__builtin_ia32_ptwrite32(__value);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_ptwrite64(unsigned long long __value) {
|
||||
__builtin_ia32_ptwrite64(__value);
|
||||
}
|
||||
|
||||
#endif /* __x86_64__ */
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif /* __PTWRITEINTRIN_H */
|
||||
@@ -1,56 +0,0 @@
|
||||
/*===---- rdseedintrin.h - RDSEED intrinsics -------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H
|
||||
#error "Never use <rdseedintrin.h> directly; include <x86intrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __RDSEEDINTRIN_H
|
||||
#define __RDSEEDINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("rdseed")))
|
||||
|
||||
static __inline__ int __DEFAULT_FN_ATTRS
|
||||
_rdseed16_step(unsigned short *__p)
|
||||
{
|
||||
return __builtin_ia32_rdseed16_step(__p);
|
||||
}
|
||||
|
||||
static __inline__ int __DEFAULT_FN_ATTRS
|
||||
_rdseed32_step(unsigned int *__p)
|
||||
{
|
||||
return __builtin_ia32_rdseed32_step(__p);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
static __inline__ int __DEFAULT_FN_ATTRS
|
||||
_rdseed64_step(unsigned long long *__p)
|
||||
{
|
||||
return __builtin_ia32_rdseed64_step(__p);
|
||||
}
|
||||
#endif
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif /* __RDSEEDINTRIN_H */
|
||||
@@ -1,59 +0,0 @@
|
||||
/*===---- rtmintrin.h - RTM intrinsics -------------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <rtmintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __RTMINTRIN_H
|
||||
#define __RTMINTRIN_H
|
||||
|
||||
#define _XBEGIN_STARTED (~0u)
|
||||
#define _XABORT_EXPLICIT (1 << 0)
|
||||
#define _XABORT_RETRY (1 << 1)
|
||||
#define _XABORT_CONFLICT (1 << 2)
|
||||
#define _XABORT_CAPACITY (1 << 3)
|
||||
#define _XABORT_DEBUG (1 << 4)
|
||||
#define _XABORT_NESTED (1 << 5)
|
||||
#define _XABORT_CODE(x) (((x) >> 24) & 0xFF)
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("rtm")))
|
||||
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
||||
_xbegin(void)
|
||||
{
|
||||
return __builtin_ia32_xbegin();
|
||||
}
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_xend(void)
|
||||
{
|
||||
__builtin_ia32_xend();
|
||||
}
|
||||
|
||||
#define _xabort(imm) __builtin_ia32_xabort((imm))
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif /* __RTMINTRIN_H */
|
||||
@@ -1,39 +0,0 @@
|
||||
/*===---- s390intrin.h - SystemZ intrinsics --------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __S390INTRIN_H
|
||||
#define __S390INTRIN_H
|
||||
|
||||
#ifndef __s390__
|
||||
#error "<s390intrin.h> is for s390 only"
|
||||
#endif
|
||||
|
||||
#ifdef __HTM__
|
||||
#include <htmintrin.h>
|
||||
#endif
|
||||
|
||||
#ifdef __VEC__
|
||||
#include <vecintrin.h>
|
||||
#endif
|
||||
|
||||
#endif /* __S390INTRIN_H*/
|
||||
@@ -1,70 +0,0 @@
|
||||
/*===---- sgxintrin.h - X86 SGX intrinsics configuration -------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H
|
||||
#error "Never use <sgxintrin.h> directly; include <x86intrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __SGXINTRIN_H
|
||||
#define __SGXINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS \
|
||||
__attribute__((__always_inline__, __nodebug__, __target__("sgx")))
|
||||
|
||||
static __inline unsigned int __DEFAULT_FN_ATTRS
|
||||
_enclu_u32(unsigned int __leaf, __SIZE_TYPE__ __d[])
|
||||
{
|
||||
unsigned int __result;
|
||||
__asm__ ("enclu"
|
||||
: "=a" (__result), "=b" (__d[0]), "=c" (__d[1]), "=d" (__d[2])
|
||||
: "a" (__leaf), "b" (__d[0]), "c" (__d[1]), "d" (__d[2])
|
||||
: "cc");
|
||||
return __result;
|
||||
}
|
||||
|
||||
static __inline unsigned int __DEFAULT_FN_ATTRS
|
||||
_encls_u32(unsigned int __leaf, __SIZE_TYPE__ __d[])
|
||||
{
|
||||
unsigned int __result;
|
||||
__asm__ ("encls"
|
||||
: "=a" (__result), "=b" (__d[0]), "=c" (__d[1]), "=d" (__d[2])
|
||||
: "a" (__leaf), "b" (__d[0]), "c" (__d[1]), "d" (__d[2])
|
||||
: "cc");
|
||||
return __result;
|
||||
}
|
||||
|
||||
static __inline unsigned int __DEFAULT_FN_ATTRS
|
||||
_enclv_u32(unsigned int __leaf, __SIZE_TYPE__ __d[])
|
||||
{
|
||||
unsigned int __result;
|
||||
__asm__ ("enclv"
|
||||
: "=a" (__result), "=b" (__d[0]), "=c" (__d[1]), "=d" (__d[2])
|
||||
: "a" (__leaf), "b" (__d[0]), "c" (__d[1]), "d" (__d[2])
|
||||
: "cc");
|
||||
return __result;
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif
|
||||
@@ -1,75 +0,0 @@
|
||||
/*===---- shaintrin.h - SHA intrinsics -------------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <shaintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __SHAINTRIN_H
|
||||
#define __SHAINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("sha"), __min_vector_width__(128)))
|
||||
|
||||
#define _mm_sha1rnds4_epu32(V1, V2, M) \
|
||||
__builtin_ia32_sha1rnds4((__v4si)(__m128i)(V1), (__v4si)(__m128i)(V2), (M))
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
||||
_mm_sha1nexte_epu32(__m128i __X, __m128i __Y)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_sha1nexte((__v4si)__X, (__v4si)__Y);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
||||
_mm_sha1msg1_epu32(__m128i __X, __m128i __Y)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_sha1msg1((__v4si)__X, (__v4si)__Y);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
||||
_mm_sha1msg2_epu32(__m128i __X, __m128i __Y)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_sha1msg2((__v4si)__X, (__v4si)__Y);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
||||
_mm_sha256rnds2_epu32(__m128i __X, __m128i __Y, __m128i __Z)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_sha256rnds2((__v4si)__X, (__v4si)__Y, (__v4si)__Z);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
||||
_mm_sha256msg1_epu32(__m128i __X, __m128i __Y)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_sha256msg1((__v4si)__X, (__v4si)__Y);
|
||||
}
|
||||
|
||||
static __inline__ __m128i __DEFAULT_FN_ATTRS
|
||||
_mm_sha256msg2_epu32(__m128i __X, __m128i __Y)
|
||||
{
|
||||
return (__m128i)__builtin_ia32_sha256msg2((__v4si)__X, (__v4si)__Y);
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif /* __SHAINTRIN_H */
|
||||
@@ -1,35 +0,0 @@
|
||||
/*===---- stdalign.h - Standard header for alignment ------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __STDALIGN_H
|
||||
#define __STDALIGN_H
|
||||
|
||||
#ifndef __cplusplus
|
||||
#define alignas _Alignas
|
||||
#define alignof _Alignof
|
||||
#endif
|
||||
|
||||
#define __alignas_is_defined 1
|
||||
#define __alignof_is_defined 1
|
||||
|
||||
#endif /* __STDALIGN_H */
|
||||
@@ -1,51 +0,0 @@
|
||||
/*===---- stdarg.h - Variable argument handling ----------------------------===
|
||||
*
|
||||
* Copyright (c) 2008 Eli Friedman
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __STDARG_H
|
||||
#define __STDARG_H
|
||||
|
||||
#ifndef _VA_LIST
|
||||
typedef __builtin_va_list va_list;
|
||||
#define _VA_LIST
|
||||
#endif
|
||||
#define va_start(ap, param) __builtin_va_start(ap, param)
|
||||
#define va_end(ap) __builtin_va_end(ap)
|
||||
#define va_arg(ap, type) __builtin_va_arg(ap, type)
|
||||
|
||||
/* GCC always defines __va_copy, but does not define va_copy unless in c99 mode
|
||||
* or -ansi is not specified, since it was not part of C90.
|
||||
*/
|
||||
#define __va_copy(d,s) __builtin_va_copy(d,s)
|
||||
|
||||
#if __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L || !defined(__STRICT_ANSI__)
|
||||
#define va_copy(dest, src) __builtin_va_copy(dest, src)
|
||||
#endif
|
||||
|
||||
#ifndef __GNUC_VA_LIST
|
||||
#define __GNUC_VA_LIST 1
|
||||
typedef __builtin_va_list __gnuc_va_list;
|
||||
#endif
|
||||
|
||||
#endif /* __STDARG_H */
|
||||
@@ -1,47 +0,0 @@
|
||||
/*===---- stdbool.h - Standard header for booleans -------------------------===
|
||||
*
|
||||
* Copyright (c) 2008 Eli Friedman
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __STDBOOL_H
|
||||
#define __STDBOOL_H
|
||||
|
||||
/* Don't define bool, true, and false in C++, except as a GNU extension. */
|
||||
#ifndef __cplusplus
|
||||
#define bool _Bool
|
||||
#define true 1
|
||||
#define false 0
|
||||
#elif defined(__GNUC__) && !defined(__STRICT_ANSI__)
|
||||
/* Define _Bool as a GNU extension. */
|
||||
#define _Bool bool
|
||||
#if __cplusplus < 201103L
|
||||
/* For C++98, define bool, false, true as a GNU extension. */
|
||||
#define bool bool
|
||||
#define false false
|
||||
#define true true
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define __bool_true_false_are_defined 1
|
||||
|
||||
#endif /* __STDBOOL_H */
|
||||
@@ -1,137 +0,0 @@
|
||||
/*===---- stddef.h - Basic type definitions --------------------------------===
|
||||
*
|
||||
* Copyright (c) 2008 Eli Friedman
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \
|
||||
defined(__need_size_t) || defined(__need_wchar_t) || \
|
||||
defined(__need_NULL) || defined(__need_wint_t)
|
||||
|
||||
#if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \
|
||||
!defined(__need_wchar_t) && !defined(__need_NULL) && \
|
||||
!defined(__need_wint_t)
|
||||
/* Always define miscellaneous pieces when modules are available. */
|
||||
#if !__has_feature(modules)
|
||||
#define __STDDEF_H
|
||||
#endif
|
||||
#define __need_ptrdiff_t
|
||||
#define __need_size_t
|
||||
#define __need_wchar_t
|
||||
#define __need_NULL
|
||||
#define __need_STDDEF_H_misc
|
||||
/* __need_wint_t is intentionally not defined here. */
|
||||
#endif
|
||||
|
||||
#if defined(__need_ptrdiff_t)
|
||||
#if !defined(_PTRDIFF_T) || __has_feature(modules)
|
||||
/* Always define ptrdiff_t when modules are available. */
|
||||
#if !__has_feature(modules)
|
||||
#define _PTRDIFF_T
|
||||
#endif
|
||||
typedef __PTRDIFF_TYPE__ ptrdiff_t;
|
||||
#endif
|
||||
#undef __need_ptrdiff_t
|
||||
#endif /* defined(__need_ptrdiff_t) */
|
||||
|
||||
#if defined(__need_size_t)
|
||||
#if !defined(_SIZE_T) || __has_feature(modules)
|
||||
/* Always define size_t when modules are available. */
|
||||
#if !__has_feature(modules)
|
||||
#define _SIZE_T
|
||||
#endif
|
||||
typedef __SIZE_TYPE__ size_t;
|
||||
#endif
|
||||
#undef __need_size_t
|
||||
#endif /*defined(__need_size_t) */
|
||||
|
||||
#if defined(__need_STDDEF_H_misc)
|
||||
/* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is
|
||||
* enabled. */
|
||||
#if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \
|
||||
!defined(_RSIZE_T)) || __has_feature(modules)
|
||||
/* Always define rsize_t when modules are available. */
|
||||
#if !__has_feature(modules)
|
||||
#define _RSIZE_T
|
||||
#endif
|
||||
typedef __SIZE_TYPE__ rsize_t;
|
||||
#endif
|
||||
#endif /* defined(__need_STDDEF_H_misc) */
|
||||
|
||||
#if defined(__need_wchar_t)
|
||||
#ifndef __cplusplus
|
||||
/* Always define wchar_t when modules are available. */
|
||||
#if !defined(_WCHAR_T) || __has_feature(modules)
|
||||
#if !__has_feature(modules)
|
||||
#define _WCHAR_T
|
||||
#if defined(_MSC_EXTENSIONS)
|
||||
#define _WCHAR_T_DEFINED
|
||||
#endif
|
||||
#endif
|
||||
typedef __WCHAR_TYPE__ wchar_t;
|
||||
#endif
|
||||
#endif
|
||||
#undef __need_wchar_t
|
||||
#endif /* defined(__need_wchar_t) */
|
||||
|
||||
#if defined(__need_NULL)
|
||||
#undef NULL
|
||||
#ifdef __cplusplus
|
||||
# if !defined(__MINGW32__) && !defined(_MSC_VER)
|
||||
# define NULL __null
|
||||
# else
|
||||
# define NULL 0
|
||||
# endif
|
||||
#else
|
||||
# define NULL ((void*)0)
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
#if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED)
|
||||
namespace std { typedef decltype(nullptr) nullptr_t; }
|
||||
using ::std::nullptr_t;
|
||||
#endif
|
||||
#endif
|
||||
#undef __need_NULL
|
||||
#endif /* defined(__need_NULL) */
|
||||
|
||||
#if defined(__need_STDDEF_H_misc)
|
||||
#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L
|
||||
#include "__stddef_max_align_t.h"
|
||||
#endif
|
||||
#define offsetof(t, d) __builtin_offsetof(t, d)
|
||||
#undef __need_STDDEF_H_misc
|
||||
#endif /* defined(__need_STDDEF_H_misc) */
|
||||
|
||||
/* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use
|
||||
__WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */
|
||||
#if defined(__need_wint_t)
|
||||
/* Always define wint_t when modules are available. */
|
||||
#if !defined(_WINT_T) || __has_feature(modules)
|
||||
#if !__has_feature(modules)
|
||||
#define _WINT_T
|
||||
#endif
|
||||
typedef __WINT_TYPE__ wint_t;
|
||||
#endif
|
||||
#undef __need_wint_t
|
||||
#endif /* __need_wint_t */
|
||||
|
||||
#endif
|
||||
@@ -1,704 +0,0 @@
|
||||
/*===---- stdint.h - Standard header for sized integer types --------------===*\
|
||||
*
|
||||
* Copyright (c) 2009 Chris Lattner
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
\*===----------------------------------------------------------------------===*/
|
||||
|
||||
#ifndef __CLANG_STDINT_H
|
||||
#define __CLANG_STDINT_H
|
||||
|
||||
/* If we're hosted, fall back to the system's stdint.h, which might have
|
||||
* additional definitions.
|
||||
*/
|
||||
#if __STDC_HOSTED__ && __has_include_next(<stdint.h>)
|
||||
|
||||
// C99 7.18.3 Limits of other integer types
|
||||
//
|
||||
// Footnote 219, 220: C++ implementations should define these macros only when
|
||||
// __STDC_LIMIT_MACROS is defined before <stdint.h> is included.
|
||||
//
|
||||
// Footnote 222: C++ implementations should define these macros only when
|
||||
// __STDC_CONSTANT_MACROS is defined before <stdint.h> is included.
|
||||
//
|
||||
// C++11 [cstdint.syn]p2:
|
||||
//
|
||||
// The macros defined by <cstdint> are provided unconditionally. In particular,
|
||||
// the symbols __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS (mentioned in
|
||||
// footnotes 219, 220, and 222 in the C standard) play no role in C++.
|
||||
//
|
||||
// C11 removed the problematic footnotes.
|
||||
//
|
||||
// Work around this inconsistency by always defining those macros in C++ mode,
|
||||
// so that a C library implementation which follows the C99 standard can be
|
||||
// used in C++.
|
||||
# ifdef __cplusplus
|
||||
# if !defined(__STDC_LIMIT_MACROS)
|
||||
# define __STDC_LIMIT_MACROS
|
||||
# define __STDC_LIMIT_MACROS_DEFINED_BY_CLANG
|
||||
# endif
|
||||
# if !defined(__STDC_CONSTANT_MACROS)
|
||||
# define __STDC_CONSTANT_MACROS
|
||||
# define __STDC_CONSTANT_MACROS_DEFINED_BY_CLANG
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# include_next <stdint.h>
|
||||
|
||||
# ifdef __STDC_LIMIT_MACROS_DEFINED_BY_CLANG
|
||||
# undef __STDC_LIMIT_MACROS
|
||||
# undef __STDC_LIMIT_MACROS_DEFINED_BY_CLANG
|
||||
# endif
|
||||
# ifdef __STDC_CONSTANT_MACROS_DEFINED_BY_CLANG
|
||||
# undef __STDC_CONSTANT_MACROS
|
||||
# undef __STDC_CONSTANT_MACROS_DEFINED_BY_CLANG
|
||||
# endif
|
||||
|
||||
#else
|
||||
|
||||
/* C99 7.18.1.1 Exact-width integer types.
|
||||
* C99 7.18.1.2 Minimum-width integer types.
|
||||
* C99 7.18.1.3 Fastest minimum-width integer types.
|
||||
*
|
||||
* The standard requires that exact-width type be defined for 8-, 16-, 32-, and
|
||||
* 64-bit types if they are implemented. Other exact width types are optional.
|
||||
* This implementation defines an exact-width types for every integer width
|
||||
* that is represented in the standard integer types.
|
||||
*
|
||||
* The standard also requires minimum-width types be defined for 8-, 16-, 32-,
|
||||
* and 64-bit widths regardless of whether there are corresponding exact-width
|
||||
* types.
|
||||
*
|
||||
* To accommodate targets that are missing types that are exactly 8, 16, 32, or
|
||||
* 64 bits wide, this implementation takes an approach of cascading
|
||||
* redefinitions, redefining __int_leastN_t to successively smaller exact-width
|
||||
* types. It is therefore important that the types are defined in order of
|
||||
* descending widths.
|
||||
*
|
||||
* We currently assume that the minimum-width types and the fastest
|
||||
* minimum-width types are the same. This is allowed by the standard, but is
|
||||
* suboptimal.
|
||||
*
|
||||
* In violation of the standard, some targets do not implement a type that is
|
||||
* wide enough to represent all of the required widths (8-, 16-, 32-, 64-bit).
|
||||
* To accommodate these targets, a required minimum-width type is only
|
||||
* defined if there exists an exact-width type of equal or greater width.
|
||||
*/
|
||||
|
||||
#ifdef __INT64_TYPE__
|
||||
# ifndef __int8_t_defined /* glibc sys/types.h also defines int64_t*/
|
||||
typedef __INT64_TYPE__ int64_t;
|
||||
# endif /* __int8_t_defined */
|
||||
typedef __UINT64_TYPE__ uint64_t;
|
||||
# define __int_least64_t int64_t
|
||||
# define __uint_least64_t uint64_t
|
||||
# define __int_least32_t int64_t
|
||||
# define __uint_least32_t uint64_t
|
||||
# define __int_least16_t int64_t
|
||||
# define __uint_least16_t uint64_t
|
||||
# define __int_least8_t int64_t
|
||||
# define __uint_least8_t uint64_t
|
||||
#endif /* __INT64_TYPE__ */
|
||||
|
||||
#ifdef __int_least64_t
|
||||
typedef __int_least64_t int_least64_t;
|
||||
typedef __uint_least64_t uint_least64_t;
|
||||
typedef __int_least64_t int_fast64_t;
|
||||
typedef __uint_least64_t uint_fast64_t;
|
||||
#endif /* __int_least64_t */
|
||||
|
||||
#ifdef __INT56_TYPE__
|
||||
typedef __INT56_TYPE__ int56_t;
|
||||
typedef __UINT56_TYPE__ uint56_t;
|
||||
typedef int56_t int_least56_t;
|
||||
typedef uint56_t uint_least56_t;
|
||||
typedef int56_t int_fast56_t;
|
||||
typedef uint56_t uint_fast56_t;
|
||||
# define __int_least32_t int56_t
|
||||
# define __uint_least32_t uint56_t
|
||||
# define __int_least16_t int56_t
|
||||
# define __uint_least16_t uint56_t
|
||||
# define __int_least8_t int56_t
|
||||
# define __uint_least8_t uint56_t
|
||||
#endif /* __INT56_TYPE__ */
|
||||
|
||||
|
||||
#ifdef __INT48_TYPE__
|
||||
typedef __INT48_TYPE__ int48_t;
|
||||
typedef __UINT48_TYPE__ uint48_t;
|
||||
typedef int48_t int_least48_t;
|
||||
typedef uint48_t uint_least48_t;
|
||||
typedef int48_t int_fast48_t;
|
||||
typedef uint48_t uint_fast48_t;
|
||||
# define __int_least32_t int48_t
|
||||
# define __uint_least32_t uint48_t
|
||||
# define __int_least16_t int48_t
|
||||
# define __uint_least16_t uint48_t
|
||||
# define __int_least8_t int48_t
|
||||
# define __uint_least8_t uint48_t
|
||||
#endif /* __INT48_TYPE__ */
|
||||
|
||||
|
||||
#ifdef __INT40_TYPE__
|
||||
typedef __INT40_TYPE__ int40_t;
|
||||
typedef __UINT40_TYPE__ uint40_t;
|
||||
typedef int40_t int_least40_t;
|
||||
typedef uint40_t uint_least40_t;
|
||||
typedef int40_t int_fast40_t;
|
||||
typedef uint40_t uint_fast40_t;
|
||||
# define __int_least32_t int40_t
|
||||
# define __uint_least32_t uint40_t
|
||||
# define __int_least16_t int40_t
|
||||
# define __uint_least16_t uint40_t
|
||||
# define __int_least8_t int40_t
|
||||
# define __uint_least8_t uint40_t
|
||||
#endif /* __INT40_TYPE__ */
|
||||
|
||||
|
||||
#ifdef __INT32_TYPE__
|
||||
|
||||
# ifndef __int8_t_defined /* glibc sys/types.h also defines int32_t*/
|
||||
typedef __INT32_TYPE__ int32_t;
|
||||
# endif /* __int8_t_defined */
|
||||
|
||||
# ifndef __uint32_t_defined /* more glibc compatibility */
|
||||
# define __uint32_t_defined
|
||||
typedef __UINT32_TYPE__ uint32_t;
|
||||
# endif /* __uint32_t_defined */
|
||||
|
||||
# define __int_least32_t int32_t
|
||||
# define __uint_least32_t uint32_t
|
||||
# define __int_least16_t int32_t
|
||||
# define __uint_least16_t uint32_t
|
||||
# define __int_least8_t int32_t
|
||||
# define __uint_least8_t uint32_t
|
||||
#endif /* __INT32_TYPE__ */
|
||||
|
||||
#ifdef __int_least32_t
|
||||
typedef __int_least32_t int_least32_t;
|
||||
typedef __uint_least32_t uint_least32_t;
|
||||
typedef __int_least32_t int_fast32_t;
|
||||
typedef __uint_least32_t uint_fast32_t;
|
||||
#endif /* __int_least32_t */
|
||||
|
||||
#ifdef __INT24_TYPE__
|
||||
typedef __INT24_TYPE__ int24_t;
|
||||
typedef __UINT24_TYPE__ uint24_t;
|
||||
typedef int24_t int_least24_t;
|
||||
typedef uint24_t uint_least24_t;
|
||||
typedef int24_t int_fast24_t;
|
||||
typedef uint24_t uint_fast24_t;
|
||||
# define __int_least16_t int24_t
|
||||
# define __uint_least16_t uint24_t
|
||||
# define __int_least8_t int24_t
|
||||
# define __uint_least8_t uint24_t
|
||||
#endif /* __INT24_TYPE__ */
|
||||
|
||||
#ifdef __INT16_TYPE__
|
||||
#ifndef __int8_t_defined /* glibc sys/types.h also defines int16_t*/
|
||||
typedef __INT16_TYPE__ int16_t;
|
||||
#endif /* __int8_t_defined */
|
||||
typedef __UINT16_TYPE__ uint16_t;
|
||||
# define __int_least16_t int16_t
|
||||
# define __uint_least16_t uint16_t
|
||||
# define __int_least8_t int16_t
|
||||
# define __uint_least8_t uint16_t
|
||||
#endif /* __INT16_TYPE__ */
|
||||
|
||||
#ifdef __int_least16_t
|
||||
typedef __int_least16_t int_least16_t;
|
||||
typedef __uint_least16_t uint_least16_t;
|
||||
typedef __int_least16_t int_fast16_t;
|
||||
typedef __uint_least16_t uint_fast16_t;
|
||||
#endif /* __int_least16_t */
|
||||
|
||||
|
||||
#ifdef __INT8_TYPE__
|
||||
#ifndef __int8_t_defined /* glibc sys/types.h also defines int8_t*/
|
||||
typedef __INT8_TYPE__ int8_t;
|
||||
#endif /* __int8_t_defined */
|
||||
typedef __UINT8_TYPE__ uint8_t;
|
||||
# define __int_least8_t int8_t
|
||||
# define __uint_least8_t uint8_t
|
||||
#endif /* __INT8_TYPE__ */
|
||||
|
||||
#ifdef __int_least8_t
|
||||
typedef __int_least8_t int_least8_t;
|
||||
typedef __uint_least8_t uint_least8_t;
|
||||
typedef __int_least8_t int_fast8_t;
|
||||
typedef __uint_least8_t uint_fast8_t;
|
||||
#endif /* __int_least8_t */
|
||||
|
||||
/* prevent glibc sys/types.h from defining conflicting types */
|
||||
#ifndef __int8_t_defined
|
||||
# define __int8_t_defined
|
||||
#endif /* __int8_t_defined */
|
||||
|
||||
/* C99 7.18.1.4 Integer types capable of holding object pointers.
|
||||
*/
|
||||
#define __stdint_join3(a,b,c) a ## b ## c
|
||||
|
||||
#ifndef _INTPTR_T
|
||||
#ifndef __intptr_t_defined
|
||||
typedef __INTPTR_TYPE__ intptr_t;
|
||||
#define __intptr_t_defined
|
||||
#define _INTPTR_T
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _UINTPTR_T
|
||||
typedef __UINTPTR_TYPE__ uintptr_t;
|
||||
#define _UINTPTR_T
|
||||
#endif
|
||||
|
||||
/* C99 7.18.1.5 Greatest-width integer types.
|
||||
*/
|
||||
typedef __INTMAX_TYPE__ intmax_t;
|
||||
typedef __UINTMAX_TYPE__ uintmax_t;
|
||||
|
||||
/* C99 7.18.4 Macros for minimum-width integer constants.
|
||||
*
|
||||
* The standard requires that integer constant macros be defined for all the
|
||||
* minimum-width types defined above. As 8-, 16-, 32-, and 64-bit minimum-width
|
||||
* types are required, the corresponding integer constant macros are defined
|
||||
* here. This implementation also defines minimum-width types for every other
|
||||
* integer width that the target implements, so corresponding macros are
|
||||
* defined below, too.
|
||||
*
|
||||
* These macros are defined using the same successive-shrinking approach as
|
||||
* the type definitions above. It is likewise important that macros are defined
|
||||
* in order of decending width.
|
||||
*
|
||||
* Note that C++ should not check __STDC_CONSTANT_MACROS here, contrary to the
|
||||
* claims of the C standard (see C++ 18.3.1p2, [cstdint.syn]).
|
||||
*/
|
||||
|
||||
#define __int_c_join(a, b) a ## b
|
||||
#define __int_c(v, suffix) __int_c_join(v, suffix)
|
||||
#define __uint_c(v, suffix) __int_c_join(v##U, suffix)
|
||||
|
||||
|
||||
#ifdef __INT64_TYPE__
|
||||
# ifdef __INT64_C_SUFFIX__
|
||||
# define __int64_c_suffix __INT64_C_SUFFIX__
|
||||
# define __int32_c_suffix __INT64_C_SUFFIX__
|
||||
# define __int16_c_suffix __INT64_C_SUFFIX__
|
||||
# define __int8_c_suffix __INT64_C_SUFFIX__
|
||||
# else
|
||||
# undef __int64_c_suffix
|
||||
# undef __int32_c_suffix
|
||||
# undef __int16_c_suffix
|
||||
# undef __int8_c_suffix
|
||||
# endif /* __INT64_C_SUFFIX__ */
|
||||
#endif /* __INT64_TYPE__ */
|
||||
|
||||
#ifdef __int_least64_t
|
||||
# ifdef __int64_c_suffix
|
||||
# define INT64_C(v) __int_c(v, __int64_c_suffix)
|
||||
# define UINT64_C(v) __uint_c(v, __int64_c_suffix)
|
||||
# else
|
||||
# define INT64_C(v) v
|
||||
# define UINT64_C(v) v ## U
|
||||
# endif /* __int64_c_suffix */
|
||||
#endif /* __int_least64_t */
|
||||
|
||||
|
||||
#ifdef __INT56_TYPE__
|
||||
# ifdef __INT56_C_SUFFIX__
|
||||
# define INT56_C(v) __int_c(v, __INT56_C_SUFFIX__)
|
||||
# define UINT56_C(v) __uint_c(v, __INT56_C_SUFFIX__)
|
||||
# define __int32_c_suffix __INT56_C_SUFFIX__
|
||||
# define __int16_c_suffix __INT56_C_SUFFIX__
|
||||
# define __int8_c_suffix __INT56_C_SUFFIX__
|
||||
# else
|
||||
# define INT56_C(v) v
|
||||
# define UINT56_C(v) v ## U
|
||||
# undef __int32_c_suffix
|
||||
# undef __int16_c_suffix
|
||||
# undef __int8_c_suffix
|
||||
# endif /* __INT56_C_SUFFIX__ */
|
||||
#endif /* __INT56_TYPE__ */
|
||||
|
||||
|
||||
#ifdef __INT48_TYPE__
|
||||
# ifdef __INT48_C_SUFFIX__
|
||||
# define INT48_C(v) __int_c(v, __INT48_C_SUFFIX__)
|
||||
# define UINT48_C(v) __uint_c(v, __INT48_C_SUFFIX__)
|
||||
# define __int32_c_suffix __INT48_C_SUFFIX__
|
||||
# define __int16_c_suffix __INT48_C_SUFFIX__
|
||||
# define __int8_c_suffix __INT48_C_SUFFIX__
|
||||
# else
|
||||
# define INT48_C(v) v
|
||||
# define UINT48_C(v) v ## U
|
||||
# undef __int32_c_suffix
|
||||
# undef __int16_c_suffix
|
||||
# undef __int8_c_suffix
|
||||
# endif /* __INT48_C_SUFFIX__ */
|
||||
#endif /* __INT48_TYPE__ */
|
||||
|
||||
|
||||
#ifdef __INT40_TYPE__
|
||||
# ifdef __INT40_C_SUFFIX__
|
||||
# define INT40_C(v) __int_c(v, __INT40_C_SUFFIX__)
|
||||
# define UINT40_C(v) __uint_c(v, __INT40_C_SUFFIX__)
|
||||
# define __int32_c_suffix __INT40_C_SUFFIX__
|
||||
# define __int16_c_suffix __INT40_C_SUFFIX__
|
||||
# define __int8_c_suffix __INT40_C_SUFFIX__
|
||||
# else
|
||||
# define INT40_C(v) v
|
||||
# define UINT40_C(v) v ## U
|
||||
# undef __int32_c_suffix
|
||||
# undef __int16_c_suffix
|
||||
# undef __int8_c_suffix
|
||||
# endif /* __INT40_C_SUFFIX__ */
|
||||
#endif /* __INT40_TYPE__ */
|
||||
|
||||
|
||||
#ifdef __INT32_TYPE__
|
||||
# ifdef __INT32_C_SUFFIX__
|
||||
# define __int32_c_suffix __INT32_C_SUFFIX__
|
||||
# define __int16_c_suffix __INT32_C_SUFFIX__
|
||||
# define __int8_c_suffix __INT32_C_SUFFIX__
|
||||
#else
|
||||
# undef __int32_c_suffix
|
||||
# undef __int16_c_suffix
|
||||
# undef __int8_c_suffix
|
||||
# endif /* __INT32_C_SUFFIX__ */
|
||||
#endif /* __INT32_TYPE__ */
|
||||
|
||||
#ifdef __int_least32_t
|
||||
# ifdef __int32_c_suffix
|
||||
# define INT32_C(v) __int_c(v, __int32_c_suffix)
|
||||
# define UINT32_C(v) __uint_c(v, __int32_c_suffix)
|
||||
# else
|
||||
# define INT32_C(v) v
|
||||
# define UINT32_C(v) v ## U
|
||||
# endif /* __int32_c_suffix */
|
||||
#endif /* __int_least32_t */
|
||||
|
||||
|
||||
#ifdef __INT24_TYPE__
|
||||
# ifdef __INT24_C_SUFFIX__
|
||||
# define INT24_C(v) __int_c(v, __INT24_C_SUFFIX__)
|
||||
# define UINT24_C(v) __uint_c(v, __INT24_C_SUFFIX__)
|
||||
# define __int16_c_suffix __INT24_C_SUFFIX__
|
||||
# define __int8_c_suffix __INT24_C_SUFFIX__
|
||||
# else
|
||||
# define INT24_C(v) v
|
||||
# define UINT24_C(v) v ## U
|
||||
# undef __int16_c_suffix
|
||||
# undef __int8_c_suffix
|
||||
# endif /* __INT24_C_SUFFIX__ */
|
||||
#endif /* __INT24_TYPE__ */
|
||||
|
||||
|
||||
#ifdef __INT16_TYPE__
|
||||
# ifdef __INT16_C_SUFFIX__
|
||||
# define __int16_c_suffix __INT16_C_SUFFIX__
|
||||
# define __int8_c_suffix __INT16_C_SUFFIX__
|
||||
#else
|
||||
# undef __int16_c_suffix
|
||||
# undef __int8_c_suffix
|
||||
# endif /* __INT16_C_SUFFIX__ */
|
||||
#endif /* __INT16_TYPE__ */
|
||||
|
||||
#ifdef __int_least16_t
|
||||
# ifdef __int16_c_suffix
|
||||
# define INT16_C(v) __int_c(v, __int16_c_suffix)
|
||||
# define UINT16_C(v) __uint_c(v, __int16_c_suffix)
|
||||
# else
|
||||
# define INT16_C(v) v
|
||||
# define UINT16_C(v) v ## U
|
||||
# endif /* __int16_c_suffix */
|
||||
#endif /* __int_least16_t */
|
||||
|
||||
|
||||
#ifdef __INT8_TYPE__
|
||||
# ifdef __INT8_C_SUFFIX__
|
||||
# define __int8_c_suffix __INT8_C_SUFFIX__
|
||||
#else
|
||||
# undef __int8_c_suffix
|
||||
# endif /* __INT8_C_SUFFIX__ */
|
||||
#endif /* __INT8_TYPE__ */
|
||||
|
||||
#ifdef __int_least8_t
|
||||
# ifdef __int8_c_suffix
|
||||
# define INT8_C(v) __int_c(v, __int8_c_suffix)
|
||||
# define UINT8_C(v) __uint_c(v, __int8_c_suffix)
|
||||
# else
|
||||
# define INT8_C(v) v
|
||||
# define UINT8_C(v) v ## U
|
||||
# endif /* __int8_c_suffix */
|
||||
#endif /* __int_least8_t */
|
||||
|
||||
|
||||
/* C99 7.18.2.1 Limits of exact-width integer types.
|
||||
* C99 7.18.2.2 Limits of minimum-width integer types.
|
||||
* C99 7.18.2.3 Limits of fastest minimum-width integer types.
|
||||
*
|
||||
* The presence of limit macros are completely optional in C99. This
|
||||
* implementation defines limits for all of the types (exact- and
|
||||
* minimum-width) that it defines above, using the limits of the minimum-width
|
||||
* type for any types that do not have exact-width representations.
|
||||
*
|
||||
* As in the type definitions, this section takes an approach of
|
||||
* successive-shrinking to determine which limits to use for the standard (8,
|
||||
* 16, 32, 64) bit widths when they don't have exact representations. It is
|
||||
* therefore important that the definitions be kept in order of decending
|
||||
* widths.
|
||||
*
|
||||
* Note that C++ should not check __STDC_LIMIT_MACROS here, contrary to the
|
||||
* claims of the C standard (see C++ 18.3.1p2, [cstdint.syn]).
|
||||
*/
|
||||
|
||||
#ifdef __INT64_TYPE__
|
||||
# define INT64_MAX INT64_C( 9223372036854775807)
|
||||
# define INT64_MIN (-INT64_C( 9223372036854775807)-1)
|
||||
# define UINT64_MAX UINT64_C(18446744073709551615)
|
||||
# define __INT_LEAST64_MIN INT64_MIN
|
||||
# define __INT_LEAST64_MAX INT64_MAX
|
||||
# define __UINT_LEAST64_MAX UINT64_MAX
|
||||
# define __INT_LEAST32_MIN INT64_MIN
|
||||
# define __INT_LEAST32_MAX INT64_MAX
|
||||
# define __UINT_LEAST32_MAX UINT64_MAX
|
||||
# define __INT_LEAST16_MIN INT64_MIN
|
||||
# define __INT_LEAST16_MAX INT64_MAX
|
||||
# define __UINT_LEAST16_MAX UINT64_MAX
|
||||
# define __INT_LEAST8_MIN INT64_MIN
|
||||
# define __INT_LEAST8_MAX INT64_MAX
|
||||
# define __UINT_LEAST8_MAX UINT64_MAX
|
||||
#endif /* __INT64_TYPE__ */
|
||||
|
||||
#ifdef __INT_LEAST64_MIN
|
||||
# define INT_LEAST64_MIN __INT_LEAST64_MIN
|
||||
# define INT_LEAST64_MAX __INT_LEAST64_MAX
|
||||
# define UINT_LEAST64_MAX __UINT_LEAST64_MAX
|
||||
# define INT_FAST64_MIN __INT_LEAST64_MIN
|
||||
# define INT_FAST64_MAX __INT_LEAST64_MAX
|
||||
# define UINT_FAST64_MAX __UINT_LEAST64_MAX
|
||||
#endif /* __INT_LEAST64_MIN */
|
||||
|
||||
|
||||
#ifdef __INT56_TYPE__
|
||||
# define INT56_MAX INT56_C(36028797018963967)
|
||||
# define INT56_MIN (-INT56_C(36028797018963967)-1)
|
||||
# define UINT56_MAX UINT56_C(72057594037927935)
|
||||
# define INT_LEAST56_MIN INT56_MIN
|
||||
# define INT_LEAST56_MAX INT56_MAX
|
||||
# define UINT_LEAST56_MAX UINT56_MAX
|
||||
# define INT_FAST56_MIN INT56_MIN
|
||||
# define INT_FAST56_MAX INT56_MAX
|
||||
# define UINT_FAST56_MAX UINT56_MAX
|
||||
# define __INT_LEAST32_MIN INT56_MIN
|
||||
# define __INT_LEAST32_MAX INT56_MAX
|
||||
# define __UINT_LEAST32_MAX UINT56_MAX
|
||||
# define __INT_LEAST16_MIN INT56_MIN
|
||||
# define __INT_LEAST16_MAX INT56_MAX
|
||||
# define __UINT_LEAST16_MAX UINT56_MAX
|
||||
# define __INT_LEAST8_MIN INT56_MIN
|
||||
# define __INT_LEAST8_MAX INT56_MAX
|
||||
# define __UINT_LEAST8_MAX UINT56_MAX
|
||||
#endif /* __INT56_TYPE__ */
|
||||
|
||||
|
||||
#ifdef __INT48_TYPE__
|
||||
# define INT48_MAX INT48_C(140737488355327)
|
||||
# define INT48_MIN (-INT48_C(140737488355327)-1)
|
||||
# define UINT48_MAX UINT48_C(281474976710655)
|
||||
# define INT_LEAST48_MIN INT48_MIN
|
||||
# define INT_LEAST48_MAX INT48_MAX
|
||||
# define UINT_LEAST48_MAX UINT48_MAX
|
||||
# define INT_FAST48_MIN INT48_MIN
|
||||
# define INT_FAST48_MAX INT48_MAX
|
||||
# define UINT_FAST48_MAX UINT48_MAX
|
||||
# define __INT_LEAST32_MIN INT48_MIN
|
||||
# define __INT_LEAST32_MAX INT48_MAX
|
||||
# define __UINT_LEAST32_MAX UINT48_MAX
|
||||
# define __INT_LEAST16_MIN INT48_MIN
|
||||
# define __INT_LEAST16_MAX INT48_MAX
|
||||
# define __UINT_LEAST16_MAX UINT48_MAX
|
||||
# define __INT_LEAST8_MIN INT48_MIN
|
||||
# define __INT_LEAST8_MAX INT48_MAX
|
||||
# define __UINT_LEAST8_MAX UINT48_MAX
|
||||
#endif /* __INT48_TYPE__ */
|
||||
|
||||
|
||||
#ifdef __INT40_TYPE__
|
||||
# define INT40_MAX INT40_C(549755813887)
|
||||
# define INT40_MIN (-INT40_C(549755813887)-1)
|
||||
# define UINT40_MAX UINT40_C(1099511627775)
|
||||
# define INT_LEAST40_MIN INT40_MIN
|
||||
# define INT_LEAST40_MAX INT40_MAX
|
||||
# define UINT_LEAST40_MAX UINT40_MAX
|
||||
# define INT_FAST40_MIN INT40_MIN
|
||||
# define INT_FAST40_MAX INT40_MAX
|
||||
# define UINT_FAST40_MAX UINT40_MAX
|
||||
# define __INT_LEAST32_MIN INT40_MIN
|
||||
# define __INT_LEAST32_MAX INT40_MAX
|
||||
# define __UINT_LEAST32_MAX UINT40_MAX
|
||||
# define __INT_LEAST16_MIN INT40_MIN
|
||||
# define __INT_LEAST16_MAX INT40_MAX
|
||||
# define __UINT_LEAST16_MAX UINT40_MAX
|
||||
# define __INT_LEAST8_MIN INT40_MIN
|
||||
# define __INT_LEAST8_MAX INT40_MAX
|
||||
# define __UINT_LEAST8_MAX UINT40_MAX
|
||||
#endif /* __INT40_TYPE__ */
|
||||
|
||||
|
||||
#ifdef __INT32_TYPE__
|
||||
# define INT32_MAX INT32_C(2147483647)
|
||||
# define INT32_MIN (-INT32_C(2147483647)-1)
|
||||
# define UINT32_MAX UINT32_C(4294967295)
|
||||
# define __INT_LEAST32_MIN INT32_MIN
|
||||
# define __INT_LEAST32_MAX INT32_MAX
|
||||
# define __UINT_LEAST32_MAX UINT32_MAX
|
||||
# define __INT_LEAST16_MIN INT32_MIN
|
||||
# define __INT_LEAST16_MAX INT32_MAX
|
||||
# define __UINT_LEAST16_MAX UINT32_MAX
|
||||
# define __INT_LEAST8_MIN INT32_MIN
|
||||
# define __INT_LEAST8_MAX INT32_MAX
|
||||
# define __UINT_LEAST8_MAX UINT32_MAX
|
||||
#endif /* __INT32_TYPE__ */
|
||||
|
||||
#ifdef __INT_LEAST32_MIN
|
||||
# define INT_LEAST32_MIN __INT_LEAST32_MIN
|
||||
# define INT_LEAST32_MAX __INT_LEAST32_MAX
|
||||
# define UINT_LEAST32_MAX __UINT_LEAST32_MAX
|
||||
# define INT_FAST32_MIN __INT_LEAST32_MIN
|
||||
# define INT_FAST32_MAX __INT_LEAST32_MAX
|
||||
# define UINT_FAST32_MAX __UINT_LEAST32_MAX
|
||||
#endif /* __INT_LEAST32_MIN */
|
||||
|
||||
|
||||
#ifdef __INT24_TYPE__
|
||||
# define INT24_MAX INT24_C(8388607)
|
||||
# define INT24_MIN (-INT24_C(8388607)-1)
|
||||
# define UINT24_MAX UINT24_C(16777215)
|
||||
# define INT_LEAST24_MIN INT24_MIN
|
||||
# define INT_LEAST24_MAX INT24_MAX
|
||||
# define UINT_LEAST24_MAX UINT24_MAX
|
||||
# define INT_FAST24_MIN INT24_MIN
|
||||
# define INT_FAST24_MAX INT24_MAX
|
||||
# define UINT_FAST24_MAX UINT24_MAX
|
||||
# define __INT_LEAST16_MIN INT24_MIN
|
||||
# define __INT_LEAST16_MAX INT24_MAX
|
||||
# define __UINT_LEAST16_MAX UINT24_MAX
|
||||
# define __INT_LEAST8_MIN INT24_MIN
|
||||
# define __INT_LEAST8_MAX INT24_MAX
|
||||
# define __UINT_LEAST8_MAX UINT24_MAX
|
||||
#endif /* __INT24_TYPE__ */
|
||||
|
||||
|
||||
#ifdef __INT16_TYPE__
|
||||
#define INT16_MAX INT16_C(32767)
|
||||
#define INT16_MIN (-INT16_C(32767)-1)
|
||||
#define UINT16_MAX UINT16_C(65535)
|
||||
# define __INT_LEAST16_MIN INT16_MIN
|
||||
# define __INT_LEAST16_MAX INT16_MAX
|
||||
# define __UINT_LEAST16_MAX UINT16_MAX
|
||||
# define __INT_LEAST8_MIN INT16_MIN
|
||||
# define __INT_LEAST8_MAX INT16_MAX
|
||||
# define __UINT_LEAST8_MAX UINT16_MAX
|
||||
#endif /* __INT16_TYPE__ */
|
||||
|
||||
#ifdef __INT_LEAST16_MIN
|
||||
# define INT_LEAST16_MIN __INT_LEAST16_MIN
|
||||
# define INT_LEAST16_MAX __INT_LEAST16_MAX
|
||||
# define UINT_LEAST16_MAX __UINT_LEAST16_MAX
|
||||
# define INT_FAST16_MIN __INT_LEAST16_MIN
|
||||
# define INT_FAST16_MAX __INT_LEAST16_MAX
|
||||
# define UINT_FAST16_MAX __UINT_LEAST16_MAX
|
||||
#endif /* __INT_LEAST16_MIN */
|
||||
|
||||
|
||||
#ifdef __INT8_TYPE__
|
||||
# define INT8_MAX INT8_C(127)
|
||||
# define INT8_MIN (-INT8_C(127)-1)
|
||||
# define UINT8_MAX UINT8_C(255)
|
||||
# define __INT_LEAST8_MIN INT8_MIN
|
||||
# define __INT_LEAST8_MAX INT8_MAX
|
||||
# define __UINT_LEAST8_MAX UINT8_MAX
|
||||
#endif /* __INT8_TYPE__ */
|
||||
|
||||
#ifdef __INT_LEAST8_MIN
|
||||
# define INT_LEAST8_MIN __INT_LEAST8_MIN
|
||||
# define INT_LEAST8_MAX __INT_LEAST8_MAX
|
||||
# define UINT_LEAST8_MAX __UINT_LEAST8_MAX
|
||||
# define INT_FAST8_MIN __INT_LEAST8_MIN
|
||||
# define INT_FAST8_MAX __INT_LEAST8_MAX
|
||||
# define UINT_FAST8_MAX __UINT_LEAST8_MAX
|
||||
#endif /* __INT_LEAST8_MIN */
|
||||
|
||||
/* Some utility macros */
|
||||
#define __INTN_MIN(n) __stdint_join3( INT, n, _MIN)
|
||||
#define __INTN_MAX(n) __stdint_join3( INT, n, _MAX)
|
||||
#define __UINTN_MAX(n) __stdint_join3(UINT, n, _MAX)
|
||||
#define __INTN_C(n, v) __stdint_join3( INT, n, _C(v))
|
||||
#define __UINTN_C(n, v) __stdint_join3(UINT, n, _C(v))
|
||||
|
||||
/* C99 7.18.2.4 Limits of integer types capable of holding object pointers. */
|
||||
/* C99 7.18.3 Limits of other integer types. */
|
||||
|
||||
#define INTPTR_MIN (-__INTPTR_MAX__-1)
|
||||
#define INTPTR_MAX __INTPTR_MAX__
|
||||
#define UINTPTR_MAX __UINTPTR_MAX__
|
||||
#define PTRDIFF_MIN (-__PTRDIFF_MAX__-1)
|
||||
#define PTRDIFF_MAX __PTRDIFF_MAX__
|
||||
#define SIZE_MAX __SIZE_MAX__
|
||||
|
||||
/* ISO9899:2011 7.20 (C11 Annex K): Define RSIZE_MAX if __STDC_WANT_LIB_EXT1__
|
||||
* is enabled. */
|
||||
#if defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1
|
||||
#define RSIZE_MAX (SIZE_MAX >> 1)
|
||||
#endif
|
||||
|
||||
/* C99 7.18.2.5 Limits of greatest-width integer types. */
|
||||
#define INTMAX_MIN (-__INTMAX_MAX__-1)
|
||||
#define INTMAX_MAX __INTMAX_MAX__
|
||||
#define UINTMAX_MAX __UINTMAX_MAX__
|
||||
|
||||
/* C99 7.18.3 Limits of other integer types. */
|
||||
#define SIG_ATOMIC_MIN __INTN_MIN(__SIG_ATOMIC_WIDTH__)
|
||||
#define SIG_ATOMIC_MAX __INTN_MAX(__SIG_ATOMIC_WIDTH__)
|
||||
#ifdef __WINT_UNSIGNED__
|
||||
# define WINT_MIN __UINTN_C(__WINT_WIDTH__, 0)
|
||||
# define WINT_MAX __UINTN_MAX(__WINT_WIDTH__)
|
||||
#else
|
||||
# define WINT_MIN __INTN_MIN(__WINT_WIDTH__)
|
||||
# define WINT_MAX __INTN_MAX(__WINT_WIDTH__)
|
||||
#endif
|
||||
|
||||
#ifndef WCHAR_MAX
|
||||
# define WCHAR_MAX __WCHAR_MAX__
|
||||
#endif
|
||||
#ifndef WCHAR_MIN
|
||||
# if __WCHAR_MAX__ == __INTN_MAX(__WCHAR_WIDTH__)
|
||||
# define WCHAR_MIN __INTN_MIN(__WCHAR_WIDTH__)
|
||||
# else
|
||||
# define WCHAR_MIN __UINTN_C(__WCHAR_WIDTH__, 0)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* 7.18.4.2 Macros for greatest-width integer constants. */
|
||||
#define INTMAX_C(v) __int_c(v, __INTMAX_C_SUFFIX__)
|
||||
#define UINTMAX_C(v) __int_c(v, __UINTMAX_C_SUFFIX__)
|
||||
|
||||
#endif /* __STDC_HOSTED__ */
|
||||
#endif /* __CLANG_STDINT_H */
|
||||
@@ -1,30 +0,0 @@
|
||||
/*===---- stdnoreturn.h - Standard header for noreturn macro ---------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __STDNORETURN_H
|
||||
#define __STDNORETURN_H
|
||||
|
||||
#define noreturn _Noreturn
|
||||
#define __noreturn_is_defined 1
|
||||
|
||||
#endif /* __STDNORETURN_H */
|
||||
@@ -1,154 +0,0 @@
|
||||
/*===---- tbmintrin.h - TBM intrinsics -------------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __X86INTRIN_H
|
||||
#error "Never use <tbmintrin.h> directly; include <x86intrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __TBMINTRIN_H
|
||||
#define __TBMINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("tbm")))
|
||||
|
||||
#define __bextri_u32(a, b) \
|
||||
((unsigned int)__builtin_ia32_bextri_u32((unsigned int)(a), \
|
||||
(unsigned int)(b)))
|
||||
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
||||
__blcfill_u32(unsigned int __a)
|
||||
{
|
||||
return __a & (__a + 1);
|
||||
}
|
||||
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
||||
__blci_u32(unsigned int __a)
|
||||
{
|
||||
return __a | ~(__a + 1);
|
||||
}
|
||||
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
||||
__blcic_u32(unsigned int __a)
|
||||
{
|
||||
return ~__a & (__a + 1);
|
||||
}
|
||||
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
||||
__blcmsk_u32(unsigned int __a)
|
||||
{
|
||||
return __a ^ (__a + 1);
|
||||
}
|
||||
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
||||
__blcs_u32(unsigned int __a)
|
||||
{
|
||||
return __a | (__a + 1);
|
||||
}
|
||||
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
||||
__blsfill_u32(unsigned int __a)
|
||||
{
|
||||
return __a | (__a - 1);
|
||||
}
|
||||
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
||||
__blsic_u32(unsigned int __a)
|
||||
{
|
||||
return ~__a | (__a - 1);
|
||||
}
|
||||
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
||||
__t1mskc_u32(unsigned int __a)
|
||||
{
|
||||
return ~__a | (__a + 1);
|
||||
}
|
||||
|
||||
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
||||
__tzmsk_u32(unsigned int __a)
|
||||
{
|
||||
return ~__a & (__a - 1);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
#define __bextri_u64(a, b) \
|
||||
((unsigned long long)__builtin_ia32_bextri_u64((unsigned long long)(a), \
|
||||
(unsigned long long)(b)))
|
||||
|
||||
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
||||
__blcfill_u64(unsigned long long __a)
|
||||
{
|
||||
return __a & (__a + 1);
|
||||
}
|
||||
|
||||
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
||||
__blci_u64(unsigned long long __a)
|
||||
{
|
||||
return __a | ~(__a + 1);
|
||||
}
|
||||
|
||||
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
||||
__blcic_u64(unsigned long long __a)
|
||||
{
|
||||
return ~__a & (__a + 1);
|
||||
}
|
||||
|
||||
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
||||
__blcmsk_u64(unsigned long long __a)
|
||||
{
|
||||
return __a ^ (__a + 1);
|
||||
}
|
||||
|
||||
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
||||
__blcs_u64(unsigned long long __a)
|
||||
{
|
||||
return __a | (__a + 1);
|
||||
}
|
||||
|
||||
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
||||
__blsfill_u64(unsigned long long __a)
|
||||
{
|
||||
return __a | (__a - 1);
|
||||
}
|
||||
|
||||
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
||||
__blsic_u64(unsigned long long __a)
|
||||
{
|
||||
return ~__a | (__a - 1);
|
||||
}
|
||||
|
||||
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
||||
__t1mskc_u64(unsigned long long __a)
|
||||
{
|
||||
return ~__a | (__a + 1);
|
||||
}
|
||||
|
||||
static __inline__ unsigned long long __DEFAULT_FN_ATTRS
|
||||
__tzmsk_u64(unsigned long long __a)
|
||||
{
|
||||
return ~__a & (__a - 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif /* __TBMINTRIN_H */
|
||||
1384
c_headers/tgmath.h
1384
c_headers/tgmath.h
File diff suppressed because it is too large
Load Diff
@@ -1,341 +0,0 @@
|
||||
/*===---- unwind.h - Stack unwinding ----------------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
/* See "Data Definitions for libgcc_s" in the Linux Standard Base.*/
|
||||
|
||||
#ifndef __CLANG_UNWIND_H
|
||||
#define __CLANG_UNWIND_H
|
||||
|
||||
#if defined(__APPLE__) && __has_include_next(<unwind.h>)
|
||||
/* Darwin (from 11.x on) provide an unwind.h. If that's available,
|
||||
* use it. libunwind wraps some of its definitions in #ifdef _GNU_SOURCE,
|
||||
* so define that around the include.*/
|
||||
# ifndef _GNU_SOURCE
|
||||
# define _SHOULD_UNDEFINE_GNU_SOURCE
|
||||
# define _GNU_SOURCE
|
||||
# endif
|
||||
// libunwind's unwind.h reflects the current visibility. However, Mozilla
|
||||
// builds with -fvisibility=hidden and relies on gcc's unwind.h to reset the
|
||||
// visibility to default and export its contents. gcc also allows users to
|
||||
// override its override by #defining HIDE_EXPORTS (but note, this only obeys
|
||||
// the user's -fvisibility setting; it doesn't hide any exports on its own). We
|
||||
// imitate gcc's header here:
|
||||
# ifdef HIDE_EXPORTS
|
||||
# include_next <unwind.h>
|
||||
# else
|
||||
# pragma GCC visibility push(default)
|
||||
# include_next <unwind.h>
|
||||
# pragma GCC visibility pop
|
||||
# endif
|
||||
# ifdef _SHOULD_UNDEFINE_GNU_SOURCE
|
||||
# undef _GNU_SOURCE
|
||||
# undef _SHOULD_UNDEFINE_GNU_SOURCE
|
||||
# endif
|
||||
#else
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* It is a bit strange for a header to play with the visibility of the
|
||||
symbols it declares, but this matches gcc's behavior and some programs
|
||||
depend on it */
|
||||
#ifndef HIDE_EXPORTS
|
||||
#pragma GCC visibility push(default)
|
||||
#endif
|
||||
|
||||
typedef uintptr_t _Unwind_Word;
|
||||
typedef intptr_t _Unwind_Sword;
|
||||
typedef uintptr_t _Unwind_Ptr;
|
||||
typedef uintptr_t _Unwind_Internal_Ptr;
|
||||
typedef uint64_t _Unwind_Exception_Class;
|
||||
|
||||
typedef intptr_t _sleb128_t;
|
||||
typedef uintptr_t _uleb128_t;
|
||||
|
||||
struct _Unwind_Context;
|
||||
#if defined(__arm__) && !(defined(__USING_SJLJ_EXCEPTIONS__) || defined(__ARM_DWARF_EH__))
|
||||
struct _Unwind_Control_Block;
|
||||
typedef struct _Unwind_Control_Block _Unwind_Exception; /* Alias */
|
||||
#else
|
||||
struct _Unwind_Exception;
|
||||
typedef struct _Unwind_Exception _Unwind_Exception;
|
||||
#endif
|
||||
typedef enum {
|
||||
_URC_NO_REASON = 0,
|
||||
#if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
|
||||
!defined(__ARM_DWARF_EH__)
|
||||
_URC_OK = 0, /* used by ARM EHABI */
|
||||
#endif
|
||||
_URC_FOREIGN_EXCEPTION_CAUGHT = 1,
|
||||
|
||||
_URC_FATAL_PHASE2_ERROR = 2,
|
||||
_URC_FATAL_PHASE1_ERROR = 3,
|
||||
_URC_NORMAL_STOP = 4,
|
||||
|
||||
_URC_END_OF_STACK = 5,
|
||||
_URC_HANDLER_FOUND = 6,
|
||||
_URC_INSTALL_CONTEXT = 7,
|
||||
_URC_CONTINUE_UNWIND = 8,
|
||||
#if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
|
||||
!defined(__ARM_DWARF_EH__)
|
||||
_URC_FAILURE = 9 /* used by ARM EHABI */
|
||||
#endif
|
||||
} _Unwind_Reason_Code;
|
||||
|
||||
typedef enum {
|
||||
_UA_SEARCH_PHASE = 1,
|
||||
_UA_CLEANUP_PHASE = 2,
|
||||
|
||||
_UA_HANDLER_FRAME = 4,
|
||||
_UA_FORCE_UNWIND = 8,
|
||||
_UA_END_OF_STACK = 16 /* gcc extension to C++ ABI */
|
||||
} _Unwind_Action;
|
||||
|
||||
typedef void (*_Unwind_Exception_Cleanup_Fn)(_Unwind_Reason_Code,
|
||||
_Unwind_Exception *);
|
||||
|
||||
#if defined(__arm__) && !(defined(__USING_SJLJ_EXCEPTIONS__) || defined(__ARM_DWARF_EH__))
|
||||
typedef struct _Unwind_Control_Block _Unwind_Control_Block;
|
||||
typedef uint32_t _Unwind_EHT_Header;
|
||||
|
||||
struct _Unwind_Control_Block {
|
||||
uint64_t exception_class;
|
||||
void (*exception_cleanup)(_Unwind_Reason_Code, _Unwind_Control_Block *);
|
||||
/* unwinder cache (private fields for the unwinder's use) */
|
||||
struct {
|
||||
uint32_t reserved1; /* forced unwind stop function, 0 if not forced */
|
||||
uint32_t reserved2; /* personality routine */
|
||||
uint32_t reserved3; /* callsite */
|
||||
uint32_t reserved4; /* forced unwind stop argument */
|
||||
uint32_t reserved5;
|
||||
} unwinder_cache;
|
||||
/* propagation barrier cache (valid after phase 1) */
|
||||
struct {
|
||||
uint32_t sp;
|
||||
uint32_t bitpattern[5];
|
||||
} barrier_cache;
|
||||
/* cleanup cache (preserved over cleanup) */
|
||||
struct {
|
||||
uint32_t bitpattern[4];
|
||||
} cleanup_cache;
|
||||
/* personality cache (for personality's benefit) */
|
||||
struct {
|
||||
uint32_t fnstart; /* function start address */
|
||||
_Unwind_EHT_Header *ehtp; /* pointer to EHT entry header word */
|
||||
uint32_t additional; /* additional data */
|
||||
uint32_t reserved1;
|
||||
} pr_cache;
|
||||
long long int : 0; /* force alignment of next item to 8-byte boundary */
|
||||
} __attribute__((__aligned__(8)));
|
||||
#else
|
||||
struct _Unwind_Exception {
|
||||
_Unwind_Exception_Class exception_class;
|
||||
_Unwind_Exception_Cleanup_Fn exception_cleanup;
|
||||
#if !defined (__USING_SJLJ_EXCEPTIONS__) && defined (__SEH__)
|
||||
_Unwind_Word private_[6];
|
||||
#else
|
||||
_Unwind_Word private_1;
|
||||
_Unwind_Word private_2;
|
||||
#endif
|
||||
/* The Itanium ABI requires that _Unwind_Exception objects are "double-word
|
||||
* aligned". GCC has interpreted this to mean "use the maximum useful
|
||||
* alignment for the target"; so do we. */
|
||||
} __attribute__((__aligned__));
|
||||
#endif
|
||||
|
||||
typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn)(int, _Unwind_Action,
|
||||
_Unwind_Exception_Class,
|
||||
_Unwind_Exception *,
|
||||
struct _Unwind_Context *,
|
||||
void *);
|
||||
|
||||
typedef _Unwind_Reason_Code (*_Unwind_Personality_Fn)(int, _Unwind_Action,
|
||||
_Unwind_Exception_Class,
|
||||
_Unwind_Exception *,
|
||||
struct _Unwind_Context *);
|
||||
typedef _Unwind_Personality_Fn __personality_routine;
|
||||
|
||||
typedef _Unwind_Reason_Code (*_Unwind_Trace_Fn)(struct _Unwind_Context *,
|
||||
void *);
|
||||
|
||||
#if defined(__arm__) && !(defined(__USING_SJLJ_EXCEPTIONS__) || defined(__ARM_DWARF_EH__))
|
||||
typedef enum {
|
||||
_UVRSC_CORE = 0, /* integer register */
|
||||
_UVRSC_VFP = 1, /* vfp */
|
||||
_UVRSC_WMMXD = 3, /* Intel WMMX data register */
|
||||
_UVRSC_WMMXC = 4 /* Intel WMMX control register */
|
||||
} _Unwind_VRS_RegClass;
|
||||
|
||||
typedef enum {
|
||||
_UVRSD_UINT32 = 0,
|
||||
_UVRSD_VFPX = 1,
|
||||
_UVRSD_UINT64 = 3,
|
||||
_UVRSD_FLOAT = 4,
|
||||
_UVRSD_DOUBLE = 5
|
||||
} _Unwind_VRS_DataRepresentation;
|
||||
|
||||
typedef enum {
|
||||
_UVRSR_OK = 0,
|
||||
_UVRSR_NOT_IMPLEMENTED = 1,
|
||||
_UVRSR_FAILED = 2
|
||||
} _Unwind_VRS_Result;
|
||||
|
||||
typedef uint32_t _Unwind_State;
|
||||
#define _US_VIRTUAL_UNWIND_FRAME ((_Unwind_State)0)
|
||||
#define _US_UNWIND_FRAME_STARTING ((_Unwind_State)1)
|
||||
#define _US_UNWIND_FRAME_RESUME ((_Unwind_State)2)
|
||||
#define _US_ACTION_MASK ((_Unwind_State)3)
|
||||
#define _US_FORCE_UNWIND ((_Unwind_State)8)
|
||||
|
||||
_Unwind_VRS_Result _Unwind_VRS_Get(struct _Unwind_Context *__context,
|
||||
_Unwind_VRS_RegClass __regclass,
|
||||
uint32_t __regno,
|
||||
_Unwind_VRS_DataRepresentation __representation,
|
||||
void *__valuep);
|
||||
|
||||
_Unwind_VRS_Result _Unwind_VRS_Set(struct _Unwind_Context *__context,
|
||||
_Unwind_VRS_RegClass __regclass,
|
||||
uint32_t __regno,
|
||||
_Unwind_VRS_DataRepresentation __representation,
|
||||
void *__valuep);
|
||||
|
||||
static __inline__
|
||||
_Unwind_Word _Unwind_GetGR(struct _Unwind_Context *__context, int __index) {
|
||||
_Unwind_Word __value;
|
||||
_Unwind_VRS_Get(__context, _UVRSC_CORE, __index, _UVRSD_UINT32, &__value);
|
||||
return __value;
|
||||
}
|
||||
|
||||
static __inline__
|
||||
void _Unwind_SetGR(struct _Unwind_Context *__context, int __index,
|
||||
_Unwind_Word __value) {
|
||||
_Unwind_VRS_Set(__context, _UVRSC_CORE, __index, _UVRSD_UINT32, &__value);
|
||||
}
|
||||
|
||||
static __inline__
|
||||
_Unwind_Word _Unwind_GetIP(struct _Unwind_Context *__context) {
|
||||
_Unwind_Word __ip = _Unwind_GetGR(__context, 15);
|
||||
return __ip & ~(_Unwind_Word)(0x1); /* Remove thumb mode bit. */
|
||||
}
|
||||
|
||||
static __inline__
|
||||
void _Unwind_SetIP(struct _Unwind_Context *__context, _Unwind_Word __value) {
|
||||
_Unwind_Word __thumb_mode_bit = _Unwind_GetGR(__context, 15) & 0x1;
|
||||
_Unwind_SetGR(__context, 15, __value | __thumb_mode_bit);
|
||||
}
|
||||
#else
|
||||
_Unwind_Word _Unwind_GetGR(struct _Unwind_Context *, int);
|
||||
void _Unwind_SetGR(struct _Unwind_Context *, int, _Unwind_Word);
|
||||
|
||||
_Unwind_Word _Unwind_GetIP(struct _Unwind_Context *);
|
||||
void _Unwind_SetIP(struct _Unwind_Context *, _Unwind_Word);
|
||||
#endif
|
||||
|
||||
|
||||
_Unwind_Word _Unwind_GetIPInfo(struct _Unwind_Context *, int *);
|
||||
|
||||
_Unwind_Word _Unwind_GetCFA(struct _Unwind_Context *);
|
||||
|
||||
_Unwind_Word _Unwind_GetBSP(struct _Unwind_Context *);
|
||||
|
||||
void *_Unwind_GetLanguageSpecificData(struct _Unwind_Context *);
|
||||
|
||||
_Unwind_Ptr _Unwind_GetRegionStart(struct _Unwind_Context *);
|
||||
|
||||
/* DWARF EH functions; currently not available on Darwin/ARM */
|
||||
#if !defined(__APPLE__) || !defined(__arm__)
|
||||
_Unwind_Reason_Code _Unwind_RaiseException(_Unwind_Exception *);
|
||||
_Unwind_Reason_Code _Unwind_ForcedUnwind(_Unwind_Exception *, _Unwind_Stop_Fn,
|
||||
void *);
|
||||
void _Unwind_DeleteException(_Unwind_Exception *);
|
||||
void _Unwind_Resume(_Unwind_Exception *);
|
||||
_Unwind_Reason_Code _Unwind_Resume_or_Rethrow(_Unwind_Exception *);
|
||||
|
||||
#endif
|
||||
|
||||
_Unwind_Reason_Code _Unwind_Backtrace(_Unwind_Trace_Fn, void *);
|
||||
|
||||
/* setjmp(3)/longjmp(3) stuff */
|
||||
typedef struct SjLj_Function_Context *_Unwind_FunctionContext_t;
|
||||
|
||||
void _Unwind_SjLj_Register(_Unwind_FunctionContext_t);
|
||||
void _Unwind_SjLj_Unregister(_Unwind_FunctionContext_t);
|
||||
_Unwind_Reason_Code _Unwind_SjLj_RaiseException(_Unwind_Exception *);
|
||||
_Unwind_Reason_Code _Unwind_SjLj_ForcedUnwind(_Unwind_Exception *,
|
||||
_Unwind_Stop_Fn, void *);
|
||||
void _Unwind_SjLj_Resume(_Unwind_Exception *);
|
||||
_Unwind_Reason_Code _Unwind_SjLj_Resume_or_Rethrow(_Unwind_Exception *);
|
||||
|
||||
void *_Unwind_FindEnclosingFunction(void *);
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
||||
_Unwind_Ptr _Unwind_GetDataRelBase(struct _Unwind_Context *)
|
||||
__attribute__((__unavailable__));
|
||||
_Unwind_Ptr _Unwind_GetTextRelBase(struct _Unwind_Context *)
|
||||
__attribute__((__unavailable__));
|
||||
|
||||
/* Darwin-specific functions */
|
||||
void __register_frame(const void *);
|
||||
void __deregister_frame(const void *);
|
||||
|
||||
struct dwarf_eh_bases {
|
||||
uintptr_t tbase;
|
||||
uintptr_t dbase;
|
||||
uintptr_t func;
|
||||
};
|
||||
void *_Unwind_Find_FDE(const void *, struct dwarf_eh_bases *);
|
||||
|
||||
void __register_frame_info_bases(const void *, void *, void *, void *)
|
||||
__attribute__((__unavailable__));
|
||||
void __register_frame_info(const void *, void *) __attribute__((__unavailable__));
|
||||
void __register_frame_info_table_bases(const void *, void*, void *, void *)
|
||||
__attribute__((__unavailable__));
|
||||
void __register_frame_info_table(const void *, void *)
|
||||
__attribute__((__unavailable__));
|
||||
void __register_frame_table(const void *) __attribute__((__unavailable__));
|
||||
void __deregister_frame_info(const void *) __attribute__((__unavailable__));
|
||||
void __deregister_frame_info_bases(const void *)__attribute__((__unavailable__));
|
||||
|
||||
#else
|
||||
|
||||
_Unwind_Ptr _Unwind_GetDataRelBase(struct _Unwind_Context *);
|
||||
_Unwind_Ptr _Unwind_GetTextRelBase(struct _Unwind_Context *);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef HIDE_EXPORTS
|
||||
#pragma GCC visibility pop
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __CLANG_UNWIND_H */
|
||||
@@ -1,65 +0,0 @@
|
||||
/* ===-------- vadefs.h ---------------------------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
/* Only include this if we are aiming for MSVC compatibility. */
|
||||
#ifndef _MSC_VER
|
||||
#include_next <vadefs.h>
|
||||
#else
|
||||
|
||||
#ifndef __clang_vadefs_h
|
||||
#define __clang_vadefs_h
|
||||
|
||||
#include_next <vadefs.h>
|
||||
|
||||
/* Override macros from vadefs.h with definitions that work with Clang. */
|
||||
#ifdef _crt_va_start
|
||||
#undef _crt_va_start
|
||||
#define _crt_va_start(ap, param) __builtin_va_start(ap, param)
|
||||
#endif
|
||||
#ifdef _crt_va_end
|
||||
#undef _crt_va_end
|
||||
#define _crt_va_end(ap) __builtin_va_end(ap)
|
||||
#endif
|
||||
#ifdef _crt_va_arg
|
||||
#undef _crt_va_arg
|
||||
#define _crt_va_arg(ap, type) __builtin_va_arg(ap, type)
|
||||
#endif
|
||||
|
||||
/* VS 2015 switched to double underscore names, which is an improvement, but now
|
||||
* we have to intercept those names too.
|
||||
*/
|
||||
#ifdef __crt_va_start
|
||||
#undef __crt_va_start
|
||||
#define __crt_va_start(ap, param) __builtin_va_start(ap, param)
|
||||
#endif
|
||||
#ifdef __crt_va_end
|
||||
#undef __crt_va_end
|
||||
#define __crt_va_end(ap) __builtin_va_end(ap)
|
||||
#endif
|
||||
#ifdef __crt_va_arg
|
||||
#undef __crt_va_arg
|
||||
#define __crt_va_arg(ap, type) __builtin_va_arg(ap, type)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@@ -1,98 +0,0 @@
|
||||
/*===------------------ vaesintrin.h - VAES intrinsics ---------------------===
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <vaesintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __VAESINTRIN_H
|
||||
#define __VAESINTRIN_H
|
||||
|
||||
/* Default attributes for YMM forms. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("vaes"), __min_vector_width__(256)))
|
||||
|
||||
/* Default attributes for ZMM forms. */
|
||||
#define __DEFAULT_FN_ATTRS_F __attribute__((__always_inline__, __nodebug__, __target__("avx512f,vaes"), __min_vector_width__(512)))
|
||||
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS
|
||||
_mm256_aesenc_epi128(__m256i __A, __m256i __B)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_aesenc256((__v4di) __A,
|
||||
(__v4di) __B);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS_F
|
||||
_mm512_aesenc_epi128(__m512i __A, __m512i __B)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_aesenc512((__v8di) __A,
|
||||
(__v8di) __B);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS
|
||||
_mm256_aesdec_epi128(__m256i __A, __m256i __B)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_aesdec256((__v4di) __A,
|
||||
(__v4di) __B);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS_F
|
||||
_mm512_aesdec_epi128(__m512i __A, __m512i __B)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_aesdec512((__v8di) __A,
|
||||
(__v8di) __B);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS
|
||||
_mm256_aesenclast_epi128(__m256i __A, __m256i __B)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_aesenclast256((__v4di) __A,
|
||||
(__v4di) __B);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS_F
|
||||
_mm512_aesenclast_epi128(__m512i __A, __m512i __B)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_aesenclast512((__v8di) __A,
|
||||
(__v8di) __B);
|
||||
}
|
||||
|
||||
static __inline__ __m256i __DEFAULT_FN_ATTRS
|
||||
_mm256_aesdeclast_epi128(__m256i __A, __m256i __B)
|
||||
{
|
||||
return (__m256i) __builtin_ia32_aesdeclast256((__v4di) __A,
|
||||
(__v4di) __B);
|
||||
}
|
||||
|
||||
static __inline__ __m512i __DEFAULT_FN_ATTRS_F
|
||||
_mm512_aesdeclast_epi128(__m512i __A, __m512i __B)
|
||||
{
|
||||
return (__m512i) __builtin_ia32_aesdeclast512((__v8di) __A,
|
||||
(__v8di) __B);
|
||||
}
|
||||
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
#undef __DEFAULT_FN_ATTRS_F
|
||||
|
||||
#endif
|
||||
@@ -1,26 +0,0 @@
|
||||
/*===---- varargs.h - Variable argument handling -------------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __VARARGS_H
|
||||
#define __VARARGS_H
|
||||
#error "Please use <stdarg.h> instead of <varargs.h>"
|
||||
#endif
|
||||
@@ -1,42 +0,0 @@
|
||||
/*===------------ vpclmulqdqintrin.h - VPCLMULQDQ intrinsics ---------------===
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <vpclmulqdqintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __VPCLMULQDQINTRIN_H
|
||||
#define __VPCLMULQDQINTRIN_H
|
||||
|
||||
#define _mm256_clmulepi64_epi128(A, B, I) \
|
||||
(__m256i)__builtin_ia32_pclmulqdq256((__v4di)(__m256i)(A), \
|
||||
(__v4di)(__m256i)(B), \
|
||||
(char)(I))
|
||||
|
||||
#define _mm512_clmulepi64_epi128(A, B, I) \
|
||||
(__m512i)__builtin_ia32_pclmulqdq512((__v8di)(__m512i)(A), \
|
||||
(__v8di)(__m512i)(B), \
|
||||
(char)(I))
|
||||
|
||||
#endif /* __VPCLMULQDQINTRIN_H */
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
/*===----------------------- waitpkgintrin.h - WAITPKG --------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H
|
||||
#error "Never use <waitpkgintrin.h> directly; include <x86intrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __WAITPKGINTRIN_H
|
||||
#define __WAITPKGINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS \
|
||||
__attribute__((__always_inline__, __nodebug__, __target__("waitpkg")))
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_umonitor (void * __address)
|
||||
{
|
||||
__builtin_ia32_umonitor (__address);
|
||||
}
|
||||
|
||||
static __inline__ unsigned char __DEFAULT_FN_ATTRS
|
||||
_umwait (unsigned int __control, unsigned long long __counter)
|
||||
{
|
||||
return __builtin_ia32_umwait (__control,
|
||||
(unsigned int)(__counter >> 32), (unsigned int)__counter);
|
||||
}
|
||||
|
||||
static __inline__ unsigned char __DEFAULT_FN_ATTRS
|
||||
_tpause (unsigned int __control, unsigned long long __counter)
|
||||
{
|
||||
return __builtin_ia32_tpause (__control,
|
||||
(unsigned int)(__counter >> 32), (unsigned int)__counter);
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif /* __WAITPKGINTRIN_H */
|
||||
@@ -1,38 +0,0 @@
|
||||
/*===-------------- wbnoinvdintrin.h - wbnoinvd intrinsic-------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H
|
||||
#error "Never use <wbnoinvdintrin.h> directly; include <x86intrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __WBNOINVDINTRIN_H
|
||||
#define __WBNOINVDINTRIN_H
|
||||
|
||||
static __inline__ void
|
||||
__attribute__((__always_inline__, __nodebug__, __target__("wbnoinvd")))
|
||||
_wbnoinvd (void)
|
||||
{
|
||||
__builtin_ia32_wbnoinvd ();
|
||||
}
|
||||
|
||||
#endif /* __WBNOINVDINTRIN_H */
|
||||
@@ -1,33 +0,0 @@
|
||||
/*===---- wmmintrin.h - AES intrinsics ------------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __WMMINTRIN_H
|
||||
#define __WMMINTRIN_H
|
||||
|
||||
#include <emmintrin.h>
|
||||
|
||||
#include <__wmmintrin_aes.h>
|
||||
|
||||
#include <__wmmintrin_pclmul.h>
|
||||
|
||||
#endif /* __WMMINTRIN_H */
|
||||
@@ -1,68 +0,0 @@
|
||||
/*===---- x86intrin.h - X86 intrinsics -------------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __X86INTRIN_H
|
||||
#define __X86INTRIN_H
|
||||
|
||||
#include <ia32intrin.h>
|
||||
|
||||
#include <immintrin.h>
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__3dNOW__)
|
||||
#include <mm3dnow.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__PRFCHW__)
|
||||
#include <prfchwintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SSE4A__)
|
||||
#include <ammintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__FMA4__)
|
||||
#include <fma4intrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__XOP__)
|
||||
#include <xopintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__TBM__)
|
||||
#include <tbmintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__LWP__)
|
||||
#include <lwpintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__MWAITX__)
|
||||
#include <mwaitxintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__CLZERO__)
|
||||
#include <clzerointrin.h>
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* __X86INTRIN_H */
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,48 +0,0 @@
|
||||
/*===---- xsavecintrin.h - XSAVEC intrinsic --------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <xsavecintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __XSAVECINTRIN_H
|
||||
#define __XSAVECINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("xsavec")))
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_xsavec(void *__p, unsigned long long __m) {
|
||||
__builtin_ia32_xsavec(__p, __m);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_xsavec64(void *__p, unsigned long long __m) {
|
||||
__builtin_ia32_xsavec64(__p, __m);
|
||||
}
|
||||
#endif
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif
|
||||
@@ -1,58 +0,0 @@
|
||||
/*===---- xsaveintrin.h - XSAVE intrinsic ----------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <xsaveintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __XSAVEINTRIN_H
|
||||
#define __XSAVEINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("xsave")))
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_xsave(void *__p, unsigned long long __m) {
|
||||
__builtin_ia32_xsave(__p, __m);
|
||||
}
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_xrstor(void *__p, unsigned long long __m) {
|
||||
__builtin_ia32_xrstor(__p, __m);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_xsave64(void *__p, unsigned long long __m) {
|
||||
__builtin_ia32_xsave64(__p, __m);
|
||||
}
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_xrstor64(void *__p, unsigned long long __m) {
|
||||
__builtin_ia32_xrstor64(__p, __m);
|
||||
}
|
||||
#endif
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif
|
||||
@@ -1,48 +0,0 @@
|
||||
/*===---- xsaveoptintrin.h - XSAVEOPT intrinsic ----------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <xsaveoptintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __XSAVEOPTINTRIN_H
|
||||
#define __XSAVEOPTINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("xsaveopt")))
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_xsaveopt(void *__p, unsigned long long __m) {
|
||||
__builtin_ia32_xsaveopt(__p, __m);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_xsaveopt64(void *__p, unsigned long long __m) {
|
||||
__builtin_ia32_xsaveopt64(__p, __m);
|
||||
}
|
||||
#endif
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif
|
||||
@@ -1,58 +0,0 @@
|
||||
/*===---- xsavesintrin.h - XSAVES intrinsic --------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <xsavesintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __XSAVESINTRIN_H
|
||||
#define __XSAVESINTRIN_H
|
||||
|
||||
/* Define the default attributes for the functions in this file. */
|
||||
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("xsaves")))
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_xsaves(void *__p, unsigned long long __m) {
|
||||
__builtin_ia32_xsaves(__p, __m);
|
||||
}
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_xrstors(void *__p, unsigned long long __m) {
|
||||
__builtin_ia32_xrstors(__p, __m);
|
||||
}
|
||||
|
||||
#ifdef __x86_64__
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_xrstors64(void *__p, unsigned long long __m) {
|
||||
__builtin_ia32_xrstors64(__p, __m);
|
||||
}
|
||||
|
||||
static __inline__ void __DEFAULT_FN_ATTRS
|
||||
_xsaves64(void *__p, unsigned long long __m) {
|
||||
__builtin_ia32_xsaves64(__p, __m);
|
||||
}
|
||||
#endif
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif
|
||||
@@ -1,41 +0,0 @@
|
||||
/*===---- xtestintrin.h - XTEST intrinsic ----------------------------------===
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*===-----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef __IMMINTRIN_H
|
||||
#error "Never use <xtestintrin.h> directly; include <immintrin.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef __XTESTINTRIN_H
|
||||
#define __XTESTINTRIN_H
|
||||
|
||||
/* xtest returns non-zero if the instruction is executed within an RTM or active
|
||||
* HLE region. */
|
||||
/* FIXME: This can be an either or for RTM/HLE. Deal with this when HLE is
|
||||
* supported. */
|
||||
static __inline__ int
|
||||
__attribute__((__always_inline__, __nodebug__, __target__("rtm")))
|
||||
_xtest(void) {
|
||||
return __builtin_ia32_xtest();
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -5,14 +5,14 @@ set -e
|
||||
|
||||
BUILDDIR="$(pwd)"
|
||||
|
||||
sudo sh -c 'echo "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main" >> /etc/apt/sources.list'
|
||||
sudo sh -c 'echo "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main" >> /etc/apt/sources.list'
|
||||
wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
|
||||
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
||||
sudo apt-get update -q
|
||||
|
||||
sudo apt-get remove -y llvm-*
|
||||
sudo rm -rf /usr/local/*
|
||||
sudo apt-get install -y libxml2-dev libclang-8-dev llvm-8 llvm-8-dev cmake s3cmd gcc-7 g++-7
|
||||
sudo apt-get install -y libxml2-dev libclang-9-dev llvm-9 llvm-9-dev cmake s3cmd gcc-7 g++-7 qemu
|
||||
|
||||
export CC=gcc-7
|
||||
export CXX=g++-7
|
||||
@@ -20,15 +20,15 @@ mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release
|
||||
make -j2 install
|
||||
./zig build --build-file ../build.zig test
|
||||
./zig build test -Denable-qemu
|
||||
|
||||
if [ "${BUILD_REASON}" != "PullRequest" ]; then
|
||||
ARTIFACTSDIR="$BUILDDIR/artifacts"
|
||||
mkdir "$ARTIFACTSDIR"
|
||||
docker run -i --mount type=bind,source="$ARTIFACTSDIR",target=/z ziglang/static-base:llvm8-1 -j2 $BUILD_SOURCEVERSION
|
||||
docker run -i --mount type=bind,source="$ARTIFACTSDIR",target=/z ziglang/static-base:llvm9-1 -j2 $BUILD_SOURCEVERSION
|
||||
TARBALL="$(ls $ARTIFACTSDIR)"
|
||||
mv "$DOWNLOADSECUREFILE_SECUREFILEPATH" "$HOME/.s3cfg"
|
||||
s3cmd put -P "$ARTIFACTSDIR/$TARBALL" s3://ziglang.org/builds/
|
||||
s3cmd put -P --add-header="cache-control: public, max-age=31536000, immutable" "$ARTIFACTSDIR/$TARBALL" s3://ziglang.org/builds/
|
||||
|
||||
SHASUM=$(sha256sum $ARTIFACTSDIR/$TARBALL | cut '-d ' -f1)
|
||||
BYTESIZE=$(wc -c < $ARTIFACTSDIR/$TARBALL)
|
||||
|
||||
@@ -3,10 +3,12 @@
|
||||
set -x
|
||||
set -e
|
||||
|
||||
system_profiler SPHardwareDataType
|
||||
|
||||
brew install s3cmd gcc@8
|
||||
|
||||
ZIGDIR="$(pwd)"
|
||||
CACHE_BASENAME="llvm+clang-8.0.0-macos-x86_64-gcc8-release-static"
|
||||
CACHE_BASENAME="llvm+clang-9.0.0-macos-x86_64-gcc8-release"
|
||||
PREFIX="$HOME/$CACHE_BASENAME"
|
||||
TMPDIR="$HOME/tmpz"
|
||||
JOBS="-j2"
|
||||
@@ -42,18 +44,18 @@ else
|
||||
rm $PREFIX/lib/libz*dylib
|
||||
|
||||
cd $TMPDIR
|
||||
wget https://releases.llvm.org/8.0.0/llvm-8.0.0.src.tar.xz
|
||||
tar xf llvm-8.0.0.src.tar.xz
|
||||
cd llvm-8.0.0.src/
|
||||
wget https://releases.llvm.org/9.0.0/llvm-9.0.0.src.tar.xz
|
||||
tar xf llvm-9.0.0.src.tar.xz
|
||||
cd llvm-9.0.0.src/
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_BUILD_TYPE=Release -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="AVR;RISCV" -DLLVM_ENABLE_LIBXML2=OFF -DLLVM_ENABLE_TERMINFO=OFF
|
||||
cmake .. -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_BUILD_TYPE=Release -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="AVR" -DLLVM_ENABLE_LIBXML2=OFF -DLLVM_ENABLE_TERMINFO=OFF
|
||||
make $JOBS install
|
||||
|
||||
cd $TMPDIR
|
||||
wget https://releases.llvm.org/8.0.0/cfe-8.0.0.src.tar.xz
|
||||
tar xf cfe-8.0.0.src.tar.xz
|
||||
cd cfe-8.0.0.src/
|
||||
wget https://releases.llvm.org/9.0.0/cfe-9.0.0.src.tar.xz
|
||||
tar xf cfe-9.0.0.src.tar.xz
|
||||
cd cfe-9.0.0.src/
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_BUILD_TYPE=Release
|
||||
@@ -62,7 +64,7 @@ else
|
||||
cd $HOME
|
||||
tar cfJ "$CACHE_BASENAME.tar.xz" "$CACHE_BASENAME"
|
||||
cp "$DOWNLOADSECUREFILE_SECUREFILEPATH" "$HOME/.s3cfg"
|
||||
s3cmd put -P "$CACHE_BASENAME.tar.xz" "s3://ziglang.org/builds/$CACHE_BASENAME.tar.xz"
|
||||
s3cmd put -P --add-header="cache-control: public, max-age=31536000, immutable" "$CACHE_BASENAME.tar.xz" "s3://ziglang.org/builds/$CACHE_BASENAME.tar.xz"
|
||||
fi
|
||||
|
||||
cd $ZIGDIR
|
||||
@@ -70,7 +72,7 @@ mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_INSTALL_PREFIX=$(pwd)/release -DZIG_STATIC=ON
|
||||
make $JOBS install
|
||||
release/bin/zig build --build-file ../build.zig test
|
||||
release/bin/zig build test
|
||||
|
||||
if [ "${BUILD_REASON}" != "PullRequest" ]; then
|
||||
mv ../LICENSE release/
|
||||
@@ -85,7 +87,7 @@ if [ "${BUILD_REASON}" != "PullRequest" ]; then
|
||||
tar cfJ "$TARBALL" "$DIRNAME"
|
||||
|
||||
mv "$DOWNLOADSECUREFILE_SECUREFILEPATH" "$HOME/.s3cfg"
|
||||
s3cmd put -P "$TARBALL" s3://ziglang.org/builds/
|
||||
s3cmd put -P --add-header="cache-control: public, max-age=31536000, immutable" "$TARBALL" s3://ziglang.org/builds/
|
||||
|
||||
SHASUM=$(shasum -a 256 $TARBALL | cut '-d ' -f1)
|
||||
BYTESIZE=$(wc -c < $TARBALL)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
jobs:
|
||||
- job: BuildMacOS
|
||||
pool:
|
||||
vmImage: 'macOS 10.13'
|
||||
vmImage: 'macOS 10.14'
|
||||
|
||||
timeoutInMinutes: 360
|
||||
|
||||
@@ -27,7 +27,7 @@ jobs:
|
||||
displayName: 'Build and test'
|
||||
- job: BuildWindows
|
||||
pool:
|
||||
vmImage: 'vs2017-win2016'
|
||||
vmImage: 'windows-2019'
|
||||
|
||||
timeoutInMinutes: 360
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ env
|
||||
"../$ZIG" run update-download-page.zig
|
||||
|
||||
mv "$DOWNLOADSECUREFILE_SECUREFILEPATH" "$HOME/.s3cfg"
|
||||
s3cmd put -P "../$SRC_TARBALL" s3://ziglang.org/builds/
|
||||
s3cmd put -P --add-header="cache-control: public, max-age=31536000, immutable" "../$SRC_TARBALL" s3://ziglang.org/builds/
|
||||
s3cmd put -P "../$LANGREF" s3://ziglang.org/documentation/master/index.html --add-header="Cache-Control: max-age=0, must-revalidate"
|
||||
s3cmd put -P www/download/index.html s3://ziglang.org/download/index.html --add-header="Cache-Control: max-age=0, must-revalidate"
|
||||
s3cmd put -P www/download/index.json s3://ziglang.org/download/index.json --add-header="Cache-Control: max-age=0, must-revalidate"
|
||||
|
||||
@@ -6,5 +6,5 @@ set -e
|
||||
pacman -Su --needed --noconfirm
|
||||
pacman -S --needed --noconfirm wget p7zip python3-pip
|
||||
pip install s3cmd
|
||||
wget -nv "https://ziglang.org/deps/llvm%2bclang-8.0.0-win64-msvc-release.tar.xz"
|
||||
tar xf llvm+clang-8.0.0-win64-msvc-release.tar.xz
|
||||
wget -nv "https://ziglang.org/deps/llvm%2bclang-9.0.0-win64-msvc-release.tar.xz"
|
||||
tar xf llvm+clang-9.0.0-win64-msvc-release.tar.xz
|
||||
|
||||
@@ -10,17 +10,18 @@ SET "PATH=%PREVPATH%"
|
||||
SET "MSYSTEM=%PREVMSYSTEM%"
|
||||
|
||||
SET "ZIGBUILDDIR=%SRCROOT%\build"
|
||||
SET "ZIGINSTALLDIR=%ZIGBUILDDIR%\release"
|
||||
SET "ZIGPREFIXPATH=%SRCROOT%\llvm+clang-8.0.0-win64-msvc-release"
|
||||
SET "ZIGINSTALLDIR=%ZIGBUILDDIR%\dist"
|
||||
SET "ZIGPREFIXPATH=%SRCROOT%\llvm+clang-9.0.0-win64-msvc-release"
|
||||
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
|
||||
|
||||
mkdir %ZIGBUILDDIR%
|
||||
cd %ZIGBUILDDIR%
|
||||
cmake.exe .. -Thost=x64 -G"Visual Studio 15 2017 Win64" "-DCMAKE_INSTALL_PREFIX=%ZIGINSTALLDIR%" "-DCMAKE_PREFIX_PATH=%ZIGPREFIXPATH%" -DCMAKE_BUILD_TYPE=Release || exit /b
|
||||
msbuild /p:Configuration=Release INSTALL.vcxproj || exit /b
|
||||
REM Here we use MinSizeRel instead of Release to work around https://github.com/ziglang/zig/issues/3024
|
||||
cmake.exe .. -Thost=x64 -G"Visual Studio 16 2019" -A x64 "-DCMAKE_INSTALL_PREFIX=%ZIGINSTALLDIR%" "-DCMAKE_PREFIX_PATH=%ZIGPREFIXPATH%" -DCMAKE_BUILD_TYPE=MinSizeRel || exit /b
|
||||
msbuild /p:Configuration=MinSizeRel INSTALL.vcxproj || exit /b
|
||||
|
||||
"%ZIGINSTALLDIR%\bin\zig.exe" build --build-file ..\build.zig test || exit /b
|
||||
"%ZIGINSTALLDIR%\bin\zig.exe" build test || exit /b
|
||||
|
||||
set "PATH=%CD:~0,2%\msys64\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem"
|
||||
SET "MSYSTEM=MINGW64"
|
||||
|
||||
@@ -6,20 +6,19 @@ set -e
|
||||
if [ "${BUILD_REASON}" != "PullRequest" ]; then
|
||||
cd "$ZIGBUILDDIR"
|
||||
|
||||
rm release/*.lib
|
||||
mv ../LICENSE release/
|
||||
mv ../zig-cache/langref.html release/
|
||||
mv release/bin/zig.exe release/
|
||||
rmdir release/bin
|
||||
mv ../LICENSE dist/
|
||||
mv ../zig-cache/langref.html dist/
|
||||
mv dist/bin/zig.exe dist/
|
||||
rmdir dist/bin
|
||||
|
||||
VERSION=$(release/zig.exe version)
|
||||
VERSION=$(dist/zig.exe version)
|
||||
DIRNAME="zig-windows-x86_64-$VERSION"
|
||||
TARBALL="$DIRNAME.zip"
|
||||
mv release "$DIRNAME"
|
||||
mv dist "$DIRNAME"
|
||||
7z a "$TARBALL" "$DIRNAME"
|
||||
|
||||
mv "$DOWNLOADSECUREFILE_SECUREFILEPATH" "$HOME/.s3cfg"
|
||||
s3cmd put -P "$TARBALL" s3://ziglang.org/builds/
|
||||
s3cmd put -P --add-header="cache-control: public, max-age=31536000, immutable" "$TARBALL" s3://ziglang.org/builds/
|
||||
|
||||
SHASUM=$(sha256sum $TARBALL | cut '-d ' -f1)
|
||||
BYTESIZE=$(wc -c < $TARBALL)
|
||||
|
||||
@@ -4,7 +4,7 @@ set -x
|
||||
set -e
|
||||
|
||||
ZIGDIR="$(pwd)"
|
||||
CACHE_BASENAME="llvm+clang-8.0.0-freebsd-x86_64-release"
|
||||
CACHE_BASENAME="llvm+clang-9.0.0-freebsd-x86_64-release"
|
||||
PREFIX="$HOME/$CACHE_BASENAME"
|
||||
JOBS="-j$(sysctl -n hw.ncpu)"
|
||||
|
||||
@@ -18,13 +18,45 @@ cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_INSTALL_PREFIX=$(pwd)/release -DZIG_STATIC=ON
|
||||
make $JOBS install
|
||||
|
||||
# TODO test everything. right now it's skipping stuff including docs
|
||||
# because for some reason @cImport is failing on the CI server.
|
||||
release/bin/zig build --build-file ../build.zig test-behavior -Dskip-release
|
||||
release/bin/zig build test-fmt
|
||||
release/bin/zig build test-behavior
|
||||
|
||||
# This test is disabled because it triggers "out of memory" on the sr.ht CI service.
|
||||
# See https://github.com/ziglang/zig/issues/3210
|
||||
# release/bin/zig build test-std
|
||||
|
||||
release/bin/zig build test-compiler-rt
|
||||
|
||||
# This test is disabled because it triggers "out of memory" on the sr.ht CI service.
|
||||
# See https://github.com/ziglang/zig/issues/3210
|
||||
# release/bin/zig build test-compare-output
|
||||
|
||||
# This test is disabled because it triggers "out of memory" on the sr.ht CI service.
|
||||
# See https://github.com/ziglang/zig/issues/3210
|
||||
# release/bin/zig build test-standalone
|
||||
|
||||
release/bin/zig build test-stack-traces
|
||||
release/bin/zig build test-cli
|
||||
release/bin/zig build test-asm-link
|
||||
release/bin/zig build test-runtime-safety
|
||||
|
||||
# This test is disabled because it triggers "out of memory" on the sr.ht CI service.
|
||||
# See https://github.com/ziglang/zig/issues/3210
|
||||
# release/bin/zig build test-translate-c
|
||||
|
||||
release/bin/zig build test-gen-h
|
||||
|
||||
# This test is disabled because it triggers "out of memory" on the sr.ht CI service.
|
||||
# See https://github.com/ziglang/zig/issues/3210
|
||||
# release/bin/zig build test-compile-errors
|
||||
|
||||
# This test is disabled because it triggers "out of memory" on the sr.ht CI service.
|
||||
# See https://github.com/ziglang/zig/issues/3210
|
||||
# release/bin/zig build docs
|
||||
|
||||
if [ -f ~/.s3cfg ]; then
|
||||
mv ../LICENSE release/
|
||||
# TODO re-enable this
|
||||
# Enable when `release/bin/zig build docs` passes without "out of memory" or failures
|
||||
#mv ../zig-cache/langref.html release/
|
||||
mv release/bin/zig release/
|
||||
rmdir release/bin
|
||||
@@ -36,7 +68,7 @@ if [ -f ~/.s3cfg ]; then
|
||||
mv release "$DIRNAME"
|
||||
tar cfJ "$TARBALL" "$DIRNAME"
|
||||
|
||||
s3cmd put -P "$TARBALL" s3://ziglang.org/builds/
|
||||
s3cmd put -P --add-header="cache-control: public, max-age=31536000, immutable" "$TARBALL" s3://ziglang.org/builds/
|
||||
|
||||
SHASUM=$(shasum -a 256 $TARBALL | cut '-d ' -f1)
|
||||
BYTESIZE=$(wc -c < $TARBALL)
|
||||
|
||||
@@ -38,21 +38,21 @@ if(MSVC)
|
||||
else()
|
||||
find_path(CLANG_INCLUDE_DIRS NAMES clang/Frontend/ASTUnit.h
|
||||
PATHS
|
||||
/usr/lib/llvm/8/include
|
||||
/usr/lib/llvm-8/include
|
||||
/usr/lib/llvm-8.0/include
|
||||
/usr/local/llvm80/include
|
||||
/usr/lib/llvm/9/include
|
||||
/usr/lib/llvm-9/include
|
||||
/usr/lib/llvm-9.0/include
|
||||
/usr/local/llvm90/include
|
||||
/mingw64/include)
|
||||
|
||||
macro(FIND_AND_ADD_CLANG_LIB _libname_)
|
||||
macro(FIND_AND_ADD_CLANG_LIB _libname_)
|
||||
string(TOUPPER ${_libname_} _prettylibname_)
|
||||
find_library(CLANG_${_prettylibname_}_LIB NAMES ${_libname_}
|
||||
PATHS
|
||||
${CLANG_LIBDIRS}
|
||||
/usr/lib/llvm/8/lib
|
||||
/usr/lib/llvm-8/lib
|
||||
/usr/lib/llvm-8.0/lib
|
||||
/usr/local/llvm80/lib
|
||||
/usr/lib/llvm/9/lib
|
||||
/usr/lib/llvm-9/lib
|
||||
/usr/lib/llvm-9.0/lib
|
||||
/usr/local/llvm90/lib
|
||||
/mingw64/lib
|
||||
/c/msys64/mingw64/lib
|
||||
c:\\msys64\\mingw64\\lib)
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
|
||||
find_path(LLD_INCLUDE_DIRS NAMES lld/Common/Driver.h
|
||||
PATHS
|
||||
/usr/lib/llvm-8.0/include
|
||||
/usr/local/llvm80/include
|
||||
/usr/lib/llvm-9.0/include
|
||||
/usr/local/llvm90/include
|
||||
/mingw64/include)
|
||||
|
||||
find_library(LLD_LIBRARY NAMES lld-8.0 lld80 lld
|
||||
find_library(LLD_LIBRARY NAMES lld-9.0 lld90 lld
|
||||
PATHS
|
||||
/usr/lib/llvm-8.0/lib
|
||||
/usr/local/llvm80/lib
|
||||
/usr/lib/llvm-9.0/lib
|
||||
/usr/local/llvm90/lib
|
||||
)
|
||||
if(EXISTS ${LLD_LIBRARY})
|
||||
set(LLD_LIBRARIES ${LLD_LIBRARY})
|
||||
@@ -24,8 +24,8 @@ else()
|
||||
string(TOUPPER ${_libname_} _prettylibname_)
|
||||
find_library(LLD_${_prettylibname_}_LIB NAMES ${_libname_}
|
||||
PATHS
|
||||
/usr/lib/llvm-8.0/lib
|
||||
/usr/local/llvm80/lib
|
||||
/usr/lib/llvm-9.0/lib
|
||||
/usr/local/llvm90/lib
|
||||
/mingw64/lib
|
||||
/c/msys64/mingw64/lib
|
||||
c:/msys64/mingw64/lib)
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
# LLVM_LIBDIRS
|
||||
|
||||
find_program(LLVM_CONFIG_EXE
|
||||
NAMES llvm-config-8 llvm-config-8.0 llvm-config80 llvm-config
|
||||
NAMES llvm-config-9 llvm-config-9.0 llvm-config90 llvm-config
|
||||
PATHS
|
||||
"/mingw64/bin"
|
||||
"/c/msys64/mingw64/bin"
|
||||
"c:/msys64/mingw64/bin"
|
||||
"C:/Libraries/llvm-8.0.0/bin")
|
||||
"C:/Libraries/llvm-9.0.0/bin")
|
||||
|
||||
if ("${LLVM_CONFIG_EXE}" STREQUAL "LLVM_CONFIG_EXE-NOTFOUND")
|
||||
message(FATAL_ERROR "unable to find llvm-config")
|
||||
@@ -28,14 +28,14 @@ execute_process(
|
||||
OUTPUT_VARIABLE LLVM_CONFIG_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if("${LLVM_CONFIG_VERSION}" VERSION_LESS 8)
|
||||
message(FATAL_ERROR "expected LLVM 8.x but found ${LLVM_CONFIG_VERSION}")
|
||||
if("${LLVM_CONFIG_VERSION}" VERSION_LESS 9)
|
||||
message(FATAL_ERROR "expected LLVM 9.x but found ${LLVM_CONFIG_VERSION}")
|
||||
endif()
|
||||
if("${LLVM_CONFIG_VERSION}" VERSION_EQUAL 9)
|
||||
message(FATAL_ERROR "expected LLVM 8.x but found ${LLVM_CONFIG_VERSION}")
|
||||
if("${LLVM_CONFIG_VERSION}" VERSION_EQUAL 10)
|
||||
message(FATAL_ERROR "expected LLVM 9.x but found ${LLVM_CONFIG_VERSION}")
|
||||
endif()
|
||||
if("${LLVM_CONFIG_VERSION}" VERSION_GREATER 9)
|
||||
message(FATAL_ERROR "expected LLVM 8.x but found ${LLVM_CONFIG_VERSION}")
|
||||
if("${LLVM_CONFIG_VERSION}" VERSION_GREATER 10)
|
||||
message(FATAL_ERROR "expected LLVM 9.x but found ${LLVM_CONFIG_VERSION}")
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
@@ -59,13 +59,14 @@ NEED_TARGET("Mips")
|
||||
NEED_TARGET("MSP430")
|
||||
NEED_TARGET("NVPTX")
|
||||
NEED_TARGET("PowerPC")
|
||||
NEED_TARGET("RISCV")
|
||||
NEED_TARGET("Sparc")
|
||||
NEED_TARGET("SystemZ")
|
||||
NEED_TARGET("WebAssembly")
|
||||
NEED_TARGET("X86")
|
||||
NEED_TARGET("XCore")
|
||||
|
||||
if(NOT(CMAKE_BUILD_TYPE STREQUAL "Debug") OR ZIG_STATIC)
|
||||
if(ZIG_STATIC_LLVM)
|
||||
execute_process(
|
||||
COMMAND ${LLVM_CONFIG_EXE} --libfiles --link-static
|
||||
OUTPUT_VARIABLE LLVM_LIBRARIES_SPACES
|
||||
@@ -112,7 +113,7 @@ execute_process(
|
||||
set(LLVM_LIBRARIES ${LLVM_LIBRARIES} ${LLVM_SYSTEM_LIBS})
|
||||
|
||||
if(NOT LLVM_LIBRARIES)
|
||||
find_library(LLVM_LIBRARIES NAMES LLVM LLVM-8 LLVM-8.0)
|
||||
find_library(LLVM_LIBRARIES NAMES LLVM LLVM-9 LLVM-9.0)
|
||||
endif()
|
||||
|
||||
link_directories("${CMAKE_PREFIX_PATH}/lib")
|
||||
|
||||
51
deps/lld-prebuilt/COFF/Options.inc
vendored
51
deps/lld-prebuilt/COFF/Options.inc
vendored
@@ -13,9 +13,8 @@
|
||||
#define COMMA ,
|
||||
PREFIX(prefix_0, {nullptr})
|
||||
PREFIX(prefix_2, {"--" COMMA nullptr})
|
||||
PREFIX(prefix_3, {"/" COMMA "-" COMMA nullptr})
|
||||
PREFIX(prefix_1, {"/" COMMA "-" COMMA "-?" COMMA nullptr})
|
||||
PREFIX(prefix_4, {"/?" COMMA "-?" COMMA nullptr})
|
||||
PREFIX(prefix_1, {"/" COMMA "-" COMMA "/?" COMMA "-?" COMMA nullptr})
|
||||
PREFIX(prefix_3, {"/??" COMMA "-??" COMMA "/?" COMMA "-?" COMMA nullptr})
|
||||
#undef COMMA
|
||||
#endif // PREFIX
|
||||
|
||||
@@ -61,13 +60,17 @@ OPTION(prefix_1, "debugtype:", debugtype, Joined, INVALID, INVALID, nullptr, 0,
|
||||
"Debug Info Options", nullptr, nullptr)
|
||||
OPTION(prefix_1, "debug", debug, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Embed a symbol table in the image", nullptr, nullptr)
|
||||
OPTION(prefix_3, "def:", deffile, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
OPTION(prefix_1, "def:", deffile, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Use module-definition file", nullptr, nullptr)
|
||||
OPTION(prefix_1, "defaultlib:", defaultlib, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Add the library to the list of input files", nullptr, nullptr)
|
||||
OPTION(prefix_1, "delay:", delay, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "delayload:", delayload, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Delay loaded DLL name", nullptr, nullptr)
|
||||
OPTION(prefix_1, "demangle:no", demangle_no, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Do not demangle symbols in output", nullptr, nullptr)
|
||||
OPTION(prefix_1, "demangle", demangle, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Demangle symbols in output (default)", nullptr, nullptr)
|
||||
OPTION(prefix_1, "disallowlib:", disallowlib, Joined, INVALID, nodefaultlib, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "dll", dll, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Create a DLL", nullptr, nullptr)
|
||||
@@ -83,22 +86,29 @@ OPTION(prefix_1, "entry:", entry, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
OPTION(prefix_1, "errorlimit:", errorlimit, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Maximum number of errors to emit before stopping (0 = no limit)", nullptr, nullptr)
|
||||
OPTION(prefix_1, "errorreport:", errorreport, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "exclude-all-symbols", exclude_all_symbols, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "export-all-symbols", export_all_symbols, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "export:", export, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Export a function", nullptr, nullptr)
|
||||
OPTION(prefix_1, "failifmismatch:", failifmismatch, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"", nullptr, nullptr)
|
||||
OPTION(prefix_1, "fastfail", fastfail, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "filealign:", filealign, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Section alignment in the output file", nullptr, nullptr)
|
||||
OPTION(prefix_1, "fixed:no", fixed_no, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Enable base relocations (default)", nullptr, nullptr)
|
||||
OPTION(prefix_1, "fixed", fixed, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Disable base relocations", nullptr, nullptr)
|
||||
OPTION(prefix_1, "force:multipleres", force_multipleres, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Allow multiply defined resources when creating executables", nullptr, nullptr)
|
||||
OPTION(prefix_1, "force:multiple", force_multiple, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Allow multiply defined symbols when creating executables", nullptr, nullptr)
|
||||
OPTION(prefix_1, "force:unresolved", force_unresolved, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Allow undefined symbols when creating executables", nullptr, nullptr)
|
||||
OPTION(prefix_1, "force", force, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Allow undefined and multiply defined symbols when creating executables", nullptr, nullptr)
|
||||
OPTION(prefix_1, "functionpadmin:", functionpadmin_opt, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Prepares an image for hotpatching", nullptr, nullptr)
|
||||
OPTION(prefix_1, "functionpadmin", functionpadmin, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "guard:", guard, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Control flow guard", nullptr, nullptr)
|
||||
@@ -116,8 +126,10 @@ OPTION(prefix_1, "ignore:", ignore, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
OPTION(prefix_1, "ignoreidl", ignoreidl, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "implib:", implib, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Import library name", nullptr, nullptr)
|
||||
OPTION(prefix_3, "include:", incl, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
OPTION(prefix_1, "include:", incl, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Force symbol to be added to symbol table as undefined one", nullptr, nullptr)
|
||||
OPTION(prefix_1, "includeoptional:", include_optional, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Add symbol as undefined, but allow it to remain undefined", nullptr, nullptr)
|
||||
OPTION(prefix_1, "incremental:no", incremental_no, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Overwrite import library even if contents are unchanged", nullptr, nullptr)
|
||||
OPTION(prefix_1, "incremental", incremental, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
@@ -141,7 +153,7 @@ OPTION(prefix_1, "lldltocache:", lldltocache, Joined, INVALID, INVALID, nullptr,
|
||||
"Path to ThinLTO cached object file directory", nullptr, nullptr)
|
||||
OPTION(prefix_1, "lldltocachepolicy:", lldltocachepolicy, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Pruning policy for the ThinLTO cache", nullptr, nullptr)
|
||||
OPTION(prefix_3, "lldmap:", lldmap_file, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "lldmap:", lldmap_file, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "lldmap", lldmap, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "lldmingw", lldmingw, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "lldsavetemps", lldsavetemps, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
@@ -186,7 +198,7 @@ OPTION(prefix_1, "order:", order, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Put functions in order", nullptr, nullptr)
|
||||
OPTION(prefix_1, "out:", out, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Path to file to write output", nullptr, nullptr)
|
||||
OPTION(prefix_3, "output-def:", output_def, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "output-def:", output_def, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "pdb:", pdb, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"PDB file path", nullptr, nullptr)
|
||||
OPTION(prefix_1, "pdbaltpath:", pdbaltpath, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
@@ -208,8 +220,27 @@ OPTION(prefix_1, "stub:", stub, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Specify DOS stub file", nullptr, nullptr)
|
||||
OPTION(prefix_1, "subsystem:", subsystem, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Specify subsystem", nullptr, nullptr)
|
||||
OPTION(prefix_1, "swaprun:cd", swaprun_cd, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "swaprun:net", swaprun_net, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "summary", summary, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "swaprun:cd", swaprun_cd, Flag, INVALID, swaprun, "cd\0", 0, 0,
|
||||
"Make loader run output binary from swap instead of from CD", nullptr, nullptr)
|
||||
OPTION(prefix_1, "swaprun:net", swaprun_net, Flag, INVALID, swaprun, "net\0", 0, 0,
|
||||
"Make loader run output binary from swap instead of from network", nullptr, nullptr)
|
||||
OPTION(prefix_1, "swaprun:", swaprun, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Comma-separated list of 'cd' or 'net'", nullptr, nullptr)
|
||||
OPTION(prefix_1, "thinlto-emit-imports-files", thinlto_emit_imports_files, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Emit .imports files with -thinlto-index-only", nullptr, nullptr)
|
||||
OPTION(prefix_1, "thinlto-index-only:", thinlto_index_only_arg, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"-thinlto-index-only and also write native module names to file", nullptr, nullptr)
|
||||
OPTION(prefix_1, "thinlto-index-only", thinlto_index_only, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Instead of linking, emit ThinLTO index files", nullptr, nullptr)
|
||||
OPTION(prefix_1, "thinlto-object-suffix-replace:", thinlto_object_suffix_replace, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"'old;new' replace old suffix with new suffix in ThinLTO index", nullptr, nullptr)
|
||||
OPTION(prefix_1, "thinlto-prefix-replace:", thinlto_prefix_replace, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"'old;new' replace old prefix with new prefix in ThinLTO outputs", nullptr, nullptr)
|
||||
OPTION(prefix_1, "threads:no", threads_no, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Do not run the linker multi-threaded", nullptr, nullptr)
|
||||
OPTION(prefix_1, "threads", threads, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Run the linker multi-threaded (default)", nullptr, nullptr)
|
||||
OPTION(prefix_1, "throwingnew", throwingnew, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "timestamp:", timestamp, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Specify the PE header timestamp", nullptr, nullptr)
|
||||
@@ -233,7 +264,7 @@ OPTION(prefix_1, "WX:no", WX_no, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Don't treat warnings as errors", nullptr, nullptr)
|
||||
OPTION(prefix_1, "WX", WX, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Treat warnings as errors", nullptr, nullptr)
|
||||
OPTION(prefix_4, "", help_q, Flag, INVALID, help, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_3, "", help_q, Flag, INVALID, help, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
#endif // OPTION
|
||||
|
||||
#ifdef OPTTABLE_ARG_INIT
|
||||
|
||||
142
deps/lld-prebuilt/ELF/Options.inc
vendored
142
deps/lld-prebuilt/ELF/Options.inc
vendored
@@ -29,13 +29,14 @@ PREFIX(prefix_2, {"--" COMMA "-" COMMA nullptr})
|
||||
|
||||
OPTION(prefix_0, "<input>", INPUT, Input, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_0, "<unknown>", UNKNOWN, Unknown, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "(", anonymous_30, Flag, INVALID, start_group, nullptr, 0, 0,
|
||||
OPTION(prefix_1, "(", anonymous_31, Flag, INVALID, start_group, nullptr, 0, 0,
|
||||
"Alias for --start-group", nullptr, nullptr)
|
||||
OPTION(prefix_1, ")", anonymous_12, Flag, INVALID, end_group, nullptr, 0, 0,
|
||||
"Alias for --end-group", nullptr, nullptr)
|
||||
OPTION(prefix_2, "allow-multiple-definition", allow_multiple_definition, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Allow multiple definitions", nullptr, nullptr)
|
||||
OPTION(prefix_2, "allow-shlib-undefined", anonymous_47, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "allow-shlib-undefined", allow_shlib_undefined, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Allow unresolved references in shared libraries (default when linking a shared library)", nullptr, nullptr)
|
||||
OPTION(prefix_2, "apply-dynamic-relocs", apply_dynamic_relocs, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Apply link-time values for dynamic relocations", nullptr, nullptr)
|
||||
OPTION(prefix_2, "as-needed", as_needed, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
@@ -45,7 +46,7 @@ OPTION(prefix_2, "auxiliary=", auxiliary_eq, Joined, INVALID, auxiliary, nullptr
|
||||
OPTION(prefix_2, "auxiliary", auxiliary, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "Bdynamic", Bdynamic, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Link against shared libraries (default)", nullptr, nullptr)
|
||||
OPTION(prefix_2, "Bshareable", anonymous_28, Flag, INVALID, shared, nullptr, 0, 0,
|
||||
OPTION(prefix_2, "Bshareable", anonymous_29, Flag, INVALID, shared, nullptr, 0, 0,
|
||||
"Alias for --shared", nullptr, nullptr)
|
||||
OPTION(prefix_2, "Bstatic", Bstatic, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Do not link against shared libraries", nullptr, nullptr)
|
||||
@@ -87,7 +88,9 @@ OPTION(prefix_2, "defsym=", defsym_eq, Joined, INVALID, defsym, nullptr, 0, 0,
|
||||
OPTION(prefix_2, "defsym", defsym, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, "<symbol>=<value>", nullptr)
|
||||
OPTION(prefix_2, "demangle", demangle, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Demangle symbol names (default)", nullptr, nullptr)
|
||||
OPTION(prefix_2, "detect-odr-violations", anonymous_48, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "dependent-libraries", dependent_libraries, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Process dependent library specifiers from input files (default)", nullptr, nullptr)
|
||||
OPTION(prefix_2, "detect-odr-violations", anonymous_50, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "disable-new-dtags", disable_new_dtags, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Disable new dynamic tags", nullptr, nullptr)
|
||||
OPTION(prefix_2, "disable-verify", disable_verify, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
@@ -111,10 +114,10 @@ OPTION(prefix_2, "dy", anonymous_2, Flag, INVALID, Bdynamic, nullptr, 0, 0,
|
||||
"Alias for --Bdynamic", nullptr, nullptr)
|
||||
OPTION(prefix_1, "d", anonymous_6, Flag, INVALID, define_common, nullptr, 0, 0,
|
||||
"Alias for --define-common", nullptr, nullptr)
|
||||
OPTION(prefix_2, "EB", anonymous_65, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "EB", anonymous_69, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "eh-frame-hdr", eh_frame_hdr, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Request creation of .eh_frame_hdr section and PT_GNU_EH_FRAME segment header", nullptr, nullptr)
|
||||
OPTION(prefix_2, "EL", anonymous_66, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "EL", anonymous_70, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "emit-relocs", emit_relocs, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Generate relocations in output", nullptr, nullptr)
|
||||
OPTION(prefix_2, "enable-new-dtags", enable_new_dtags, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
@@ -155,6 +158,8 @@ OPTION(prefix_2, "fini=", fini_eq, Joined, INVALID, fini, nullptr, 0, 0,
|
||||
OPTION(prefix_2, "fini", fini, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, "<symbol>", nullptr)
|
||||
OPTION(prefix_2, "fix-cortex-a53-843419", fix_cortex_a53_843419, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Apply fixes for AArch64 Cortex-A53 erratum 843419", nullptr, nullptr)
|
||||
OPTION(prefix_2, "force-bti", force_bti, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Force enable AArch64 BTI in PLT, warn if Input ELF file does not have GNU_PROPERTY_AARCH64_FEATURE_1_BTI property", nullptr, nullptr)
|
||||
OPTION(prefix_2, "format=", format_eq, Joined, INVALID, format, nullptr, 0, 0,
|
||||
"Change the input format of the inputs following this option", "[default,elf,binary]", nullptr)
|
||||
OPTION(prefix_2, "format", format, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, "[default,elf,binary]", nullptr)
|
||||
@@ -168,14 +173,14 @@ OPTION(prefix_2, "gdb-index", gdb_index, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Generate .gdb_index section", nullptr, nullptr)
|
||||
OPTION(prefix_2, "gnu-unique", gnu_unique, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Enable STB_GNU_UNIQUE symbol binding (default)", nullptr, nullptr)
|
||||
OPTION(prefix_1, "G", anonymous_67, JoinedOrSeparate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "g", anonymous_49, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "G", anonymous_71, JoinedOrSeparate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "g", anonymous_51, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "hash-style=", hash_style_eq, Joined, INVALID, hash_style, nullptr, 0, 0,
|
||||
"Specify hash style (sysv, gnu or both)", nullptr, nullptr)
|
||||
OPTION(prefix_2, "hash-style", hash_style, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "help", help, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Print option help", nullptr, nullptr)
|
||||
OPTION(prefix_1, "h", anonymous_29, JoinedOrSeparate, INVALID, soname, nullptr, 0, 0,
|
||||
OPTION(prefix_1, "h", anonymous_30, JoinedOrSeparate, INVALID, soname, nullptr, 0, 0,
|
||||
"Alias for --soname", nullptr, nullptr)
|
||||
OPTION(prefix_2, "icf=all", icf_all, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Enable identical code folding", nullptr, nullptr)
|
||||
@@ -205,9 +210,13 @@ OPTION(prefix_2, "library-path", library_path, Separate, INVALID, INVALID, nullp
|
||||
OPTION(prefix_2, "library=", library_eq, Joined, INVALID, library, nullptr, 0, 0,
|
||||
"Root name of library to use", "<libName>", nullptr)
|
||||
OPTION(prefix_2, "library", library, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, "<libName>", nullptr)
|
||||
OPTION(prefix_2, "long-plt", anonymous_50, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "long-plt", anonymous_52, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "lto-aa-pipeline=", lto_aa_pipeline, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"AA pipeline to run during LTO. Used in conjunction with -lto-newpm-passes", nullptr, nullptr)
|
||||
OPTION(prefix_2, "lto-cs-profile-file=", lto_cs_profile_file, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Context sensitive profile file path", nullptr, nullptr)
|
||||
OPTION(prefix_2, "lto-cs-profile-generate", lto_cs_profile_generate, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Perform context senstive PGO instrumentation", nullptr, nullptr)
|
||||
OPTION(prefix_2, "lto-debug-pass-manager", lto_debug_pass_manager, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Debug new pass manager", nullptr, nullptr)
|
||||
OPTION(prefix_2, "lto-new-pass-manager", lto_new_pass_manager, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
@@ -235,14 +244,17 @@ OPTION(prefix_2, "mips-got-size", mips_got_size, Separate, INVALID, INVALID, nul
|
||||
OPTION(prefix_2, "mllvm=", mllvm_eq, Joined, INVALID, mllvm, nullptr, 0, 0,
|
||||
"Additional arguments to forward to LLVM's option processing", nullptr, nullptr)
|
||||
OPTION(prefix_2, "mllvm", mllvm, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "M", anonymous_24, Flag, INVALID, print_map, nullptr, 0, 0,
|
||||
OPTION(prefix_1, "M", anonymous_25, Flag, INVALID, print_map, nullptr, 0, 0,
|
||||
"Alias for --print-map", nullptr, nullptr)
|
||||
OPTION(prefix_1, "m", m, JoinedOrSeparate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Set target emulation", nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-add-needed", anonymous_51, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "nmagic", nmagic, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Do not page align sections, link against static libraries.", "<magic>", nullptr)
|
||||
OPTION(prefix_2, "no-add-needed", anonymous_53, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-allow-multiple-definition", no_allow_multiple_definition, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Do not allow multiple definitions (default)", nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-allow-shlib-undefined", anonymous_52, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-allow-shlib-undefined", no_allow_shlib_undefined, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Do not allow unresolved references in shared libraries (default when linking an executable)", nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-apply-dynamic-relocs", no_apply_dynamic_relocs, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Do not apply link-time values for dynamic relocations (default)", nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-as-needed", no_as_needed, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
@@ -253,14 +265,16 @@ OPTION(prefix_2, "no-check-sections", no_check_sections, Flag, INVALID, INVALID,
|
||||
"Do not check section addresses for overlaps", nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-color-diagnostics", no_color_diagnostics, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Do not use colors in diagnostics", nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-copy-dt-needed-entries", anonymous_53, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-copy-dt-needed-entries", anonymous_54, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-cref", no_cref, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Do not output cross reference table", nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-ctors-in-init-array", anonymous_54, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-ctors-in-init-array", anonymous_55, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-define-common", no_define_common, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Do not assign space to common symbols", nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-demangle", no_demangle, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Do not demangle symbol names", nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-dependent-libraries", no_dependent_libraries, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Ignore dependent library specifiers from input files", nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-dynamic-linker", no_dynamic_linker, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Inhibit output of .interp section", nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-eh-frame-hdr", no_eh_frame_hdr, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
@@ -277,16 +291,19 @@ OPTION(prefix_2, "no-gdb-index", no_gdb_index, Flag, INVALID, INVALID, nullptr,
|
||||
"Do not generate .gdb_index section (default)", nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-gnu-unique", no_gnu_unique, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Disable STB_GNU_UNIQUE symbol binding", nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-keep-memory", anonymous_55, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-keep-memory", anonymous_56, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-merge-exidx-entries", no_merge_exidx_entries, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Disable merging .ARM.exidx entries", nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-mmap-output-file", anonymous_56, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-mmap-output-file", anonymous_57, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-nmagic", no_nmagic, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Page align sections (default)", "<magic>", nullptr)
|
||||
OPTION(prefix_2, "no-omagic", no_omagic, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Do not set the text data sections to be writable", "<magic>", nullptr)
|
||||
"Do not set the text data sections to be writable, page align sections (default)", "<magic>", nullptr)
|
||||
OPTION(prefix_2, "no-pic-executable", anonymous_19, Flag, INVALID, no_pie, nullptr, 0, 0,
|
||||
"Alias for --no-pie", nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-pie", no_pie, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Do not create a position independent executable (default)", nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-pipeline-knowledge", anonymous_58, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-print-gc-sections", no_print_gc_sections, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Do not list removed unused sections (default)", nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-print-icf-sections", no_print_icf_sections, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
@@ -309,7 +326,7 @@ OPTION(prefix_2, "no-warn-common", no_warn_common, Flag, INVALID, INVALID, nullp
|
||||
"Do not warn about duplicate common symbols (default)", nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-warn-ifunc-textrel", no_warn_ifunc_textrel, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Do not warn about using ifunc symbols with text relocations (default)", nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-warn-mismatch", anonymous_57, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-warn-mismatch", anonymous_59, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-warn-symbol-ordering", no_warn_symbol_ordering, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Do not warn about problems with the symbol ordering file", nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-whole-archive", no_whole_archive, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
@@ -320,31 +337,39 @@ OPTION(prefix_2, "non_shared", anonymous_4, Flag, INVALID, Bstatic, nullptr, 0,
|
||||
"Alias for --Bstatic", nullptr, nullptr)
|
||||
OPTION(prefix_2, "nostdlib", nostdlib, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Only search directories specified on the command line", nullptr, nullptr)
|
||||
OPTION(prefix_1, "N", anonymous_20, Flag, INVALID, omagic, nullptr, 0, 0,
|
||||
OPTION(prefix_1, "N", anonymous_21, Flag, INVALID, omagic, nullptr, 0, 0,
|
||||
"Alias for --omagic", nullptr, nullptr)
|
||||
OPTION(prefix_1, "n", anonymous_20, Flag, INVALID, nmagic, nullptr, 0, 0,
|
||||
"Alias for --nmagic", nullptr, nullptr)
|
||||
OPTION(prefix_3, "oformat", oformat, Separate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Specify the binary format for the output object file", "<format>", nullptr)
|
||||
OPTION(prefix_3, "omagic", omagic, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Set the text and data sections to be readable and writable", "<magic>", nullptr)
|
||||
"Set the text and data sections to be readable and writable, do not page align sections, link against static libraries", "<magic>", nullptr)
|
||||
OPTION(prefix_3, "opt-remarks-filename", opt_remarks_filename, Separate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"YAML output file for optimization remarks", nullptr, nullptr)
|
||||
OPTION(prefix_3, "opt-remarks-format", opt_remarks_format, Separate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"The format used for serializing remarks (default: YAML)", nullptr, nullptr)
|
||||
OPTION(prefix_3, "opt-remarks-passes", opt_remarks_passes, Separate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Regex for the passes that need to be serialized to the output file", nullptr, nullptr)
|
||||
OPTION(prefix_3, "opt-remarks-with-hotness", opt_remarks_with_hotness, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Include hotness information in the optimization remarks file", nullptr, nullptr)
|
||||
OPTION(prefix_2, "orphan-handling=", orphan_handling_eq, Joined, INVALID, orphan_handling, nullptr, 0, 0,
|
||||
"Control how orphan sections are handled when linker script used", nullptr, nullptr)
|
||||
OPTION(prefix_2, "orphan-handling", orphan_handling, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_3, "output=", anonymous_21, Joined, INVALID, o, nullptr, 0, 0,
|
||||
OPTION(prefix_3, "output=", anonymous_22, Joined, INVALID, o, nullptr, 0, 0,
|
||||
"Alias for -o", nullptr, nullptr)
|
||||
OPTION(prefix_3, "output", anonymous_22, Separate, INVALID, o, nullptr, 0, 0,
|
||||
OPTION(prefix_3, "output", anonymous_23, Separate, INVALID, o, nullptr, 0, 0,
|
||||
"Alias for -o", nullptr, nullptr)
|
||||
OPTION(prefix_1, "O", O, JoinedOrSeparate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Optimize output file size", nullptr, nullptr)
|
||||
OPTION(prefix_1, "o", o, JoinedOrSeparate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Path to file to write output", "<path>", nullptr)
|
||||
OPTION(prefix_2, "pac-plt", pac_plt, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"AArch64 only, use pointer authentication in PLT", nullptr, nullptr)
|
||||
OPTION(prefix_2, "pack-dyn-relocs=", pack_dyn_relocs_eq, Joined, INVALID, pack_dyn_relocs, nullptr, 0, 0,
|
||||
"Pack dynamic relocations in the given format", "[none,android,relr,android+relr]", nullptr)
|
||||
OPTION(prefix_2, "pack-dyn-relocs", pack_dyn_relocs, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, "[none,android,relr,android+relr]", nullptr)
|
||||
OPTION(prefix_2, "pic-executable", anonymous_23, Flag, INVALID, pie, nullptr, 0, 0,
|
||||
OPTION(prefix_2, "pic-executable", anonymous_24, Flag, INVALID, pie, nullptr, 0, 0,
|
||||
"Alias for --pie", nullptr, nullptr)
|
||||
OPTION(prefix_2, "pic-veneer", pic_veneer, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Always generate position independent thunks (veneers)", nullptr, nullptr)
|
||||
@@ -353,26 +378,30 @@ OPTION(prefix_2, "pie", pie, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
OPTION(prefix_2, "plugin-opt=-fresolution=", plugin_opt_fresolution_eq, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "plugin-opt=-pass-through=", plugin_opt_pass_through_eq, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "plugin-opt=/", plugin_opt_slash, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "plugin-opt=debug-pass-manager", anonymous_40, Flag, INVALID, lto_debug_pass_manager, nullptr, 0, 0,
|
||||
OPTION(prefix_2, "plugin-opt=cs-profile-generate", anonymous_46, Flag, INVALID, lto_cs_profile_generate, nullptr, 0, 0,
|
||||
"Alias for -lto-cs-profile-generate", nullptr, nullptr)
|
||||
OPTION(prefix_2, "plugin-opt=cs-profile-path=", anonymous_47, Joined, INVALID, lto_cs_profile_file, nullptr, 0, 0,
|
||||
"Alias for -lto-cs-profile-file", nullptr, nullptr)
|
||||
OPTION(prefix_2, "plugin-opt=debug-pass-manager", anonymous_41, Flag, INVALID, lto_debug_pass_manager, nullptr, 0, 0,
|
||||
"Alias for -lto-debug-pass-manager", nullptr, nullptr)
|
||||
OPTION(prefix_2, "plugin-opt=disable-verify", anonymous_41, Flag, INVALID, disable_verify, nullptr, 0, 0,
|
||||
OPTION(prefix_2, "plugin-opt=disable-verify", anonymous_42, Flag, INVALID, disable_verify, nullptr, 0, 0,
|
||||
"Alias for -disable-verify", nullptr, nullptr)
|
||||
OPTION(prefix_2, "plugin-opt=dwo_dir=", plugin_opt_dwo_dir_eq, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Directory to store .dwo files when LTO and debug fission are used", nullptr, nullptr)
|
||||
OPTION(prefix_2, "plugin-opt=emit-llvm", plugin_opt_emit_llvm, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "plugin-opt=jobs=", anonymous_42, Joined, INVALID, thinlto_jobs, nullptr, 0, 0,
|
||||
OPTION(prefix_2, "plugin-opt=jobs=", anonymous_43, Joined, INVALID, thinlto_jobs, nullptr, 0, 0,
|
||||
"Alias for -thinlto-jobs", nullptr, nullptr)
|
||||
OPTION(prefix_2, "plugin-opt=lto-partitions=", anonymous_43, Joined, INVALID, lto_partitions, nullptr, 0, 0,
|
||||
OPTION(prefix_2, "plugin-opt=lto-partitions=", anonymous_44, Joined, INVALID, lto_partitions, nullptr, 0, 0,
|
||||
"Alias for -lto-partitions", nullptr, nullptr)
|
||||
OPTION(prefix_2, "plugin-opt=mcpu=", plugin_opt_mcpu_eq, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "plugin-opt=new-pass-manager", anonymous_44, Flag, INVALID, lto_new_pass_manager, nullptr, 0, 0,
|
||||
OPTION(prefix_2, "plugin-opt=new-pass-manager", anonymous_45, Flag, INVALID, lto_new_pass_manager, nullptr, 0, 0,
|
||||
"Alias for -lto-new-pass-manager", nullptr, nullptr)
|
||||
OPTION(prefix_2, "plugin-opt=obj-path=", plugin_opt_obj_path_eq, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "plugin-opt=O", anonymous_39, Joined, INVALID, lto_O, nullptr, 0, 0,
|
||||
OPTION(prefix_2, "plugin-opt=O", anonymous_40, Joined, INVALID, lto_O, nullptr, 0, 0,
|
||||
"Alias for -lto-O", nullptr, nullptr)
|
||||
OPTION(prefix_2, "plugin-opt=sample-profile=", anonymous_45, Joined, INVALID, lto_sample_profile, nullptr, 0, 0,
|
||||
OPTION(prefix_2, "plugin-opt=sample-profile=", anonymous_48, Joined, INVALID, lto_sample_profile, nullptr, 0, 0,
|
||||
"Alias for -lto-sample-profile", nullptr, nullptr)
|
||||
OPTION(prefix_2, "plugin-opt=save-temps", anonymous_46, Flag, INVALID, save_temps, nullptr, 0, 0,
|
||||
OPTION(prefix_2, "plugin-opt=save-temps", anonymous_49, Flag, INVALID, save_temps, nullptr, 0, 0,
|
||||
"Alias for -save-temps", nullptr, nullptr)
|
||||
OPTION(prefix_2, "plugin-opt=thinlto-emit-imports-files", plugin_opt_thinlto_emit_imports_files, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "plugin-opt=thinlto-index-only=", plugin_opt_thinlto_index_only_eq, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
@@ -394,9 +423,13 @@ OPTION(prefix_2, "print-icf-sections", print_icf_sections, Flag, INVALID, INVALI
|
||||
"List identical folded sections", nullptr, nullptr)
|
||||
OPTION(prefix_2, "print-map", print_map, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Print a link map to the standard output", nullptr, nullptr)
|
||||
OPTION(prefix_2, "print-symbol-order=", print_symbol_order_eq, Joined, INVALID, print_symbol_order, nullptr, 0, 0,
|
||||
"Print a symbol order specified by --call-graph-ordering-file into the speficied file", nullptr, nullptr)
|
||||
OPTION(prefix_2, "print-symbol-order", print_symbol_order, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "push-state", push_state, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Save the current state of -as-needed, -static and -whole-archive", nullptr, nullptr)
|
||||
OPTION(prefix_2, "Qy", anonymous_68, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "p", anonymous_60, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "Qy", anonymous_72, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "q", anonymous_11, Flag, INVALID, emit_relocs, nullptr, 0, 0,
|
||||
"Alias for --emit-relocs", nullptr, nullptr)
|
||||
OPTION(prefix_2, "relocatable", relocatable, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
@@ -404,20 +437,21 @@ OPTION(prefix_2, "relocatable", relocatable, Flag, INVALID, INVALID, nullptr, 0,
|
||||
OPTION(prefix_2, "reproduce=", reproduce_eq, Joined, INVALID, reproduce, nullptr, 0, 0,
|
||||
"Dump linker invocation and input files for debugging", nullptr, nullptr)
|
||||
OPTION(prefix_2, "reproduce", reproduce, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "require-cet", require_cet, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "retain-symbols-file=", retain_symbols_file_eq, Joined, INVALID, retain_symbols_file, nullptr, 0, 0,
|
||||
"Retain only the symbols listed in the file", "<file>", nullptr)
|
||||
OPTION(prefix_2, "retain-symbols-file", retain_symbols_file, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, "<file>", nullptr)
|
||||
OPTION(prefix_2, "rpath-link=", anonymous_59, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "rpath-link", anonymous_58, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "rpath-link=", anonymous_62, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "rpath-link", anonymous_61, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "rpath=", rpath_eq, Joined, INVALID, rpath, nullptr, 0, 0,
|
||||
"Add a DT_RUNPATH to the output", nullptr, nullptr)
|
||||
OPTION(prefix_2, "rpath", rpath, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "rsp-quoting=", rsp_quoting_eq, Joined, INVALID, rsp_quoting, nullptr, 0, 0,
|
||||
"Quoting style for response files", "[posix,windows]", nullptr)
|
||||
OPTION(prefix_2, "rsp-quoting", rsp_quoting, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, "[posix,windows]", nullptr)
|
||||
OPTION(prefix_1, "R", anonymous_26, JoinedOrSeparate, INVALID, rpath, nullptr, 0, 0,
|
||||
OPTION(prefix_1, "R", anonymous_27, JoinedOrSeparate, INVALID, rpath, nullptr, 0, 0,
|
||||
"Alias for --rpath", nullptr, nullptr)
|
||||
OPTION(prefix_1, "r", anonymous_25, Flag, INVALID, relocatable, nullptr, 0, 0,
|
||||
OPTION(prefix_1, "r", anonymous_26, Flag, INVALID, relocatable, nullptr, 0, 0,
|
||||
"Alias for --relocatable", nullptr, nullptr)
|
||||
OPTION(prefix_2, "save-temps", save_temps, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "script=", script_eq, Joined, INVALID, script, nullptr, 0, 0,
|
||||
@@ -426,12 +460,13 @@ OPTION(prefix_2, "script", script, Separate, INVALID, INVALID, nullptr, 0, 0, nu
|
||||
OPTION(prefix_2, "section-start=", section_start_eq, Joined, INVALID, section_start, nullptr, 0, 0,
|
||||
"Set address of section", "<address>", nullptr)
|
||||
OPTION(prefix_2, "section-start", section_start, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, "<address>", nullptr)
|
||||
OPTION(prefix_2, "secure-plt", anonymous_63, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "shared", shared, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Build a shared object", nullptr, nullptr)
|
||||
OPTION(prefix_2, "soname=", soname_eq, Joined, INVALID, soname, nullptr, 0, 0,
|
||||
"Set DT_SONAME", nullptr, nullptr)
|
||||
OPTION(prefix_2, "soname", soname, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "sort-common", anonymous_60, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "sort-common", anonymous_64, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "sort-section=", sort_section_eq, Joined, INVALID, sort_section, nullptr, 0, 0,
|
||||
"Specifies sections sorting rule when linkerscript is used", nullptr, nullptr)
|
||||
OPTION(prefix_2, "sort-section", sort_section, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
@@ -444,7 +479,7 @@ OPTION(prefix_2, "start-lib", start_lib, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Start a grouping of objects that should be treated as if they were together in an archive", nullptr, nullptr)
|
||||
OPTION(prefix_2, "static", anonymous_5, Flag, INVALID, Bstatic, nullptr, 0, 0,
|
||||
"Alias for --Bstatic", nullptr, nullptr)
|
||||
OPTION(prefix_2, "stats", anonymous_61, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "stats", anonymous_65, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "strip-all", strip_all, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Strip all symbols", nullptr, nullptr)
|
||||
OPTION(prefix_2, "strip-debug", strip_debug, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
@@ -455,9 +490,9 @@ OPTION(prefix_2, "symbol-ordering-file", symbol_ordering_file, Separate, INVALID
|
||||
OPTION(prefix_2, "sysroot=", sysroot_eq, Joined, INVALID, sysroot, nullptr, 0, 0,
|
||||
"Set the system root", nullptr, nullptr)
|
||||
OPTION(prefix_2, "sysroot", sysroot, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "S", anonymous_32, Flag, INVALID, strip_debug, nullptr, 0, 0,
|
||||
OPTION(prefix_1, "S", anonymous_33, Flag, INVALID, strip_debug, nullptr, 0, 0,
|
||||
"Alias for --strip-debug", nullptr, nullptr)
|
||||
OPTION(prefix_1, "s", anonymous_31, Flag, INVALID, strip_all, nullptr, 0, 0,
|
||||
OPTION(prefix_1, "s", anonymous_32, Flag, INVALID, strip_all, nullptr, 0, 0,
|
||||
"Alias for --strip-all", nullptr, nullptr)
|
||||
OPTION(prefix_2, "target1-abs", target1_abs, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Interpret R_ARM_TARGET1 as R_ARM_ABS32 (default)", nullptr, nullptr)
|
||||
@@ -488,17 +523,20 @@ OPTION(prefix_2, "trace-symbol=", trace_symbol_eq, Joined, INVALID, trace_symbol
|
||||
OPTION(prefix_2, "trace-symbol", trace_symbol, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "trace", trace, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Print the names of the input files", nullptr, nullptr)
|
||||
OPTION(prefix_4, "Ttext-segment=", anonymous_36, Joined, INVALID, Ttext, nullptr, 0, 0,
|
||||
OPTION(prefix_4, "Ttext-segment=", anonymous_37, Joined, INVALID, Ttext, nullptr, 0, 0,
|
||||
"Alias for --Ttext", nullptr, nullptr)
|
||||
OPTION(prefix_4, "Ttext-segment", anonymous_35, Separate, INVALID, Ttext, nullptr, 0, 0,
|
||||
OPTION(prefix_4, "Ttext-segment", anonymous_36, Separate, INVALID, Ttext, nullptr, 0, 0,
|
||||
"Alias for --Ttext", nullptr, nullptr)
|
||||
OPTION(prefix_2, "Ttext=", Ttext_eq, Joined, INVALID, Ttext, nullptr, 0, 0,
|
||||
"Same as --section-start with .text as the sectionname", nullptr, nullptr)
|
||||
OPTION(prefix_2, "Ttext", Ttext, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "T", anonymous_27, JoinedOrSeparate, INVALID, script, nullptr, 0, 0,
|
||||
OPTION(prefix_1, "T", anonymous_28, JoinedOrSeparate, INVALID, script, nullptr, 0, 0,
|
||||
"Alias for --script", nullptr, nullptr)
|
||||
OPTION(prefix_1, "t", anonymous_33, Flag, INVALID, trace, nullptr, 0, 0,
|
||||
OPTION(prefix_1, "t", anonymous_34, Flag, INVALID, trace, nullptr, 0, 0,
|
||||
"Alias for --trace", nullptr, nullptr)
|
||||
OPTION(prefix_2, "undefined-glob=", undefined_glob_eq, Joined, INVALID, undefined_glob, nullptr, 0, 0,
|
||||
"Force undefined symbol during linking", "<pattern>", nullptr)
|
||||
OPTION(prefix_2, "undefined-glob", undefined_glob, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, "<pattern>", nullptr)
|
||||
OPTION(prefix_2, "undefined-version", undefined_version, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Allow unused version in version script (default)", nullptr, nullptr)
|
||||
OPTION(prefix_2, "undefined=", undefined_eq, Joined, INVALID, undefined, nullptr, 0, 0,
|
||||
@@ -509,7 +547,7 @@ OPTION(prefix_2, "unresolved-symbols=", unresolved_symbols_eq, Joined, INVALID,
|
||||
OPTION(prefix_2, "unresolved-symbols", unresolved_symbols, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "use-android-relr-tags", use_android_relr_tags, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Use SHT_ANDROID_RELR / DT_ANDROID_RELR* tags instead of SHT_RELR / DT_RELR*", nullptr, nullptr)
|
||||
OPTION(prefix_1, "u", anonymous_37, JoinedOrSeparate, INVALID, undefined, nullptr, 0, 0,
|
||||
OPTION(prefix_1, "u", anonymous_38, JoinedOrSeparate, INVALID, undefined, nullptr, 0, 0,
|
||||
"Alias for --undefined", nullptr, nullptr)
|
||||
OPTION(prefix_2, "verbose", verbose, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Verbose mode", nullptr, nullptr)
|
||||
@@ -518,7 +556,9 @@ OPTION(prefix_2, "version-script=", version_script_eq, Joined, INVALID, version_
|
||||
OPTION(prefix_2, "version-script", version_script, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "version", version, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Display the version number and exit", nullptr, nullptr)
|
||||
OPTION(prefix_1, "V", anonymous_38, Flag, INVALID, version, nullptr, 0, 0,
|
||||
OPTION(prefix_2, "vs-diagnostics", visual_studio_diagnostics_format, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Format diagnostics for Visual Studio compatiblity", nullptr, nullptr)
|
||||
OPTION(prefix_1, "V", anonymous_39, Flag, INVALID, version, nullptr, 0, 0,
|
||||
"Alias for --version", nullptr, nullptr)
|
||||
OPTION(prefix_1, "v", v, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Display the version number", nullptr, nullptr)
|
||||
@@ -526,11 +566,11 @@ OPTION(prefix_2, "warn-backrefs", warn_backrefs, Flag, INVALID, INVALID, nullptr
|
||||
"Warn about backward symbol references to fetch archive members", nullptr, nullptr)
|
||||
OPTION(prefix_2, "warn-common", warn_common, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Warn about duplicate common symbols", nullptr, nullptr)
|
||||
OPTION(prefix_2, "warn-execstack", anonymous_62, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "warn-execstack", anonymous_66, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "warn-ifunc-textrel", warn_ifunc_textrel, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Warn about using ifunc symbols with text relocations", nullptr, nullptr)
|
||||
OPTION(prefix_2, "warn-once", anonymous_63, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "warn-shared-textrel", anonymous_64, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "warn-once", anonymous_67, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "warn-shared-textrel", anonymous_68, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "warn-symbol-ordering", warn_symbol_ordering, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Warn about problems with the symbol ordering file (default)", nullptr, nullptr)
|
||||
OPTION(prefix_2, "warn-unresolved-symbols", warn_unresolved_symbols, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
@@ -544,7 +584,7 @@ OPTION(prefix_1, "X", anonymous_10, Flag, INVALID, discard_locals, nullptr, 0, 0
|
||||
"Alias for --discard-locals", nullptr, nullptr)
|
||||
OPTION(prefix_1, "x", anonymous_9, Flag, INVALID, discard_all, nullptr, 0, 0,
|
||||
"Alias for --discard-all", nullptr, nullptr)
|
||||
OPTION(prefix_1, "y", anonymous_34, JoinedOrSeparate, INVALID, trace_symbol, nullptr, 0, 0,
|
||||
OPTION(prefix_1, "y", anonymous_35, JoinedOrSeparate, INVALID, trace_symbol, nullptr, 0, 0,
|
||||
"Alias for --trace-symbol", nullptr, nullptr)
|
||||
OPTION(prefix_1, "z", z, JoinedOrSeparate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Linker option extensions", "<option>", nullptr)
|
||||
|
||||
79
deps/lld-prebuilt/MinGW/Options.inc
vendored
79
deps/lld-prebuilt/MinGW/Options.inc
vendored
@@ -30,31 +30,42 @@ OPTION(prefix_0, "<input>", INPUT, Input, INVALID, INVALID, nullptr, 0, 0, nullp
|
||||
OPTION(prefix_0, "<unknown>", UNKNOWN, Unknown, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "###", _HASH_HASH_HASH, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Print (but do not run) the commands to run for this compilation", nullptr, nullptr)
|
||||
OPTION(prefix_2, "appcontainer", appcontainer, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Set the appcontainer flag in the executable", nullptr, nullptr)
|
||||
OPTION(prefix_2, "Bdynamic", Bdynamic, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Link against shared libraries", nullptr, nullptr)
|
||||
OPTION(prefix_2, "Bstatic", Bstatic, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Do not link against shared libraries", nullptr, nullptr)
|
||||
OPTION(prefix_2, "build-id", build_id, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "disable-auto-image-base", disable_auto_image_base, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "build-id", anonymous_1, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "delayload=", delayload_eq, Joined, INVALID, delayload, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "delayload", delayload, Separate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"DLL to load only on demand", nullptr, nullptr)
|
||||
OPTION(prefix_2, "disable-auto-image-base", anonymous_2, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "dynamicbase", dynamicbase, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Enable ASLR", nullptr, nullptr)
|
||||
OPTION(prefix_2, "enable-auto-image-base", enable_auto_image_base, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "enable-auto-import", enable_auto_import, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "end-group", end_group, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "enable-auto-image-base", anonymous_3, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "enable-auto-import", anonymous_4, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Ignored; listed for libtool compatibility", nullptr, nullptr)
|
||||
OPTION(prefix_2, "end-group", anonymous_5, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "entry", entry, Separate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Name of entry point symbol", "<entry>", nullptr)
|
||||
OPTION(prefix_2, "exclude-all-symbols", exclude_all_symbols, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Don't automatically export any symbols", nullptr, nullptr)
|
||||
OPTION(prefix_2, "export-all-symbols", export_all_symbols, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Export all symbols even if a def file or dllexport attributes are used", nullptr, nullptr)
|
||||
OPTION(prefix_1, "e", alias_entry_e, JoinedOrSeparate, INVALID, entry, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_3, "full-shutdown", full_shutdown, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_3, "full-shutdown", anonymous_6, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "gc-sections", gc_sections, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Remove unused sections", nullptr, nullptr)
|
||||
OPTION(prefix_2, "high-entropy-va", high_entropy_va, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Enable 64-bit ASLR", nullptr, nullptr)
|
||||
OPTION(prefix_2, "help", help, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Print option help", nullptr, nullptr)
|
||||
OPTION(prefix_2, "high-entropy-va", anonymous_7, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "icf=", icf, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Identical code folding", nullptr, nullptr)
|
||||
OPTION(prefix_2, "image-base", image_base, Separate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Base address of the program", nullptr, nullptr)
|
||||
OPTION(prefix_2, "insert-timestamp", insert_timestamp, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Include PE header timestamp", nullptr, nullptr)
|
||||
OPTION(prefix_2, "kill-at", kill_at, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Remove @n from exported symbols", nullptr, nullptr)
|
||||
OPTION(prefix_3, "large-address-aware", large_address_aware, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
@@ -63,56 +74,72 @@ OPTION(prefix_1, "L", L, JoinedOrSeparate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Add a directory to the library search path", "<dir>", nullptr)
|
||||
OPTION(prefix_1, "l", l, JoinedOrSeparate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Root name of library to use", "<libName>", nullptr)
|
||||
OPTION(prefix_2, "major-image-version", major_image_version, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "major-image-version", anonymous_8, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_3, "major-os-version=", major_os_version_eq, Joined, INVALID, major_os_version, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_3, "major-os-version", major_os_version, Separate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Set the OS and subsystem major version", nullptr, nullptr)
|
||||
OPTION(prefix_3, "major-subsystem-version=", major_subsystem_version_eq, Joined, INVALID, major_subsystem_version, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_3, "major-subsystem-version", major_subsystem_version, Separate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Set the OS and subsystem major version", nullptr, nullptr)
|
||||
OPTION(prefix_2, "Map=", map_eq, Joined, INVALID, map, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "Map", map, Separate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Output a linker map", nullptr, nullptr)
|
||||
OPTION(prefix_2, "minor-image-version", minor_image_version, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "minor-image-version", anonymous_9, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_3, "minor-os-version=", minor_os_version_eq, Joined, INVALID, minor_os_version, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_3, "minor-os-version", minor_os_version, Separate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Set the OS and subsystem minor version", nullptr, nullptr)
|
||||
OPTION(prefix_3, "minor-subsystem-version=", minor_subsystem_version_eq, Joined, INVALID, minor_subsystem_version, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_3, "minor-subsystem-version", minor_subsystem_version, Separate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Set the OS and subsystem minor version", nullptr, nullptr)
|
||||
OPTION(prefix_2, "mllvm", mllvm, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "m", m, JoinedOrSeparate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Set target emulation", nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-gc-sections", no_gc_sections, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Don't remove unused sections", nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-seh", no_seh, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-insert-timestamp", no_insert_timestamp, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Don't include PE header timestamp", nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-seh", anonymous_10, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "no-whole-archive", no_whole_archive, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"No longer include all object files for following archives", nullptr, nullptr)
|
||||
OPTION(prefix_2, "nxcompat", nxcompat, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Enable data execution prevention", nullptr, nullptr)
|
||||
OPTION(prefix_2, "nxcompat", anonymous_11, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_3, "out-implib=", out_implib_eq, Joined, INVALID, out_implib, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_3, "out-implib", out_implib, Separate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Import library name", nullptr, nullptr)
|
||||
OPTION(prefix_2, "output-def", output_def, Separate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Output def file", nullptr, nullptr)
|
||||
OPTION(prefix_1, "O", O, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Optimize output file size", nullptr, nullptr)
|
||||
OPTION(prefix_1, "O", anonymous_0, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "o", o, JoinedOrSeparate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Path to file to write output", "<path>", nullptr)
|
||||
OPTION(prefix_2, "pdb=", pdb_eq, Joined, INVALID, pdb, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "pdb", pdb, Separate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Specify output PDB debug information file", nullptr, nullptr)
|
||||
OPTION(prefix_2, "pic-executable", pic_executable, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "plugin-opt=", anonymous_3, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "plugin-opt", anonymous_2, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "plugin=", anonymous_1, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "plugin", anonymous_0, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
"Output PDB debug info file, chosen implicitly if the argument is empty", nullptr, nullptr)
|
||||
OPTION(prefix_2, "pic-executable", anonymous_12, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "plugin-opt=", anonymous_16, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "plugin-opt", anonymous_15, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "plugin=", anonymous_14, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "plugin", anonymous_13, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "require-defined=", require_defined_eq, Joined, INVALID, require_defined, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "require-defined", require_defined, Separate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Force symbol to be added to symbol table as an undefined one", nullptr, nullptr)
|
||||
OPTION(prefix_2, "shared", shared, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Build a shared object", nullptr, nullptr)
|
||||
OPTION(prefix_2, "stack", stack, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "start-group", start_group, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "start-group", anonymous_18, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "strip-all", strip_all, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Omit all symbol information from the output binary", nullptr, nullptr)
|
||||
OPTION(prefix_2, "strip-debug", strip_debug, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Omit all debug information, but keep symbol information", nullptr, nullptr)
|
||||
OPTION(prefix_2, "subsystem=", subs_eq, Joined, INVALID, subs, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "subsystem", subs, Separate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Specify subsystem", nullptr, nullptr)
|
||||
OPTION(prefix_2, "sysroot", sysroot, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Sysroot", nullptr, nullptr)
|
||||
OPTION(prefix_2, "sysroot", anonymous_17, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "S", alias_strip_S, Flag, INVALID, strip_debug, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "s", alias_strip_s, Flag, INVALID, strip_all, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "tsaware", tsaware, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Create Terminal Server aware executable", nullptr, nullptr)
|
||||
OPTION(prefix_2, "tsaware", anonymous_19, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "undefined=", undefined_eq, Joined, INVALID, undefined, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "undefined", undefined_long, Separate, INVALID, undefined, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "u", undefined, Separate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Include symbol in the link, if available", nullptr, nullptr)
|
||||
OPTION(prefix_2, "verbose", verbose, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Verbose mode", nullptr, nullptr)
|
||||
OPTION(prefix_2, "version", version, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
|
||||
6
deps/lld-prebuilt/lld/Common/Version.inc
vendored
6
deps/lld-prebuilt/lld/Common/Version.inc
vendored
@@ -1,6 +1,6 @@
|
||||
#define LLD_VERSION 8.0.0
|
||||
#define LLD_VERSION_STRING "8.0.0"
|
||||
#define LLD_VERSION_MAJOR 8
|
||||
#define LLD_VERSION 9.0.0
|
||||
#define LLD_VERSION_STRING "9.0.0"
|
||||
#define LLD_VERSION_MAJOR 9
|
||||
#define LLD_VERSION_MINOR 0
|
||||
#define LLD_REVISION_STRING ""
|
||||
#define LLD_REPOSITORY_STRING ""
|
||||
|
||||
29
deps/lld-prebuilt/wasm/Options.inc
vendored
29
deps/lld-prebuilt/wasm/Options.inc
vendored
@@ -27,11 +27,15 @@ PREFIX(prefix_1, {"--" COMMA "-" COMMA nullptr})
|
||||
|
||||
OPTION(prefix_0, "<input>", INPUT, Input, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_0, "<unknown>", UNKNOWN, Unknown, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "active-segments", active_segments, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Force segments to be active (default with unshared memory)", nullptr, nullptr)
|
||||
OPTION(prefix_1, "allow-undefined-file=", allow_undefined_file, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Allow symbols listed in <file> to be undefined in linked binary", nullptr, nullptr)
|
||||
OPTION(prefix_2, "allow-undefined-file", allow_undefined_file_s, Separate, INVALID, allow_undefined_file, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "allow-undefined", allow_undefined, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Allow undefined symbols in linked binary", nullptr, nullptr)
|
||||
OPTION(prefix_1, "check-features", check_features, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Check feature compatibility of linked objects (default)", nullptr, nullptr)
|
||||
OPTION(prefix_1, "color-diagnostics=", color_diagnostics_eq, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Use colors in diagnostics; one of 'always', 'never', 'auto'", nullptr, nullptr)
|
||||
OPTION(prefix_1, "color-diagnostics", color_diagnostics, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
@@ -41,6 +45,8 @@ OPTION(prefix_1, "compress-relocations", compress_relocations, Flag, INVALID, IN
|
||||
OPTION(prefix_1, "demangle", demangle, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Demangle symbol names", nullptr, nullptr)
|
||||
OPTION(prefix_1, "disable-verify", disable_verify, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "emit-relocs", emit_relocs, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Generate relocations in output", nullptr, nullptr)
|
||||
OPTION(prefix_1, "entry=", anonymous_1, Joined, INVALID, entry, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "entry", entry, Separate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Name of entry point symbol", "<entry>", nullptr)
|
||||
@@ -60,6 +66,8 @@ OPTION(prefix_2, "E", anonymous_2, Flag, INVALID, export_dynamic, nullptr, 0, 0,
|
||||
OPTION(prefix_2, "e", anonymous_0, JoinedOrSeparate, INVALID, entry, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "fatal-warnings", fatal_warnings, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Treat warnings as errors", nullptr, nullptr)
|
||||
OPTION(prefix_1, "features=", features, CommaJoined, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Comma-separated used features, inferred from input objects by default.", nullptr, nullptr)
|
||||
OPTION(prefix_1, "gc-sections", gc_sections, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Enable garbage collection of unused sections", nullptr, nullptr)
|
||||
OPTION(prefix_1, "global-base=", global_base, Joined, INVALID, INVALID, nullptr, 0, 0,
|
||||
@@ -88,6 +96,8 @@ OPTION(prefix_1, "merge-data-segments", merge_data_segments, Flag, INVALID, INVA
|
||||
OPTION(prefix_1, "mllvm", mllvm, Separate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Options to pass to LLVM", nullptr, nullptr)
|
||||
OPTION(prefix_2, "m", anonymous_4, Flag, INVALID, max_memory, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "no-check-features", no_check_features, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Ignore feature compatibility of linked objects", nullptr, nullptr)
|
||||
OPTION(prefix_1, "no-color-diagnostics", no_color_diagnostics, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Do not use colors in diagnostics", nullptr, nullptr)
|
||||
OPTION(prefix_1, "no-demangle", no_demangle, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
@@ -113,12 +123,17 @@ OPTION(prefix_2, "O", O, JoinedOrSeparate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Optimize output file size", nullptr, nullptr)
|
||||
OPTION(prefix_2, "o", o, JoinedOrSeparate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Path to file to write output", "<path>", nullptr)
|
||||
OPTION(prefix_1, "passive-segments", passive_segments, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Force segments to be passive (default with shared memory)", nullptr, nullptr)
|
||||
OPTION(prefix_1, "pie", pie, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Create a position independent executable", nullptr, nullptr)
|
||||
OPTION(prefix_1, "print-gc-sections", print_gc_sections, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"List removed unused sections", nullptr, nullptr)
|
||||
OPTION(prefix_1, "relocatable", relocatable, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Create relocatable object file", nullptr, nullptr)
|
||||
OPTION(prefix_1, "reproduce=", reproduce_eq, Joined, INVALID, reproduce, nullptr, 0, 0,
|
||||
"Dump linker invocation and input files for debugging", nullptr, nullptr)
|
||||
OPTION(prefix_1, "reproduce", reproduce, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "r", anonymous_5, Flag, INVALID, relocatable, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "save-temps", save_temps, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "shared-memory", shared_memory, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
@@ -144,10 +159,17 @@ OPTION(prefix_1, "thinlto-jobs=", thinlto_jobs, Joined, INVALID, INVALID, nullpt
|
||||
"Number of ThinLTO jobs", nullptr, nullptr)
|
||||
OPTION(prefix_1, "threads", threads, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Run the linker multi-threaded", nullptr, nullptr)
|
||||
OPTION(prefix_1, "trace-symbol=", trace_symbol_eq, Joined, INVALID, trace_symbol, nullptr, 0, 0,
|
||||
"Trace references to symbols", nullptr, nullptr)
|
||||
OPTION(prefix_1, "trace-symbol", trace_symbol, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "trace", trace, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Print the names of the input files", nullptr, nullptr)
|
||||
OPTION(prefix_2, "t", anonymous_8, Flag, INVALID, trace, nullptr, 0, 0,
|
||||
"Alias for --trace", nullptr, nullptr)
|
||||
OPTION(prefix_1, "undefined=", undefined_eq, Joined, INVALID, undefined, nullptr, 0, 0,
|
||||
"Force undefined symbol during linking", nullptr, nullptr)
|
||||
OPTION(prefix_1, "undefined", undefined, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "u", anonymous_8, JoinedOrSeparate, INVALID, undefined, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_2, "u", anonymous_10, JoinedOrSeparate, INVALID, undefined, nullptr, 0, 0, nullptr, nullptr, nullptr)
|
||||
OPTION(prefix_1, "verbose", verbose, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Verbose mode", nullptr, nullptr)
|
||||
OPTION(prefix_1, "version", version, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
@@ -156,6 +178,11 @@ OPTION(prefix_2, "v", v, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Display the version number", nullptr, nullptr)
|
||||
OPTION(prefix_1, "whole-archive", whole_archive, Flag, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Force load of all members in a static library", nullptr, nullptr)
|
||||
OPTION(prefix_1, "wrap=", wrap_eq, Joined, INVALID, wrap, nullptr, 0, 0,
|
||||
"Use wrapper functions for symbol", "<symbol>=<symbol>", nullptr)
|
||||
OPTION(prefix_1, "wrap", wrap, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, "<symbol>=<symbol>", nullptr)
|
||||
OPTION(prefix_2, "y", anonymous_9, JoinedOrSeparate, INVALID, trace_symbol, nullptr, 0, 0,
|
||||
"Alias for --trace-symbol", nullptr, nullptr)
|
||||
OPTION(prefix_2, "z", z, JoinedOrSeparate, INVALID, INVALID, nullptr, 0, 0,
|
||||
"Linker option extensions", "<option>", nullptr)
|
||||
#endif // OPTION
|
||||
|
||||
1
deps/lld/CMakeLists.txt
vendored
1
deps/lld/CMakeLists.txt
vendored
@@ -56,7 +56,6 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
||||
include(HandleLLVMOptions)
|
||||
|
||||
if(LLVM_INCLUDE_TESTS)
|
||||
set(Python_ADDITIONAL_VERSIONS 2.7)
|
||||
include(FindPythonInterp)
|
||||
if(NOT PYTHONINTERP_FOUND)
|
||||
message(FATAL_ERROR
|
||||
|
||||
1
deps/lld/COFF/CMakeLists.txt
vendored
1
deps/lld/COFF/CMakeLists.txt
vendored
@@ -8,6 +8,7 @@ endif()
|
||||
|
||||
add_lld_library(lldCOFF
|
||||
Chunks.cpp
|
||||
DebugTypes.cpp
|
||||
DLL.cpp
|
||||
Driver.cpp
|
||||
DriverUtils.cpp
|
||||
|
||||
839
deps/lld/COFF/Chunks.cpp
vendored
839
deps/lld/COFF/Chunks.cpp
vendored
File diff suppressed because it is too large
Load Diff
603
deps/lld/COFF/Chunks.h
vendored
603
deps/lld/COFF/Chunks.h
vendored
@@ -1,9 +1,8 @@
|
||||
//===- Chunks.h -------------------------------------------------*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Linker
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
@@ -14,6 +13,7 @@
|
||||
#include "InputFiles.h"
|
||||
#include "lld/Common/LLVM.h"
|
||||
#include "llvm/ADT/ArrayRef.h"
|
||||
#include "llvm/ADT/PointerIntPair.h"
|
||||
#include "llvm/ADT/iterator.h"
|
||||
#include "llvm/ADT/iterator_range.h"
|
||||
#include "llvm/MC/StringTableBuilder.h"
|
||||
@@ -40,10 +40,13 @@ class RuntimePseudoReloc;
|
||||
class Symbol;
|
||||
|
||||
// Mask for permissions (discardable, writable, readable, executable, etc).
|
||||
const uint32_t PermMask = 0xFE000000;
|
||||
const uint32_t permMask = 0xFE000000;
|
||||
|
||||
// Mask for section types (code, data, bss).
|
||||
const uint32_t TypeMask = 0x000000E0;
|
||||
const uint32_t typeMask = 0x000000E0;
|
||||
|
||||
// The log base 2 of the largest section alignment, which is log2(8192), or 13.
|
||||
enum : unsigned { Log2MaxSectionAlignment = 13 };
|
||||
|
||||
// A Chunk represents a chunk of data that will occupy space in the
|
||||
// output (if the resolver chose that). It may or may not be backed by
|
||||
@@ -51,81 +54,126 @@ const uint32_t TypeMask = 0x000000E0;
|
||||
// doesn't even have actual data (if common or bss).
|
||||
class Chunk {
|
||||
public:
|
||||
enum Kind { SectionKind, OtherKind };
|
||||
Kind kind() const { return ChunkKind; }
|
||||
virtual ~Chunk() = default;
|
||||
enum Kind : uint8_t { SectionKind, OtherKind, ImportThunkKind };
|
||||
Kind kind() const { return chunkKind; }
|
||||
|
||||
// Returns the size of this chunk (even if this is a common or BSS.)
|
||||
virtual size_t getSize() const = 0;
|
||||
size_t getSize() const;
|
||||
|
||||
// Returns chunk alignment in power of two form. Value values are powers of
|
||||
// two from 1 to 8192.
|
||||
uint32_t getAlignment() const { return 1U << p2Align; }
|
||||
|
||||
// Update the chunk section alignment measured in bytes. Internally alignment
|
||||
// is stored in log2.
|
||||
void setAlignment(uint32_t align) {
|
||||
// Treat zero byte alignment as 1 byte alignment.
|
||||
align = align ? align : 1;
|
||||
assert(llvm::isPowerOf2_32(align) && "alignment is not a power of 2");
|
||||
p2Align = llvm::Log2_32(align);
|
||||
assert(p2Align <= Log2MaxSectionAlignment &&
|
||||
"impossible requested alignment");
|
||||
}
|
||||
|
||||
// Write this chunk to a mmap'ed file, assuming Buf is pointing to
|
||||
// beginning of the file. Because this function may use RVA values
|
||||
// of other chunks for relocations, you need to set them properly
|
||||
// before calling this function.
|
||||
virtual void writeTo(uint8_t *Buf) const {}
|
||||
void writeTo(uint8_t *buf) const;
|
||||
|
||||
// Called by the writer once before assigning addresses and writing
|
||||
// the output.
|
||||
virtual void readRelocTargets() {}
|
||||
|
||||
// Called if restarting thunk addition.
|
||||
virtual void resetRelocTargets() {}
|
||||
|
||||
// Called by the writer after an RVA is assigned, but before calling
|
||||
// getSize().
|
||||
virtual void finalizeContents() {}
|
||||
|
||||
// The writer sets and uses the addresses.
|
||||
uint64_t getRVA() const { return RVA; }
|
||||
void setRVA(uint64_t V) { RVA = V; }
|
||||
|
||||
// Returns true if this has non-zero data. BSS chunks return
|
||||
// false. If false is returned, the space occupied by this chunk
|
||||
// will be filled with zeros.
|
||||
virtual bool hasData() const { return true; }
|
||||
// The writer sets and uses the addresses. In practice, PE images cannot be
|
||||
// larger than 2GB. Chunks are always laid as part of the image, so Chunk RVAs
|
||||
// can be stored with 32 bits.
|
||||
uint32_t getRVA() const { return rva; }
|
||||
void setRVA(uint64_t v) {
|
||||
rva = (uint32_t)v;
|
||||
assert(rva == v && "RVA truncated");
|
||||
}
|
||||
|
||||
// Returns readable/writable/executable bits.
|
||||
uint32_t getOutputCharacteristics() const;
|
||||
|
||||
// Returns the section name if this is a section chunk.
|
||||
// It is illegal to call this function on non-section chunks.
|
||||
StringRef getSectionName() const;
|
||||
|
||||
// An output section has pointers to chunks in the section, and each
|
||||
// chunk has a back pointer to an output section.
|
||||
void setOutputSectionIdx(uint16_t o) { osidx = o; }
|
||||
uint16_t getOutputSectionIdx() const { return osidx; }
|
||||
OutputSection *getOutputSection() const;
|
||||
|
||||
// Windows-specific.
|
||||
// Collect all locations that contain absolute addresses for base relocations.
|
||||
void getBaserels(std::vector<Baserel> *res);
|
||||
|
||||
// Returns a human-readable name of this chunk. Chunks are unnamed chunks of
|
||||
// bytes, so this is used only for logging or debugging.
|
||||
StringRef getDebugName() const;
|
||||
|
||||
// Return true if this file has the hotpatch flag set to true in the
|
||||
// S_COMPILE3 record in codeview debug info. Also returns true for some thunks
|
||||
// synthesized by the linker.
|
||||
bool isHotPatchable() const;
|
||||
|
||||
protected:
|
||||
Chunk(Kind k = OtherKind) : chunkKind(k), hasData(true), p2Align(0) {}
|
||||
|
||||
const Kind chunkKind;
|
||||
|
||||
public:
|
||||
// Returns true if this has non-zero data. BSS chunks return
|
||||
// false. If false is returned, the space occupied by this chunk
|
||||
// will be filled with zeros. Corresponds to the
|
||||
// IMAGE_SCN_CNT_UNINITIALIZED_DATA section characteristic bit.
|
||||
uint8_t hasData : 1;
|
||||
|
||||
public:
|
||||
// The alignment of this chunk, stored in log2 form. The writer uses the
|
||||
// value.
|
||||
uint8_t p2Align : 7;
|
||||
|
||||
// The output section index for this chunk. The first valid section number is
|
||||
// one.
|
||||
uint16_t osidx = 0;
|
||||
|
||||
// The RVA of this chunk in the output. The writer sets a value.
|
||||
uint32_t rva = 0;
|
||||
};
|
||||
|
||||
class NonSectionChunk : public Chunk {
|
||||
public:
|
||||
virtual ~NonSectionChunk() = default;
|
||||
|
||||
// Returns the size of this chunk (even if this is a common or BSS.)
|
||||
virtual size_t getSize() const = 0;
|
||||
|
||||
virtual uint32_t getOutputCharacteristics() const { return 0; }
|
||||
|
||||
// Write this chunk to a mmap'ed file, assuming Buf is pointing to
|
||||
// beginning of the file. Because this function may use RVA values
|
||||
// of other chunks for relocations, you need to set them properly
|
||||
// before calling this function.
|
||||
virtual void writeTo(uint8_t *buf) const {}
|
||||
|
||||
// Returns the section name if this is a section chunk.
|
||||
// It is illegal to call this function on non-section chunks.
|
||||
virtual StringRef getSectionName() const {
|
||||
llvm_unreachable("unimplemented getSectionName");
|
||||
}
|
||||
|
||||
// An output section has pointers to chunks in the section, and each
|
||||
// chunk has a back pointer to an output section.
|
||||
void setOutputSection(OutputSection *O) { Out = O; }
|
||||
OutputSection *getOutputSection() const { return Out; }
|
||||
|
||||
// Windows-specific.
|
||||
// Collect all locations that contain absolute addresses for base relocations.
|
||||
virtual void getBaserels(std::vector<Baserel> *Res) {}
|
||||
virtual void getBaserels(std::vector<Baserel> *res) {}
|
||||
|
||||
// Returns a human-readable name of this chunk. Chunks are unnamed chunks of
|
||||
// bytes, so this is used only for logging or debugging.
|
||||
virtual StringRef getDebugName() { return ""; }
|
||||
virtual StringRef getDebugName() const { return ""; }
|
||||
|
||||
// The alignment of this chunk. The writer uses the value.
|
||||
uint32_t Alignment = 1;
|
||||
static bool classof(const Chunk *c) { return c->kind() != SectionKind; }
|
||||
|
||||
protected:
|
||||
Chunk(Kind K = OtherKind) : ChunkKind(K) {}
|
||||
const Kind ChunkKind;
|
||||
|
||||
// The RVA of this chunk in the output. The writer sets a value.
|
||||
uint64_t RVA = 0;
|
||||
|
||||
// The output section for this chunk.
|
||||
OutputSection *Out = nullptr;
|
||||
|
||||
public:
|
||||
// The offset from beginning of the output section. The writer sets a value.
|
||||
uint64_t OutputSectionOff = 0;
|
||||
|
||||
// Whether this section needs to be kept distinct from other sections during
|
||||
// ICF. This is set by the driver using address-significance tables.
|
||||
bool KeepUnique = false;
|
||||
NonSectionChunk(Kind k = OtherKind) : Chunk(k) {}
|
||||
};
|
||||
|
||||
// A chunk corresponding a section of an input file.
|
||||
@@ -139,39 +187,41 @@ public:
|
||||
std::random_access_iterator_tag, Symbol *> {
|
||||
friend SectionChunk;
|
||||
|
||||
ObjFile *File;
|
||||
ObjFile *file;
|
||||
|
||||
symbol_iterator(ObjFile *File, const coff_relocation *I)
|
||||
: symbol_iterator::iterator_adaptor_base(I), File(File) {}
|
||||
symbol_iterator(ObjFile *file, const coff_relocation *i)
|
||||
: symbol_iterator::iterator_adaptor_base(i), file(file) {}
|
||||
|
||||
public:
|
||||
symbol_iterator() = default;
|
||||
|
||||
Symbol *operator*() const { return File->getSymbol(I->SymbolTableIndex); }
|
||||
Symbol *operator*() const { return file->getSymbol(I->SymbolTableIndex); }
|
||||
};
|
||||
|
||||
SectionChunk(ObjFile *File, const coff_section *Header);
|
||||
static bool classof(const Chunk *C) { return C->kind() == SectionKind; }
|
||||
void readRelocTargets() override;
|
||||
void resetRelocTargets() override;
|
||||
size_t getSize() const override { return Header->SizeOfRawData; }
|
||||
SectionChunk(ObjFile *file, const coff_section *header);
|
||||
static bool classof(const Chunk *c) { return c->kind() == SectionKind; }
|
||||
size_t getSize() const { return header->SizeOfRawData; }
|
||||
ArrayRef<uint8_t> getContents() const;
|
||||
void writeTo(uint8_t *Buf) const override;
|
||||
bool hasData() const override;
|
||||
uint32_t getOutputCharacteristics() const override;
|
||||
StringRef getSectionName() const override { return SectionName; }
|
||||
void getBaserels(std::vector<Baserel> *Res) override;
|
||||
bool isCOMDAT() const;
|
||||
void applyRelX64(uint8_t *Off, uint16_t Type, OutputSection *OS, uint64_t S,
|
||||
uint64_t P) const;
|
||||
void applyRelX86(uint8_t *Off, uint16_t Type, OutputSection *OS, uint64_t S,
|
||||
uint64_t P) const;
|
||||
void applyRelARM(uint8_t *Off, uint16_t Type, OutputSection *OS, uint64_t S,
|
||||
uint64_t P) const;
|
||||
void applyRelARM64(uint8_t *Off, uint16_t Type, OutputSection *OS, uint64_t S,
|
||||
uint64_t P) const;
|
||||
void writeTo(uint8_t *buf) const;
|
||||
|
||||
void getRuntimePseudoRelocs(std::vector<RuntimePseudoReloc> &Res);
|
||||
uint32_t getOutputCharacteristics() const {
|
||||
return header->Characteristics & (permMask | typeMask);
|
||||
}
|
||||
StringRef getSectionName() const {
|
||||
return StringRef(sectionNameData, sectionNameSize);
|
||||
}
|
||||
void getBaserels(std::vector<Baserel> *res);
|
||||
bool isCOMDAT() const;
|
||||
void applyRelX64(uint8_t *off, uint16_t type, OutputSection *os, uint64_t s,
|
||||
uint64_t p) const;
|
||||
void applyRelX86(uint8_t *off, uint16_t type, OutputSection *os, uint64_t s,
|
||||
uint64_t p) const;
|
||||
void applyRelARM(uint8_t *off, uint16_t type, OutputSection *os, uint64_t s,
|
||||
uint64_t p) const;
|
||||
void applyRelARM64(uint8_t *off, uint16_t type, OutputSection *os, uint64_t s,
|
||||
uint64_t p) const;
|
||||
|
||||
void getRuntimePseudoRelocs(std::vector<RuntimePseudoReloc> &res);
|
||||
|
||||
// Called if the garbage collector decides to not include this chunk
|
||||
// in a final output. It's supposed to print out a log message to stdout.
|
||||
@@ -179,69 +229,169 @@ public:
|
||||
|
||||
// Adds COMDAT associative sections to this COMDAT section. A chunk
|
||||
// and its children are treated as a group by the garbage collector.
|
||||
void addAssociative(SectionChunk *Child);
|
||||
void addAssociative(SectionChunk *child);
|
||||
|
||||
StringRef getDebugName() override;
|
||||
StringRef getDebugName() const;
|
||||
|
||||
// True if this is a codeview debug info chunk. These will not be laid out in
|
||||
// the image. Instead they will end up in the PDB, if one is requested.
|
||||
bool isCodeView() const {
|
||||
return SectionName == ".debug" || SectionName.startswith(".debug$");
|
||||
return getSectionName() == ".debug" || getSectionName().startswith(".debug$");
|
||||
}
|
||||
|
||||
// True if this is a DWARF debug info or exception handling chunk.
|
||||
bool isDWARF() const {
|
||||
return SectionName.startswith(".debug_") || SectionName == ".eh_frame";
|
||||
return getSectionName().startswith(".debug_") || getSectionName() == ".eh_frame";
|
||||
}
|
||||
|
||||
// Allow iteration over the bodies of this chunk's relocated symbols.
|
||||
llvm::iterator_range<symbol_iterator> symbols() const {
|
||||
return llvm::make_range(symbol_iterator(File, Relocs.begin()),
|
||||
symbol_iterator(File, Relocs.end()));
|
||||
return llvm::make_range(symbol_iterator(file, relocsData),
|
||||
symbol_iterator(file, relocsData + relocsSize));
|
||||
}
|
||||
|
||||
ArrayRef<coff_relocation> getRelocs() const {
|
||||
return llvm::makeArrayRef(relocsData, relocsSize);
|
||||
}
|
||||
|
||||
// Reloc setter used by ARM range extension thunk insertion.
|
||||
void setRelocs(ArrayRef<coff_relocation> newRelocs) {
|
||||
relocsData = newRelocs.data();
|
||||
relocsSize = newRelocs.size();
|
||||
assert(relocsSize == newRelocs.size() && "reloc size truncation");
|
||||
}
|
||||
|
||||
// Single linked list iterator for associated comdat children.
|
||||
class AssociatedIterator
|
||||
: public llvm::iterator_facade_base<
|
||||
AssociatedIterator, std::forward_iterator_tag, SectionChunk> {
|
||||
public:
|
||||
AssociatedIterator() = default;
|
||||
AssociatedIterator(SectionChunk *head) : cur(head) {}
|
||||
AssociatedIterator &operator=(const AssociatedIterator &r) {
|
||||
cur = r.cur;
|
||||
return *this;
|
||||
}
|
||||
bool operator==(const AssociatedIterator &r) const { return cur == r.cur; }
|
||||
const SectionChunk &operator*() const { return *cur; }
|
||||
SectionChunk &operator*() { return *cur; }
|
||||
AssociatedIterator &operator++() {
|
||||
cur = cur->assocChildren;
|
||||
return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
SectionChunk *cur = nullptr;
|
||||
};
|
||||
|
||||
// Allow iteration over the associated child chunks for this section.
|
||||
ArrayRef<SectionChunk *> children() const { return AssocChildren; }
|
||||
llvm::iterator_range<AssociatedIterator> children() const {
|
||||
return llvm::make_range(AssociatedIterator(assocChildren),
|
||||
AssociatedIterator(nullptr));
|
||||
}
|
||||
|
||||
// The section ID this chunk belongs to in its Obj.
|
||||
uint32_t getSectionNumber() const;
|
||||
|
||||
ArrayRef<uint8_t> consumeDebugMagic();
|
||||
|
||||
static ArrayRef<uint8_t> consumeDebugMagic(ArrayRef<uint8_t> data,
|
||||
StringRef sectionName);
|
||||
|
||||
static SectionChunk *findByName(ArrayRef<SectionChunk *> sections,
|
||||
StringRef name);
|
||||
|
||||
// The file that this chunk was created from.
|
||||
ObjFile *file;
|
||||
|
||||
// Pointer to the COFF section header in the input file.
|
||||
const coff_section *header;
|
||||
|
||||
// The COMDAT leader symbol if this is a COMDAT chunk.
|
||||
DefinedRegular *sym = nullptr;
|
||||
|
||||
// The CRC of the contents as described in the COFF spec 4.5.5.
|
||||
// Auxiliary Format 5: Section Definitions. Used for ICF.
|
||||
uint32_t checksum = 0;
|
||||
|
||||
// Used by the garbage collector.
|
||||
bool live;
|
||||
|
||||
// Whether this section needs to be kept distinct from other sections during
|
||||
// ICF. This is set by the driver using address-significance tables.
|
||||
bool keepUnique = false;
|
||||
|
||||
// The COMDAT selection if this is a COMDAT chunk.
|
||||
llvm::COFF::COMDATType selection = (llvm::COFF::COMDATType)0;
|
||||
|
||||
// A pointer pointing to a replacement for this chunk.
|
||||
// Initially it points to "this" object. If this chunk is merged
|
||||
// with other chunk by ICF, it points to another chunk,
|
||||
// and this chunk is considered as dead.
|
||||
SectionChunk *Repl;
|
||||
|
||||
// The CRC of the contents as described in the COFF spec 4.5.5.
|
||||
// Auxiliary Format 5: Section Definitions. Used for ICF.
|
||||
uint32_t Checksum = 0;
|
||||
|
||||
const coff_section *Header;
|
||||
|
||||
// The file that this chunk was created from.
|
||||
ObjFile *File;
|
||||
|
||||
// The COMDAT leader symbol if this is a COMDAT chunk.
|
||||
DefinedRegular *Sym = nullptr;
|
||||
|
||||
ArrayRef<coff_relocation> Relocs;
|
||||
|
||||
// Used by the garbage collector.
|
||||
bool Live;
|
||||
|
||||
// When inserting a thunk, we need to adjust a relocation to point to
|
||||
// the thunk instead of the actual original target Symbol.
|
||||
std::vector<Symbol *> RelocTargets;
|
||||
SectionChunk *repl;
|
||||
|
||||
private:
|
||||
StringRef SectionName;
|
||||
std::vector<SectionChunk *> AssocChildren;
|
||||
SectionChunk *assocChildren = nullptr;
|
||||
|
||||
// Used for ICF (Identical COMDAT Folding)
|
||||
void replace(SectionChunk *Other);
|
||||
uint32_t Class[2] = {0, 0};
|
||||
void replace(SectionChunk *other);
|
||||
uint32_t eqClass[2] = {0, 0};
|
||||
|
||||
// Relocations for this section. Size is stored below.
|
||||
const coff_relocation *relocsData;
|
||||
|
||||
// Section name string. Size is stored below.
|
||||
const char *sectionNameData;
|
||||
|
||||
uint32_t relocsSize = 0;
|
||||
uint32_t sectionNameSize = 0;
|
||||
};
|
||||
|
||||
// Inline methods to implement faux-virtual dispatch for SectionChunk.
|
||||
|
||||
inline size_t Chunk::getSize() const {
|
||||
if (isa<SectionChunk>(this))
|
||||
return static_cast<const SectionChunk *>(this)->getSize();
|
||||
else
|
||||
return static_cast<const NonSectionChunk *>(this)->getSize();
|
||||
}
|
||||
|
||||
inline uint32_t Chunk::getOutputCharacteristics() const {
|
||||
if (isa<SectionChunk>(this))
|
||||
return static_cast<const SectionChunk *>(this)->getOutputCharacteristics();
|
||||
else
|
||||
return static_cast<const NonSectionChunk *>(this)
|
||||
->getOutputCharacteristics();
|
||||
}
|
||||
|
||||
inline void Chunk::writeTo(uint8_t *buf) const {
|
||||
if (isa<SectionChunk>(this))
|
||||
static_cast<const SectionChunk *>(this)->writeTo(buf);
|
||||
else
|
||||
static_cast<const NonSectionChunk *>(this)->writeTo(buf);
|
||||
}
|
||||
|
||||
inline StringRef Chunk::getSectionName() const {
|
||||
if (isa<SectionChunk>(this))
|
||||
return static_cast<const SectionChunk *>(this)->getSectionName();
|
||||
else
|
||||
return static_cast<const NonSectionChunk *>(this)->getSectionName();
|
||||
}
|
||||
|
||||
inline void Chunk::getBaserels(std::vector<Baserel> *res) {
|
||||
if (isa<SectionChunk>(this))
|
||||
static_cast<SectionChunk *>(this)->getBaserels(res);
|
||||
else
|
||||
static_cast<NonSectionChunk *>(this)->getBaserels(res);
|
||||
}
|
||||
|
||||
inline StringRef Chunk::getDebugName() const {
|
||||
if (isa<SectionChunk>(this))
|
||||
return static_cast<const SectionChunk *>(this)->getDebugName();
|
||||
else
|
||||
return static_cast<const NonSectionChunk *>(this)->getDebugName();
|
||||
}
|
||||
|
||||
// This class is used to implement an lld-specific feature (not implemented in
|
||||
// MSVC) that minimizes the output size by finding string literals sharing tail
|
||||
// parts and merging them.
|
||||
@@ -251,60 +401,60 @@ private:
|
||||
// The MergeChunk then tail merges the strings using the StringTableBuilder
|
||||
// class and assigns RVAs and section offsets to each of the member chunks based
|
||||
// on the offsets assigned by the StringTableBuilder.
|
||||
class MergeChunk : public Chunk {
|
||||
class MergeChunk : public NonSectionChunk {
|
||||
public:
|
||||
MergeChunk(uint32_t Alignment);
|
||||
static void addSection(SectionChunk *C);
|
||||
void finalizeContents() override;
|
||||
MergeChunk(uint32_t alignment);
|
||||
static void addSection(SectionChunk *c);
|
||||
void finalizeContents();
|
||||
void assignSubsectionRVAs();
|
||||
|
||||
uint32_t getOutputCharacteristics() const override;
|
||||
StringRef getSectionName() const override { return ".rdata"; }
|
||||
size_t getSize() const override;
|
||||
void writeTo(uint8_t *Buf) const override;
|
||||
void writeTo(uint8_t *buf) const override;
|
||||
|
||||
static std::map<uint32_t, MergeChunk *> Instances;
|
||||
std::vector<SectionChunk *> Sections;
|
||||
static MergeChunk *instances[Log2MaxSectionAlignment + 1];
|
||||
std::vector<SectionChunk *> sections;
|
||||
|
||||
private:
|
||||
llvm::StringTableBuilder Builder;
|
||||
bool Finalized = false;
|
||||
llvm::StringTableBuilder builder;
|
||||
bool finalized = false;
|
||||
};
|
||||
|
||||
// A chunk for common symbols. Common chunks don't have actual data.
|
||||
class CommonChunk : public Chunk {
|
||||
class CommonChunk : public NonSectionChunk {
|
||||
public:
|
||||
CommonChunk(const COFFSymbolRef Sym);
|
||||
size_t getSize() const override { return Sym.getValue(); }
|
||||
bool hasData() const override { return false; }
|
||||
CommonChunk(const COFFSymbolRef sym);
|
||||
size_t getSize() const override { return sym.getValue(); }
|
||||
uint32_t getOutputCharacteristics() const override;
|
||||
StringRef getSectionName() const override { return ".bss"; }
|
||||
|
||||
private:
|
||||
const COFFSymbolRef Sym;
|
||||
const COFFSymbolRef sym;
|
||||
};
|
||||
|
||||
// A chunk for linker-created strings.
|
||||
class StringChunk : public Chunk {
|
||||
class StringChunk : public NonSectionChunk {
|
||||
public:
|
||||
explicit StringChunk(StringRef S) : Str(S) {}
|
||||
size_t getSize() const override { return Str.size() + 1; }
|
||||
void writeTo(uint8_t *Buf) const override;
|
||||
explicit StringChunk(StringRef s) : str(s) {}
|
||||
size_t getSize() const override { return str.size() + 1; }
|
||||
void writeTo(uint8_t *buf) const override;
|
||||
|
||||
private:
|
||||
StringRef Str;
|
||||
StringRef str;
|
||||
};
|
||||
|
||||
static const uint8_t ImportThunkX86[] = {
|
||||
static const uint8_t importThunkX86[] = {
|
||||
0xff, 0x25, 0x00, 0x00, 0x00, 0x00, // JMP *0x0
|
||||
};
|
||||
|
||||
static const uint8_t ImportThunkARM[] = {
|
||||
static const uint8_t importThunkARM[] = {
|
||||
0x40, 0xf2, 0x00, 0x0c, // mov.w ip, #0
|
||||
0xc0, 0xf2, 0x00, 0x0c, // mov.t ip, #0
|
||||
0xdc, 0xf8, 0x00, 0xf0, // ldr.w pc, [ip]
|
||||
};
|
||||
|
||||
static const uint8_t ImportThunkARM64[] = {
|
||||
static const uint8_t importThunkARM64[] = {
|
||||
0x10, 0x00, 0x00, 0x90, // adrp x16, #0
|
||||
0x10, 0x02, 0x40, 0xf9, // ldr x16, [x16]
|
||||
0x00, 0x02, 0x1f, 0xd6, // br x16
|
||||
@@ -313,87 +463,85 @@ static const uint8_t ImportThunkARM64[] = {
|
||||
// Windows-specific.
|
||||
// A chunk for DLL import jump table entry. In a final output, its
|
||||
// contents will be a JMP instruction to some __imp_ symbol.
|
||||
class ImportThunkChunkX64 : public Chunk {
|
||||
class ImportThunkChunk : public NonSectionChunk {
|
||||
public:
|
||||
explicit ImportThunkChunkX64(Defined *S);
|
||||
size_t getSize() const override { return sizeof(ImportThunkX86); }
|
||||
void writeTo(uint8_t *Buf) const override;
|
||||
ImportThunkChunk(Defined *s)
|
||||
: NonSectionChunk(ImportThunkKind), impSymbol(s) {}
|
||||
static bool classof(const Chunk *c) { return c->kind() == ImportThunkKind; }
|
||||
|
||||
private:
|
||||
Defined *ImpSymbol;
|
||||
protected:
|
||||
Defined *impSymbol;
|
||||
};
|
||||
|
||||
class ImportThunkChunkX86 : public Chunk {
|
||||
class ImportThunkChunkX64 : public ImportThunkChunk {
|
||||
public:
|
||||
explicit ImportThunkChunkX86(Defined *S) : ImpSymbol(S) {}
|
||||
size_t getSize() const override { return sizeof(ImportThunkX86); }
|
||||
void getBaserels(std::vector<Baserel> *Res) override;
|
||||
void writeTo(uint8_t *Buf) const override;
|
||||
|
||||
private:
|
||||
Defined *ImpSymbol;
|
||||
explicit ImportThunkChunkX64(Defined *s);
|
||||
size_t getSize() const override { return sizeof(importThunkX86); }
|
||||
void writeTo(uint8_t *buf) const override;
|
||||
};
|
||||
|
||||
class ImportThunkChunkARM : public Chunk {
|
||||
class ImportThunkChunkX86 : public ImportThunkChunk {
|
||||
public:
|
||||
explicit ImportThunkChunkARM(Defined *S) : ImpSymbol(S) {}
|
||||
size_t getSize() const override { return sizeof(ImportThunkARM); }
|
||||
void getBaserels(std::vector<Baserel> *Res) override;
|
||||
void writeTo(uint8_t *Buf) const override;
|
||||
|
||||
private:
|
||||
Defined *ImpSymbol;
|
||||
explicit ImportThunkChunkX86(Defined *s) : ImportThunkChunk(s) {}
|
||||
size_t getSize() const override { return sizeof(importThunkX86); }
|
||||
void getBaserels(std::vector<Baserel> *res) override;
|
||||
void writeTo(uint8_t *buf) const override;
|
||||
};
|
||||
|
||||
class ImportThunkChunkARM64 : public Chunk {
|
||||
class ImportThunkChunkARM : public ImportThunkChunk {
|
||||
public:
|
||||
explicit ImportThunkChunkARM64(Defined *S) : ImpSymbol(S) {}
|
||||
size_t getSize() const override { return sizeof(ImportThunkARM64); }
|
||||
void writeTo(uint8_t *Buf) const override;
|
||||
|
||||
private:
|
||||
Defined *ImpSymbol;
|
||||
explicit ImportThunkChunkARM(Defined *s) : ImportThunkChunk(s) {}
|
||||
size_t getSize() const override { return sizeof(importThunkARM); }
|
||||
void getBaserels(std::vector<Baserel> *res) override;
|
||||
void writeTo(uint8_t *buf) const override;
|
||||
};
|
||||
|
||||
class RangeExtensionThunkARM : public Chunk {
|
||||
class ImportThunkChunkARM64 : public ImportThunkChunk {
|
||||
public:
|
||||
explicit RangeExtensionThunkARM(Defined *T) : Target(T) {}
|
||||
explicit ImportThunkChunkARM64(Defined *s) : ImportThunkChunk(s) {}
|
||||
size_t getSize() const override { return sizeof(importThunkARM64); }
|
||||
void writeTo(uint8_t *buf) const override;
|
||||
};
|
||||
|
||||
class RangeExtensionThunkARM : public NonSectionChunk {
|
||||
public:
|
||||
explicit RangeExtensionThunkARM(Defined *t) : target(t) {}
|
||||
size_t getSize() const override;
|
||||
void writeTo(uint8_t *Buf) const override;
|
||||
void writeTo(uint8_t *buf) const override;
|
||||
|
||||
Defined *Target;
|
||||
Defined *target;
|
||||
};
|
||||
|
||||
class RangeExtensionThunkARM64 : public Chunk {
|
||||
class RangeExtensionThunkARM64 : public NonSectionChunk {
|
||||
public:
|
||||
explicit RangeExtensionThunkARM64(Defined *T) : Target(T) {}
|
||||
explicit RangeExtensionThunkARM64(Defined *t) : target(t) {}
|
||||
size_t getSize() const override;
|
||||
void writeTo(uint8_t *Buf) const override;
|
||||
void writeTo(uint8_t *buf) const override;
|
||||
|
||||
Defined *Target;
|
||||
Defined *target;
|
||||
};
|
||||
|
||||
// Windows-specific.
|
||||
// See comments for DefinedLocalImport class.
|
||||
class LocalImportChunk : public Chunk {
|
||||
class LocalImportChunk : public NonSectionChunk {
|
||||
public:
|
||||
explicit LocalImportChunk(Defined *S) : Sym(S) {
|
||||
Alignment = Config->Wordsize;
|
||||
explicit LocalImportChunk(Defined *s) : sym(s) {
|
||||
setAlignment(config->wordsize);
|
||||
}
|
||||
size_t getSize() const override;
|
||||
void getBaserels(std::vector<Baserel> *Res) override;
|
||||
void writeTo(uint8_t *Buf) const override;
|
||||
void getBaserels(std::vector<Baserel> *res) override;
|
||||
void writeTo(uint8_t *buf) const override;
|
||||
|
||||
private:
|
||||
Defined *Sym;
|
||||
Defined *sym;
|
||||
};
|
||||
|
||||
// Duplicate RVAs are not allowed in RVA tables, so unique symbols by chunk and
|
||||
// offset into the chunk. Order does not matter as the RVA table will be sorted
|
||||
// later.
|
||||
struct ChunkAndOffset {
|
||||
Chunk *InputChunk;
|
||||
uint32_t Offset;
|
||||
Chunk *inputChunk;
|
||||
uint32_t offset;
|
||||
|
||||
struct DenseMapInfo {
|
||||
static ChunkAndOffset getEmptyKey() {
|
||||
@@ -402,12 +550,12 @@ struct ChunkAndOffset {
|
||||
static ChunkAndOffset getTombstoneKey() {
|
||||
return {llvm::DenseMapInfo<Chunk *>::getTombstoneKey(), 0};
|
||||
}
|
||||
static unsigned getHashValue(const ChunkAndOffset &CO) {
|
||||
static unsigned getHashValue(const ChunkAndOffset &co) {
|
||||
return llvm::DenseMapInfo<std::pair<Chunk *, uint32_t>>::getHashValue(
|
||||
{CO.InputChunk, CO.Offset});
|
||||
{co.inputChunk, co.offset});
|
||||
}
|
||||
static bool isEqual(const ChunkAndOffset &LHS, const ChunkAndOffset &RHS) {
|
||||
return LHS.InputChunk == RHS.InputChunk && LHS.Offset == RHS.Offset;
|
||||
static bool isEqual(const ChunkAndOffset &lhs, const ChunkAndOffset &rhs) {
|
||||
return lhs.inputChunk == rhs.inputChunk && lhs.offset == rhs.offset;
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -415,48 +563,48 @@ struct ChunkAndOffset {
|
||||
using SymbolRVASet = llvm::DenseSet<ChunkAndOffset>;
|
||||
|
||||
// Table which contains symbol RVAs. Used for /safeseh and /guard:cf.
|
||||
class RVATableChunk : public Chunk {
|
||||
class RVATableChunk : public NonSectionChunk {
|
||||
public:
|
||||
explicit RVATableChunk(SymbolRVASet S) : Syms(std::move(S)) {}
|
||||
size_t getSize() const override { return Syms.size() * 4; }
|
||||
void writeTo(uint8_t *Buf) const override;
|
||||
explicit RVATableChunk(SymbolRVASet s) : syms(std::move(s)) {}
|
||||
size_t getSize() const override { return syms.size() * 4; }
|
||||
void writeTo(uint8_t *buf) const override;
|
||||
|
||||
private:
|
||||
SymbolRVASet Syms;
|
||||
SymbolRVASet syms;
|
||||
};
|
||||
|
||||
// Windows-specific.
|
||||
// This class represents a block in .reloc section.
|
||||
// See the PE/COFF spec 5.6 for details.
|
||||
class BaserelChunk : public Chunk {
|
||||
class BaserelChunk : public NonSectionChunk {
|
||||
public:
|
||||
BaserelChunk(uint32_t Page, Baserel *Begin, Baserel *End);
|
||||
size_t getSize() const override { return Data.size(); }
|
||||
void writeTo(uint8_t *Buf) const override;
|
||||
BaserelChunk(uint32_t page, Baserel *begin, Baserel *end);
|
||||
size_t getSize() const override { return data.size(); }
|
||||
void writeTo(uint8_t *buf) const override;
|
||||
|
||||
private:
|
||||
std::vector<uint8_t> Data;
|
||||
std::vector<uint8_t> data;
|
||||
};
|
||||
|
||||
class Baserel {
|
||||
public:
|
||||
Baserel(uint32_t V, uint8_t Ty) : RVA(V), Type(Ty) {}
|
||||
explicit Baserel(uint32_t V) : Baserel(V, getDefaultType()) {}
|
||||
Baserel(uint32_t v, uint8_t ty) : rva(v), type(ty) {}
|
||||
explicit Baserel(uint32_t v) : Baserel(v, getDefaultType()) {}
|
||||
uint8_t getDefaultType();
|
||||
|
||||
uint32_t RVA;
|
||||
uint8_t Type;
|
||||
uint32_t rva;
|
||||
uint8_t type;
|
||||
};
|
||||
|
||||
// This is a placeholder Chunk, to allow attaching a DefinedSynthetic to a
|
||||
// specific place in a section, without any data. This is used for the MinGW
|
||||
// specific symbol __RUNTIME_PSEUDO_RELOC_LIST_END__, even though the concept
|
||||
// of an empty chunk isn't MinGW specific.
|
||||
class EmptyChunk : public Chunk {
|
||||
class EmptyChunk : public NonSectionChunk {
|
||||
public:
|
||||
EmptyChunk() {}
|
||||
size_t getSize() const override { return 0; }
|
||||
void writeTo(uint8_t *Buf) const override {}
|
||||
void writeTo(uint8_t *buf) const override {}
|
||||
};
|
||||
|
||||
// MinGW specific, for the "automatic import of variables from DLLs" feature.
|
||||
@@ -465,17 +613,17 @@ public:
|
||||
// the reference didn't use the dllimport attribute. The MinGW runtime will
|
||||
// process this table after loading, before handling control over to user
|
||||
// code.
|
||||
class PseudoRelocTableChunk : public Chunk {
|
||||
class PseudoRelocTableChunk : public NonSectionChunk {
|
||||
public:
|
||||
PseudoRelocTableChunk(std::vector<RuntimePseudoReloc> &Relocs)
|
||||
: Relocs(std::move(Relocs)) {
|
||||
Alignment = 4;
|
||||
PseudoRelocTableChunk(std::vector<RuntimePseudoReloc> &relocs)
|
||||
: relocs(std::move(relocs)) {
|
||||
setAlignment(4);
|
||||
}
|
||||
size_t getSize() const override;
|
||||
void writeTo(uint8_t *Buf) const override;
|
||||
void writeTo(uint8_t *buf) const override;
|
||||
|
||||
private:
|
||||
std::vector<RuntimePseudoReloc> Relocs;
|
||||
std::vector<RuntimePseudoReloc> relocs;
|
||||
};
|
||||
|
||||
// MinGW specific; information about one individual location in the image
|
||||
@@ -483,37 +631,48 @@ private:
|
||||
// one individual element in the PseudoRelocTableChunk table.
|
||||
class RuntimePseudoReloc {
|
||||
public:
|
||||
RuntimePseudoReloc(Defined *Sym, SectionChunk *Target, uint32_t TargetOffset,
|
||||
int Flags)
|
||||
: Sym(Sym), Target(Target), TargetOffset(TargetOffset), Flags(Flags) {}
|
||||
RuntimePseudoReloc(Defined *sym, SectionChunk *target, uint32_t targetOffset,
|
||||
int flags)
|
||||
: sym(sym), target(target), targetOffset(targetOffset), flags(flags) {}
|
||||
|
||||
Defined *Sym;
|
||||
SectionChunk *Target;
|
||||
uint32_t TargetOffset;
|
||||
Defined *sym;
|
||||
SectionChunk *target;
|
||||
uint32_t targetOffset;
|
||||
// The Flags field contains the size of the relocation, in bits. No other
|
||||
// flags are currently defined.
|
||||
int Flags;
|
||||
int flags;
|
||||
};
|
||||
|
||||
// MinGW specific. A Chunk that contains one pointer-sized absolute value.
|
||||
class AbsolutePointerChunk : public Chunk {
|
||||
class AbsolutePointerChunk : public NonSectionChunk {
|
||||
public:
|
||||
AbsolutePointerChunk(uint64_t Value) : Value(Value) {
|
||||
Alignment = getSize();
|
||||
AbsolutePointerChunk(uint64_t value) : value(value) {
|
||||
setAlignment(getSize());
|
||||
}
|
||||
size_t getSize() const override;
|
||||
void writeTo(uint8_t *Buf) const override;
|
||||
void writeTo(uint8_t *buf) const override;
|
||||
|
||||
private:
|
||||
uint64_t Value;
|
||||
uint64_t value;
|
||||
};
|
||||
|
||||
void applyMOV32T(uint8_t *Off, uint32_t V);
|
||||
void applyBranch24T(uint8_t *Off, int32_t V);
|
||||
// Return true if this file has the hotpatch flag set to true in the S_COMPILE3
|
||||
// record in codeview debug info. Also returns true for some thunks synthesized
|
||||
// by the linker.
|
||||
inline bool Chunk::isHotPatchable() const {
|
||||
if (auto *sc = dyn_cast<SectionChunk>(this))
|
||||
return sc->file->hotPatchable;
|
||||
else if (isa<ImportThunkChunk>(this))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
void applyArm64Addr(uint8_t *Off, uint64_t S, uint64_t P, int Shift);
|
||||
void applyArm64Imm(uint8_t *Off, uint64_t Imm, uint32_t RangeLimit);
|
||||
void applyArm64Branch26(uint8_t *Off, int64_t V);
|
||||
void applyMOV32T(uint8_t *off, uint32_t v);
|
||||
void applyBranch24T(uint8_t *off, int32_t v);
|
||||
|
||||
void applyArm64Addr(uint8_t *off, uint64_t s, uint64_t p, int shift);
|
||||
void applyArm64Imm(uint8_t *off, uint64_t imm, uint32_t rangeLimit);
|
||||
void applyArm64Branch26(uint8_t *off, int64_t v);
|
||||
|
||||
} // namespace coff
|
||||
} // namespace lld
|
||||
|
||||
236
deps/lld/COFF/Config.h
vendored
236
deps/lld/COFF/Config.h
vendored
@@ -1,9 +1,8 @@
|
||||
//===- Config.h -------------------------------------------------*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Linker
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
@@ -29,6 +28,7 @@ class DefinedAbsolute;
|
||||
class DefinedRelative;
|
||||
class StringChunk;
|
||||
class Symbol;
|
||||
class InputFile;
|
||||
|
||||
// Short aliases.
|
||||
static const auto AMD64 = llvm::COFF::IMAGE_FILE_MACHINE_AMD64;
|
||||
@@ -38,30 +38,30 @@ static const auto I386 = llvm::COFF::IMAGE_FILE_MACHINE_I386;
|
||||
|
||||
// Represents an /export option.
|
||||
struct Export {
|
||||
StringRef Name; // N in /export:N or /export:E=N
|
||||
StringRef ExtName; // E in /export:E=N
|
||||
Symbol *Sym = nullptr;
|
||||
uint16_t Ordinal = 0;
|
||||
bool Noname = false;
|
||||
bool Data = false;
|
||||
bool Private = false;
|
||||
bool Constant = false;
|
||||
StringRef name; // N in /export:N or /export:E=N
|
||||
StringRef extName; // E in /export:E=N
|
||||
Symbol *sym = nullptr;
|
||||
uint16_t ordinal = 0;
|
||||
bool noname = false;
|
||||
bool data = false;
|
||||
bool isPrivate = false;
|
||||
bool constant = false;
|
||||
|
||||
// If an export is a form of /export:foo=dllname.bar, that means
|
||||
// that foo should be exported as an alias to bar in the DLL.
|
||||
// ForwardTo is set to "dllname.bar" part. Usually empty.
|
||||
StringRef ForwardTo;
|
||||
StringChunk *ForwardChunk = nullptr;
|
||||
// forwardTo is set to "dllname.bar" part. Usually empty.
|
||||
StringRef forwardTo;
|
||||
StringChunk *forwardChunk = nullptr;
|
||||
|
||||
// True if this /export option was in .drectves section.
|
||||
bool Directives = false;
|
||||
StringRef SymbolName;
|
||||
StringRef ExportName; // Name in DLL
|
||||
bool directives = false;
|
||||
StringRef symbolName;
|
||||
StringRef exportName; // Name in DLL
|
||||
|
||||
bool operator==(const Export &E) {
|
||||
return (Name == E.Name && ExtName == E.ExtName &&
|
||||
Ordinal == E.Ordinal && Noname == E.Noname &&
|
||||
Data == E.Data && Private == E.Private);
|
||||
bool operator==(const Export &e) {
|
||||
return (name == e.name && extName == e.extName &&
|
||||
ordinal == e.ordinal && noname == e.noname &&
|
||||
data == e.data && isPrivate == e.isPrivate);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -81,130 +81,150 @@ enum class GuardCFLevel {
|
||||
// Global configuration.
|
||||
struct Configuration {
|
||||
enum ManifestKind { SideBySide, Embed, No };
|
||||
bool is64() { return Machine == AMD64 || Machine == ARM64; }
|
||||
bool is64() { return machine == AMD64 || machine == ARM64; }
|
||||
|
||||
llvm::COFF::MachineTypes Machine = IMAGE_FILE_MACHINE_UNKNOWN;
|
||||
size_t Wordsize;
|
||||
bool Verbose = false;
|
||||
WindowsSubsystem Subsystem = llvm::COFF::IMAGE_SUBSYSTEM_UNKNOWN;
|
||||
Symbol *Entry = nullptr;
|
||||
bool NoEntry = false;
|
||||
std::string OutputFile;
|
||||
std::string ImportName;
|
||||
bool DoGC = true;
|
||||
bool DoICF = true;
|
||||
bool TailMerge;
|
||||
bool Relocatable = true;
|
||||
bool ForceMultiple = false;
|
||||
bool ForceUnresolved = false;
|
||||
bool Debug = false;
|
||||
bool DebugDwarf = false;
|
||||
bool DebugGHashes = false;
|
||||
bool DebugSymtab = false;
|
||||
bool ShowTiming = false;
|
||||
unsigned DebugTypes = static_cast<unsigned>(DebugType::None);
|
||||
std::vector<std::string> NatvisFiles;
|
||||
llvm::SmallString<128> PDBAltPath;
|
||||
llvm::SmallString<128> PDBPath;
|
||||
llvm::SmallString<128> PDBSourcePath;
|
||||
std::vector<llvm::StringRef> Argv;
|
||||
llvm::COFF::MachineTypes machine = IMAGE_FILE_MACHINE_UNKNOWN;
|
||||
size_t wordsize;
|
||||
bool verbose = false;
|
||||
WindowsSubsystem subsystem = llvm::COFF::IMAGE_SUBSYSTEM_UNKNOWN;
|
||||
Symbol *entry = nullptr;
|
||||
bool noEntry = false;
|
||||
std::string outputFile;
|
||||
std::string importName;
|
||||
bool demangle = true;
|
||||
bool doGC = true;
|
||||
bool doICF = true;
|
||||
bool tailMerge;
|
||||
bool relocatable = true;
|
||||
bool forceMultiple = false;
|
||||
bool forceMultipleRes = false;
|
||||
bool forceUnresolved = false;
|
||||
bool debug = false;
|
||||
bool debugDwarf = false;
|
||||
bool debugGHashes = false;
|
||||
bool debugSymtab = false;
|
||||
bool showTiming = false;
|
||||
bool showSummary = false;
|
||||
unsigned debugTypes = static_cast<unsigned>(DebugType::None);
|
||||
std::vector<std::string> natvisFiles;
|
||||
llvm::SmallString<128> pdbAltPath;
|
||||
llvm::SmallString<128> pdbPath;
|
||||
llvm::SmallString<128> pdbSourcePath;
|
||||
std::vector<llvm::StringRef> argv;
|
||||
|
||||
// Symbols in this set are considered as live by the garbage collector.
|
||||
std::vector<Symbol *> GCRoot;
|
||||
std::vector<Symbol *> gcroot;
|
||||
|
||||
std::set<StringRef> NoDefaultLibs;
|
||||
bool NoDefaultLibAll = false;
|
||||
std::set<std::string> noDefaultLibs;
|
||||
bool noDefaultLibAll = false;
|
||||
|
||||
// True if we are creating a DLL.
|
||||
bool DLL = false;
|
||||
StringRef Implib;
|
||||
std::vector<Export> Exports;
|
||||
std::set<std::string> DelayLoads;
|
||||
std::map<std::string, int> DLLOrder;
|
||||
Symbol *DelayLoadHelper = nullptr;
|
||||
bool dll = false;
|
||||
StringRef implib;
|
||||
std::vector<Export> exports;
|
||||
std::set<std::string> delayLoads;
|
||||
std::map<std::string, int> dllOrder;
|
||||
Symbol *delayLoadHelper = nullptr;
|
||||
|
||||
bool SaveTemps = false;
|
||||
bool saveTemps = false;
|
||||
|
||||
// /guard:cf
|
||||
GuardCFLevel GuardCF = GuardCFLevel::Off;
|
||||
GuardCFLevel guardCF = GuardCFLevel::Off;
|
||||
|
||||
// Used for SafeSEH.
|
||||
Symbol *SEHTable = nullptr;
|
||||
Symbol *SEHCount = nullptr;
|
||||
bool safeSEH = false;
|
||||
Symbol *sehTable = nullptr;
|
||||
Symbol *sehCount = nullptr;
|
||||
|
||||
// Used for /opt:lldlto=N
|
||||
unsigned LTOO = 2;
|
||||
unsigned ltoo = 2;
|
||||
|
||||
// Used for /opt:lldltojobs=N
|
||||
unsigned ThinLTOJobs = 0;
|
||||
unsigned thinLTOJobs = 0;
|
||||
// Used for /opt:lldltopartitions=N
|
||||
unsigned LTOPartitions = 1;
|
||||
unsigned ltoPartitions = 1;
|
||||
|
||||
// Used for /opt:lldltocache=path
|
||||
StringRef LTOCache;
|
||||
StringRef ltoCache;
|
||||
// Used for /opt:lldltocachepolicy=policy
|
||||
llvm::CachePruningPolicy LTOCachePolicy;
|
||||
llvm::CachePruningPolicy ltoCachePolicy;
|
||||
|
||||
// Used for /merge:from=to (e.g. /merge:.rdata=.text)
|
||||
std::map<StringRef, StringRef> Merge;
|
||||
std::map<StringRef, StringRef> merge;
|
||||
|
||||
// Used for /section=.name,{DEKPRSW} to set section attributes.
|
||||
std::map<StringRef, uint32_t> Section;
|
||||
std::map<StringRef, uint32_t> section;
|
||||
|
||||
// Options for manifest files.
|
||||
ManifestKind Manifest = No;
|
||||
int ManifestID = 1;
|
||||
StringRef ManifestDependency;
|
||||
bool ManifestUAC = true;
|
||||
std::vector<std::string> ManifestInput;
|
||||
StringRef ManifestLevel = "'asInvoker'";
|
||||
StringRef ManifestUIAccess = "'false'";
|
||||
StringRef ManifestFile;
|
||||
ManifestKind manifest = No;
|
||||
int manifestID = 1;
|
||||
StringRef manifestDependency;
|
||||
bool manifestUAC = true;
|
||||
std::vector<std::string> manifestInput;
|
||||
StringRef manifestLevel = "'asInvoker'";
|
||||
StringRef manifestUIAccess = "'false'";
|
||||
StringRef manifestFile;
|
||||
|
||||
// Used for /aligncomm.
|
||||
std::map<std::string, int> AlignComm;
|
||||
std::map<std::string, int> alignComm;
|
||||
|
||||
// Used for /failifmismatch.
|
||||
std::map<StringRef, StringRef> MustMatch;
|
||||
std::map<StringRef, std::pair<StringRef, InputFile *>> mustMatch;
|
||||
|
||||
// Used for /alternatename.
|
||||
std::map<StringRef, StringRef> AlternateNames;
|
||||
std::map<StringRef, StringRef> alternateNames;
|
||||
|
||||
// Used for /order.
|
||||
llvm::StringMap<int> Order;
|
||||
llvm::StringMap<int> order;
|
||||
|
||||
// Used for /lldmap.
|
||||
std::string MapFile;
|
||||
std::string mapFile;
|
||||
|
||||
uint64_t ImageBase = -1;
|
||||
uint64_t StackReserve = 1024 * 1024;
|
||||
uint64_t StackCommit = 4096;
|
||||
uint64_t HeapReserve = 1024 * 1024;
|
||||
uint64_t HeapCommit = 4096;
|
||||
uint32_t MajorImageVersion = 0;
|
||||
uint32_t MinorImageVersion = 0;
|
||||
uint32_t MajorOSVersion = 6;
|
||||
uint32_t MinorOSVersion = 0;
|
||||
uint32_t Timestamp = 0;
|
||||
bool DynamicBase = true;
|
||||
bool AllowBind = true;
|
||||
bool NxCompat = true;
|
||||
bool AllowIsolation = true;
|
||||
bool TerminalServerAware = true;
|
||||
bool LargeAddressAware = false;
|
||||
bool HighEntropyVA = false;
|
||||
bool AppContainer = false;
|
||||
bool MinGW = false;
|
||||
bool WarnMissingOrderSymbol = true;
|
||||
bool WarnLocallyDefinedImported = true;
|
||||
bool WarnDebugInfoUnusable = true;
|
||||
bool Incremental = true;
|
||||
bool IntegrityCheck = false;
|
||||
bool KillAt = false;
|
||||
bool Repro = false;
|
||||
// Used for /thinlto-index-only:
|
||||
llvm::StringRef thinLTOIndexOnlyArg;
|
||||
|
||||
// Used for /thinlto-object-prefix-replace:
|
||||
std::pair<llvm::StringRef, llvm::StringRef> thinLTOPrefixReplace;
|
||||
|
||||
// Used for /thinlto-object-suffix-replace:
|
||||
std::pair<llvm::StringRef, llvm::StringRef> thinLTOObjectSuffixReplace;
|
||||
|
||||
uint64_t align = 4096;
|
||||
uint64_t imageBase = -1;
|
||||
uint64_t fileAlign = 512;
|
||||
uint64_t stackReserve = 1024 * 1024;
|
||||
uint64_t stackCommit = 4096;
|
||||
uint64_t heapReserve = 1024 * 1024;
|
||||
uint64_t heapCommit = 4096;
|
||||
uint32_t majorImageVersion = 0;
|
||||
uint32_t minorImageVersion = 0;
|
||||
uint32_t majorOSVersion = 6;
|
||||
uint32_t minorOSVersion = 0;
|
||||
uint32_t timestamp = 0;
|
||||
uint32_t functionPadMin = 0;
|
||||
bool dynamicBase = true;
|
||||
bool allowBind = true;
|
||||
bool nxCompat = true;
|
||||
bool allowIsolation = true;
|
||||
bool terminalServerAware = true;
|
||||
bool largeAddressAware = false;
|
||||
bool highEntropyVA = false;
|
||||
bool appContainer = false;
|
||||
bool mingw = false;
|
||||
bool warnMissingOrderSymbol = true;
|
||||
bool warnLocallyDefinedImported = true;
|
||||
bool warnDebugInfoUnusable = true;
|
||||
bool incremental = true;
|
||||
bool integrityCheck = false;
|
||||
bool killAt = false;
|
||||
bool repro = false;
|
||||
bool swaprunCD = false;
|
||||
bool swaprunNet = false;
|
||||
bool thinLTOEmitImportsFiles;
|
||||
bool thinLTOIndexOnly;
|
||||
};
|
||||
|
||||
extern Configuration *Config;
|
||||
extern Configuration *config;
|
||||
|
||||
} // namespace coff
|
||||
} // namespace lld
|
||||
|
||||
697
deps/lld/COFF/DLL.cpp
vendored
697
deps/lld/COFF/DLL.cpp
vendored
@@ -1,9 +1,8 @@
|
||||
//===- DLL.cpp ------------------------------------------------------------===//
|
||||
//
|
||||
// The LLVM Linker
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
@@ -36,161 +35,167 @@ namespace {
|
||||
// Import table
|
||||
|
||||
// A chunk for the import descriptor table.
|
||||
class HintNameChunk : public Chunk {
|
||||
class HintNameChunk : public NonSectionChunk {
|
||||
public:
|
||||
HintNameChunk(StringRef N, uint16_t H) : Name(N), Hint(H) {}
|
||||
HintNameChunk(StringRef n, uint16_t h) : name(n), hint(h) {}
|
||||
|
||||
size_t getSize() const override {
|
||||
// Starts with 2 byte Hint field, followed by a null-terminated string,
|
||||
// ends with 0 or 1 byte padding.
|
||||
return alignTo(Name.size() + 3, 2);
|
||||
return alignTo(name.size() + 3, 2);
|
||||
}
|
||||
|
||||
void writeTo(uint8_t *Buf) const override {
|
||||
memset(Buf + OutputSectionOff, 0, getSize());
|
||||
write16le(Buf + OutputSectionOff, Hint);
|
||||
memcpy(Buf + OutputSectionOff + 2, Name.data(), Name.size());
|
||||
void writeTo(uint8_t *buf) const override {
|
||||
memset(buf, 0, getSize());
|
||||
write16le(buf, hint);
|
||||
memcpy(buf + 2, name.data(), name.size());
|
||||
}
|
||||
|
||||
private:
|
||||
StringRef Name;
|
||||
uint16_t Hint;
|
||||
StringRef name;
|
||||
uint16_t hint;
|
||||
};
|
||||
|
||||
// A chunk for the import descriptor table.
|
||||
class LookupChunk : public Chunk {
|
||||
class LookupChunk : public NonSectionChunk {
|
||||
public:
|
||||
explicit LookupChunk(Chunk *C) : HintName(C) { Alignment = Config->Wordsize; }
|
||||
size_t getSize() const override { return Config->Wordsize; }
|
||||
explicit LookupChunk(Chunk *c) : hintName(c) {
|
||||
setAlignment(config->wordsize);
|
||||
}
|
||||
size_t getSize() const override { return config->wordsize; }
|
||||
|
||||
void writeTo(uint8_t *Buf) const override {
|
||||
if (Config->is64())
|
||||
write64le(Buf + OutputSectionOff, HintName->getRVA());
|
||||
void writeTo(uint8_t *buf) const override {
|
||||
if (config->is64())
|
||||
write64le(buf, hintName->getRVA());
|
||||
else
|
||||
write32le(Buf + OutputSectionOff, HintName->getRVA());
|
||||
write32le(buf, hintName->getRVA());
|
||||
}
|
||||
|
||||
Chunk *HintName;
|
||||
Chunk *hintName;
|
||||
};
|
||||
|
||||
// A chunk for the import descriptor table.
|
||||
// This chunk represent import-by-ordinal symbols.
|
||||
// See Microsoft PE/COFF spec 7.1. Import Header for details.
|
||||
class OrdinalOnlyChunk : public Chunk {
|
||||
class OrdinalOnlyChunk : public NonSectionChunk {
|
||||
public:
|
||||
explicit OrdinalOnlyChunk(uint16_t V) : Ordinal(V) {
|
||||
Alignment = Config->Wordsize;
|
||||
explicit OrdinalOnlyChunk(uint16_t v) : ordinal(v) {
|
||||
setAlignment(config->wordsize);
|
||||
}
|
||||
size_t getSize() const override { return Config->Wordsize; }
|
||||
size_t getSize() const override { return config->wordsize; }
|
||||
|
||||
void writeTo(uint8_t *Buf) const override {
|
||||
void writeTo(uint8_t *buf) const override {
|
||||
// An import-by-ordinal slot has MSB 1 to indicate that
|
||||
// this is import-by-ordinal (and not import-by-name).
|
||||
if (Config->is64()) {
|
||||
write64le(Buf + OutputSectionOff, (1ULL << 63) | Ordinal);
|
||||
if (config->is64()) {
|
||||
write64le(buf, (1ULL << 63) | ordinal);
|
||||
} else {
|
||||
write32le(Buf + OutputSectionOff, (1ULL << 31) | Ordinal);
|
||||
write32le(buf, (1ULL << 31) | ordinal);
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t Ordinal;
|
||||
uint16_t ordinal;
|
||||
};
|
||||
|
||||
// A chunk for the import descriptor table.
|
||||
class ImportDirectoryChunk : public Chunk {
|
||||
class ImportDirectoryChunk : public NonSectionChunk {
|
||||
public:
|
||||
explicit ImportDirectoryChunk(Chunk *N) : DLLName(N) {}
|
||||
explicit ImportDirectoryChunk(Chunk *n) : dllName(n) {}
|
||||
size_t getSize() const override { return sizeof(ImportDirectoryTableEntry); }
|
||||
|
||||
void writeTo(uint8_t *Buf) const override {
|
||||
memset(Buf + OutputSectionOff, 0, getSize());
|
||||
void writeTo(uint8_t *buf) const override {
|
||||
memset(buf, 0, getSize());
|
||||
|
||||
auto *E = (coff_import_directory_table_entry *)(Buf + OutputSectionOff);
|
||||
E->ImportLookupTableRVA = LookupTab->getRVA();
|
||||
E->NameRVA = DLLName->getRVA();
|
||||
E->ImportAddressTableRVA = AddressTab->getRVA();
|
||||
auto *e = (coff_import_directory_table_entry *)(buf);
|
||||
e->ImportLookupTableRVA = lookupTab->getRVA();
|
||||
e->NameRVA = dllName->getRVA();
|
||||
e->ImportAddressTableRVA = addressTab->getRVA();
|
||||
}
|
||||
|
||||
Chunk *DLLName;
|
||||
Chunk *LookupTab;
|
||||
Chunk *AddressTab;
|
||||
Chunk *dllName;
|
||||
Chunk *lookupTab;
|
||||
Chunk *addressTab;
|
||||
};
|
||||
|
||||
// A chunk representing null terminator in the import table.
|
||||
// Contents of this chunk is always null bytes.
|
||||
class NullChunk : public Chunk {
|
||||
class NullChunk : public NonSectionChunk {
|
||||
public:
|
||||
explicit NullChunk(size_t N) : Size(N) {}
|
||||
bool hasData() const override { return false; }
|
||||
size_t getSize() const override { return Size; }
|
||||
explicit NullChunk(size_t n) : size(n) { hasData = false; }
|
||||
size_t getSize() const override { return size; }
|
||||
|
||||
void writeTo(uint8_t *Buf) const override {
|
||||
memset(Buf + OutputSectionOff, 0, Size);
|
||||
void writeTo(uint8_t *buf) const override {
|
||||
memset(buf, 0, size);
|
||||
}
|
||||
|
||||
private:
|
||||
size_t Size;
|
||||
size_t size;
|
||||
};
|
||||
|
||||
static std::vector<std::vector<DefinedImportData *>>
|
||||
binImports(const std::vector<DefinedImportData *> &Imports) {
|
||||
binImports(const std::vector<DefinedImportData *> &imports) {
|
||||
// Group DLL-imported symbols by DLL name because that's how
|
||||
// symbols are layed out in the import descriptor table.
|
||||
auto Less = [](const std::string &A, const std::string &B) {
|
||||
return Config->DLLOrder[A] < Config->DLLOrder[B];
|
||||
auto less = [](const std::string &a, const std::string &b) {
|
||||
return config->dllOrder[a] < config->dllOrder[b];
|
||||
};
|
||||
std::map<std::string, std::vector<DefinedImportData *>,
|
||||
bool(*)(const std::string &, const std::string &)> M(Less);
|
||||
for (DefinedImportData *Sym : Imports)
|
||||
M[Sym->getDLLName().lower()].push_back(Sym);
|
||||
bool(*)(const std::string &, const std::string &)> m(less);
|
||||
for (DefinedImportData *sym : imports)
|
||||
m[sym->getDLLName().lower()].push_back(sym);
|
||||
|
||||
std::vector<std::vector<DefinedImportData *>> V;
|
||||
for (auto &KV : M) {
|
||||
std::vector<std::vector<DefinedImportData *>> v;
|
||||
for (auto &kv : m) {
|
||||
// Sort symbols by name for each group.
|
||||
std::vector<DefinedImportData *> &Syms = KV.second;
|
||||
std::sort(Syms.begin(), Syms.end(),
|
||||
[](DefinedImportData *A, DefinedImportData *B) {
|
||||
return A->getName() < B->getName();
|
||||
std::vector<DefinedImportData *> &syms = kv.second;
|
||||
std::sort(syms.begin(), syms.end(),
|
||||
[](DefinedImportData *a, DefinedImportData *b) {
|
||||
return a->getName() < b->getName();
|
||||
});
|
||||
V.push_back(std::move(Syms));
|
||||
v.push_back(std::move(syms));
|
||||
}
|
||||
return V;
|
||||
return v;
|
||||
}
|
||||
|
||||
// Export table
|
||||
// See Microsoft PE/COFF spec 4.3 for details.
|
||||
|
||||
// A chunk for the delay import descriptor table etnry.
|
||||
class DelayDirectoryChunk : public Chunk {
|
||||
class DelayDirectoryChunk : public NonSectionChunk {
|
||||
public:
|
||||
explicit DelayDirectoryChunk(Chunk *N) : DLLName(N) {}
|
||||
explicit DelayDirectoryChunk(Chunk *n) : dllName(n) {}
|
||||
|
||||
size_t getSize() const override {
|
||||
return sizeof(delay_import_directory_table_entry);
|
||||
}
|
||||
|
||||
void writeTo(uint8_t *Buf) const override {
|
||||
memset(Buf + OutputSectionOff, 0, getSize());
|
||||
void writeTo(uint8_t *buf) const override {
|
||||
memset(buf, 0, getSize());
|
||||
|
||||
auto *E = (delay_import_directory_table_entry *)(Buf + OutputSectionOff);
|
||||
E->Attributes = 1;
|
||||
E->Name = DLLName->getRVA();
|
||||
E->ModuleHandle = ModuleHandle->getRVA();
|
||||
E->DelayImportAddressTable = AddressTab->getRVA();
|
||||
E->DelayImportNameTable = NameTab->getRVA();
|
||||
auto *e = (delay_import_directory_table_entry *)(buf);
|
||||
e->Attributes = 1;
|
||||
e->Name = dllName->getRVA();
|
||||
e->ModuleHandle = moduleHandle->getRVA();
|
||||
e->DelayImportAddressTable = addressTab->getRVA();
|
||||
e->DelayImportNameTable = nameTab->getRVA();
|
||||
}
|
||||
|
||||
Chunk *DLLName;
|
||||
Chunk *ModuleHandle;
|
||||
Chunk *AddressTab;
|
||||
Chunk *NameTab;
|
||||
Chunk *dllName;
|
||||
Chunk *moduleHandle;
|
||||
Chunk *addressTab;
|
||||
Chunk *nameTab;
|
||||
};
|
||||
|
||||
// Initial contents for delay-loaded functions.
|
||||
// This code calls __delayLoadHelper2 function to resolve a symbol
|
||||
// and then overwrites its jump table slot with the result
|
||||
// for subsequent function calls.
|
||||
static const uint8_t ThunkX64[] = {
|
||||
static const uint8_t thunkX64[] = {
|
||||
0x48, 0x8D, 0x05, 0, 0, 0, 0, // lea rax, [__imp_<FUNCNAME>]
|
||||
0xE9, 0, 0, 0, 0, // jmp __tailMerge_<lib>
|
||||
};
|
||||
|
||||
static const uint8_t tailMergeX64[] = {
|
||||
0x51, // push rcx
|
||||
0x52, // push rdx
|
||||
0x41, 0x50, // push r8
|
||||
@@ -200,7 +205,7 @@ static const uint8_t ThunkX64[] = {
|
||||
0x66, 0x0F, 0x7F, 0x4C, 0x24, 0x10, // movdqa xmmword ptr [rsp+10h], xmm1
|
||||
0x66, 0x0F, 0x7F, 0x54, 0x24, 0x20, // movdqa xmmword ptr [rsp+20h], xmm2
|
||||
0x66, 0x0F, 0x7F, 0x5C, 0x24, 0x30, // movdqa xmmword ptr [rsp+30h], xmm3
|
||||
0x48, 0x8D, 0x15, 0, 0, 0, 0, // lea rdx, [__imp_<FUNCNAME>]
|
||||
0x48, 0x8B, 0xD0, // mov rdx, rax
|
||||
0x48, 0x8D, 0x0D, 0, 0, 0, 0, // lea rcx, [___DELAY_IMPORT_...]
|
||||
0xE8, 0, 0, 0, 0, // call __delayLoadHelper2
|
||||
0x66, 0x0F, 0x6F, 0x04, 0x24, // movdqa xmm0, xmmword ptr [rsp]
|
||||
@@ -215,10 +220,15 @@ static const uint8_t ThunkX64[] = {
|
||||
0xFF, 0xE0, // jmp rax
|
||||
};
|
||||
|
||||
static const uint8_t ThunkX86[] = {
|
||||
static const uint8_t thunkX86[] = {
|
||||
0xB8, 0, 0, 0, 0, // mov eax, offset ___imp__<FUNCNAME>
|
||||
0xE9, 0, 0, 0, 0, // jmp __tailMerge_<lib>
|
||||
};
|
||||
|
||||
static const uint8_t tailMergeX86[] = {
|
||||
0x51, // push ecx
|
||||
0x52, // push edx
|
||||
0x68, 0, 0, 0, 0, // push offset ___imp__<FUNCNAME>
|
||||
0x50, // push eax
|
||||
0x68, 0, 0, 0, 0, // push offset ___DELAY_IMPORT_DESCRIPTOR_<DLLNAME>_dll
|
||||
0xE8, 0, 0, 0, 0, // call ___delayLoadHelper2@8
|
||||
0x5A, // pop edx
|
||||
@@ -226,9 +236,13 @@ static const uint8_t ThunkX86[] = {
|
||||
0xFF, 0xE0, // jmp eax
|
||||
};
|
||||
|
||||
static const uint8_t ThunkARM[] = {
|
||||
static const uint8_t thunkARM[] = {
|
||||
0x40, 0xf2, 0x00, 0x0c, // mov.w ip, #0 __imp_<FUNCNAME>
|
||||
0xc0, 0xf2, 0x00, 0x0c, // mov.t ip, #0 __imp_<FUNCNAME>
|
||||
0x00, 0xf0, 0x00, 0xb8, // b.w __tailMerge_<lib>
|
||||
};
|
||||
|
||||
static const uint8_t tailMergeARM[] = {
|
||||
0x2d, 0xe9, 0x0f, 0x48, // push.w {r0, r1, r2, r3, r11, lr}
|
||||
0x0d, 0xf2, 0x10, 0x0b, // addw r11, sp, #16
|
||||
0x2d, 0xed, 0x10, 0x0b, // vpush {d0, d1, d2, d3, d4, d5, d6, d7}
|
||||
@@ -242,9 +256,13 @@ static const uint8_t ThunkARM[] = {
|
||||
0x60, 0x47, // bx ip
|
||||
};
|
||||
|
||||
static const uint8_t ThunkARM64[] = {
|
||||
static const uint8_t thunkARM64[] = {
|
||||
0x11, 0x00, 0x00, 0x90, // adrp x17, #0 __imp_<FUNCNAME>
|
||||
0x31, 0x02, 0x00, 0x91, // add x17, x17, #0 :lo12:__imp_<FUNCNAME>
|
||||
0x00, 0x00, 0x00, 0x14, // b __tailMerge_<lib>
|
||||
};
|
||||
|
||||
static const uint8_t tailMergeARM64[] = {
|
||||
0xfd, 0x7b, 0xb3, 0xa9, // stp x29, x30, [sp, #-208]!
|
||||
0xfd, 0x03, 0x00, 0x91, // mov x29, sp
|
||||
0xe0, 0x07, 0x01, 0xa9, // stp x0, x1, [sp, #16]
|
||||
@@ -273,372 +291,445 @@ static const uint8_t ThunkARM64[] = {
|
||||
};
|
||||
|
||||
// A chunk for the delay import thunk.
|
||||
class ThunkChunkX64 : public Chunk {
|
||||
class ThunkChunkX64 : public NonSectionChunk {
|
||||
public:
|
||||
ThunkChunkX64(Defined *I, Chunk *D, Defined *H)
|
||||
: Imp(I), Desc(D), Helper(H) {}
|
||||
ThunkChunkX64(Defined *i, Chunk *tm) : imp(i), tailMerge(tm) {}
|
||||
|
||||
size_t getSize() const override { return sizeof(ThunkX64); }
|
||||
size_t getSize() const override { return sizeof(thunkX64); }
|
||||
|
||||
void writeTo(uint8_t *Buf) const override {
|
||||
memcpy(Buf + OutputSectionOff, ThunkX64, sizeof(ThunkX64));
|
||||
write32le(Buf + OutputSectionOff + 36, Imp->getRVA() - RVA - 40);
|
||||
write32le(Buf + OutputSectionOff + 43, Desc->getRVA() - RVA - 47);
|
||||
write32le(Buf + OutputSectionOff + 48, Helper->getRVA() - RVA - 52);
|
||||
void writeTo(uint8_t *buf) const override {
|
||||
memcpy(buf, thunkX64, sizeof(thunkX64));
|
||||
write32le(buf + 3, imp->getRVA() - rva - 7);
|
||||
write32le(buf + 8, tailMerge->getRVA() - rva - 12);
|
||||
}
|
||||
|
||||
Defined *Imp = nullptr;
|
||||
Chunk *Desc = nullptr;
|
||||
Defined *Helper = nullptr;
|
||||
Defined *imp = nullptr;
|
||||
Chunk *tailMerge = nullptr;
|
||||
};
|
||||
|
||||
class ThunkChunkX86 : public Chunk {
|
||||
class TailMergeChunkX64 : public NonSectionChunk {
|
||||
public:
|
||||
ThunkChunkX86(Defined *I, Chunk *D, Defined *H)
|
||||
: Imp(I), Desc(D), Helper(H) {}
|
||||
TailMergeChunkX64(Chunk *d, Defined *h) : desc(d), helper(h) {}
|
||||
|
||||
size_t getSize() const override { return sizeof(ThunkX86); }
|
||||
size_t getSize() const override { return sizeof(tailMergeX64); }
|
||||
|
||||
void writeTo(uint8_t *Buf) const override {
|
||||
memcpy(Buf + OutputSectionOff, ThunkX86, sizeof(ThunkX86));
|
||||
write32le(Buf + OutputSectionOff + 3, Imp->getRVA() + Config->ImageBase);
|
||||
write32le(Buf + OutputSectionOff + 8, Desc->getRVA() + Config->ImageBase);
|
||||
write32le(Buf + OutputSectionOff + 13, Helper->getRVA() - RVA - 17);
|
||||
void writeTo(uint8_t *buf) const override {
|
||||
memcpy(buf, tailMergeX64, sizeof(tailMergeX64));
|
||||
write32le(buf + 39, desc->getRVA() - rva - 43);
|
||||
write32le(buf + 44, helper->getRVA() - rva - 48);
|
||||
}
|
||||
|
||||
void getBaserels(std::vector<Baserel> *Res) override {
|
||||
Res->emplace_back(RVA + 3);
|
||||
Res->emplace_back(RVA + 8);
|
||||
}
|
||||
|
||||
Defined *Imp = nullptr;
|
||||
Chunk *Desc = nullptr;
|
||||
Defined *Helper = nullptr;
|
||||
Chunk *desc = nullptr;
|
||||
Defined *helper = nullptr;
|
||||
};
|
||||
|
||||
class ThunkChunkARM : public Chunk {
|
||||
class ThunkChunkX86 : public NonSectionChunk {
|
||||
public:
|
||||
ThunkChunkARM(Defined *I, Chunk *D, Defined *H)
|
||||
: Imp(I), Desc(D), Helper(H) {}
|
||||
ThunkChunkX86(Defined *i, Chunk *tm) : imp(i), tailMerge(tm) {}
|
||||
|
||||
size_t getSize() const override { return sizeof(ThunkARM); }
|
||||
size_t getSize() const override { return sizeof(thunkX86); }
|
||||
|
||||
void writeTo(uint8_t *Buf) const override {
|
||||
memcpy(Buf + OutputSectionOff, ThunkARM, sizeof(ThunkARM));
|
||||
applyMOV32T(Buf + OutputSectionOff + 0, Imp->getRVA() + Config->ImageBase);
|
||||
applyMOV32T(Buf + OutputSectionOff + 22, Desc->getRVA() + Config->ImageBase);
|
||||
applyBranch24T(Buf + OutputSectionOff + 30, Helper->getRVA() - RVA - 34);
|
||||
void writeTo(uint8_t *buf) const override {
|
||||
memcpy(buf, thunkX86, sizeof(thunkX86));
|
||||
write32le(buf + 1, imp->getRVA() + config->imageBase);
|
||||
write32le(buf + 6, tailMerge->getRVA() - rva - 10);
|
||||
}
|
||||
|
||||
void getBaserels(std::vector<Baserel> *Res) override {
|
||||
Res->emplace_back(RVA + 0, IMAGE_REL_BASED_ARM_MOV32T);
|
||||
Res->emplace_back(RVA + 22, IMAGE_REL_BASED_ARM_MOV32T);
|
||||
void getBaserels(std::vector<Baserel> *res) override {
|
||||
res->emplace_back(rva + 1);
|
||||
}
|
||||
|
||||
Defined *Imp = nullptr;
|
||||
Chunk *Desc = nullptr;
|
||||
Defined *Helper = nullptr;
|
||||
Defined *imp = nullptr;
|
||||
Chunk *tailMerge = nullptr;
|
||||
};
|
||||
|
||||
class ThunkChunkARM64 : public Chunk {
|
||||
class TailMergeChunkX86 : public NonSectionChunk {
|
||||
public:
|
||||
ThunkChunkARM64(Defined *I, Chunk *D, Defined *H)
|
||||
: Imp(I), Desc(D), Helper(H) {}
|
||||
TailMergeChunkX86(Chunk *d, Defined *h) : desc(d), helper(h) {}
|
||||
|
||||
size_t getSize() const override { return sizeof(ThunkARM64); }
|
||||
size_t getSize() const override { return sizeof(tailMergeX86); }
|
||||
|
||||
void writeTo(uint8_t *Buf) const override {
|
||||
memcpy(Buf + OutputSectionOff, ThunkARM64, sizeof(ThunkARM64));
|
||||
applyArm64Addr(Buf + OutputSectionOff + 0, Imp->getRVA(), RVA + 0, 12);
|
||||
applyArm64Imm(Buf + OutputSectionOff + 4, Imp->getRVA() & 0xfff, 0);
|
||||
applyArm64Addr(Buf + OutputSectionOff + 52, Desc->getRVA(), RVA + 52, 12);
|
||||
applyArm64Imm(Buf + OutputSectionOff + 56, Desc->getRVA() & 0xfff, 0);
|
||||
applyArm64Branch26(Buf + OutputSectionOff + 60,
|
||||
Helper->getRVA() - RVA - 60);
|
||||
void writeTo(uint8_t *buf) const override {
|
||||
memcpy(buf, tailMergeX86, sizeof(tailMergeX86));
|
||||
write32le(buf + 4, desc->getRVA() + config->imageBase);
|
||||
write32le(buf + 9, helper->getRVA() - rva - 13);
|
||||
}
|
||||
|
||||
Defined *Imp = nullptr;
|
||||
Chunk *Desc = nullptr;
|
||||
Defined *Helper = nullptr;
|
||||
void getBaserels(std::vector<Baserel> *res) override {
|
||||
res->emplace_back(rva + 4);
|
||||
}
|
||||
|
||||
Chunk *desc = nullptr;
|
||||
Defined *helper = nullptr;
|
||||
};
|
||||
|
||||
class ThunkChunkARM : public NonSectionChunk {
|
||||
public:
|
||||
ThunkChunkARM(Defined *i, Chunk *tm) : imp(i), tailMerge(tm) {}
|
||||
|
||||
size_t getSize() const override { return sizeof(thunkARM); }
|
||||
|
||||
void writeTo(uint8_t *buf) const override {
|
||||
memcpy(buf, thunkARM, sizeof(thunkARM));
|
||||
applyMOV32T(buf + 0, imp->getRVA() + config->imageBase);
|
||||
applyBranch24T(buf + 8, tailMerge->getRVA() - rva - 12);
|
||||
}
|
||||
|
||||
void getBaserels(std::vector<Baserel> *res) override {
|
||||
res->emplace_back(rva + 0, IMAGE_REL_BASED_ARM_MOV32T);
|
||||
}
|
||||
|
||||
Defined *imp = nullptr;
|
||||
Chunk *tailMerge = nullptr;
|
||||
};
|
||||
|
||||
class TailMergeChunkARM : public NonSectionChunk {
|
||||
public:
|
||||
TailMergeChunkARM(Chunk *d, Defined *h) : desc(d), helper(h) {}
|
||||
|
||||
size_t getSize() const override { return sizeof(tailMergeARM); }
|
||||
|
||||
void writeTo(uint8_t *buf) const override {
|
||||
memcpy(buf, tailMergeARM, sizeof(tailMergeARM));
|
||||
applyMOV32T(buf + 14, desc->getRVA() + config->imageBase);
|
||||
applyBranch24T(buf + 22, helper->getRVA() - rva - 26);
|
||||
}
|
||||
|
||||
void getBaserels(std::vector<Baserel> *res) override {
|
||||
res->emplace_back(rva + 14, IMAGE_REL_BASED_ARM_MOV32T);
|
||||
}
|
||||
|
||||
Chunk *desc = nullptr;
|
||||
Defined *helper = nullptr;
|
||||
};
|
||||
|
||||
class ThunkChunkARM64 : public NonSectionChunk {
|
||||
public:
|
||||
ThunkChunkARM64(Defined *i, Chunk *tm) : imp(i), tailMerge(tm) {}
|
||||
|
||||
size_t getSize() const override { return sizeof(thunkARM64); }
|
||||
|
||||
void writeTo(uint8_t *buf) const override {
|
||||
memcpy(buf, thunkARM64, sizeof(thunkARM64));
|
||||
applyArm64Addr(buf + 0, imp->getRVA(), rva + 0, 12);
|
||||
applyArm64Imm(buf + 4, imp->getRVA() & 0xfff, 0);
|
||||
applyArm64Branch26(buf + 8, tailMerge->getRVA() - rva - 8);
|
||||
}
|
||||
|
||||
Defined *imp = nullptr;
|
||||
Chunk *tailMerge = nullptr;
|
||||
};
|
||||
|
||||
class TailMergeChunkARM64 : public NonSectionChunk {
|
||||
public:
|
||||
TailMergeChunkARM64(Chunk *d, Defined *h) : desc(d), helper(h) {}
|
||||
|
||||
size_t getSize() const override { return sizeof(tailMergeARM64); }
|
||||
|
||||
void writeTo(uint8_t *buf) const override {
|
||||
memcpy(buf, tailMergeARM64, sizeof(tailMergeARM64));
|
||||
applyArm64Addr(buf + 44, desc->getRVA(), rva + 44, 12);
|
||||
applyArm64Imm(buf + 48, desc->getRVA() & 0xfff, 0);
|
||||
applyArm64Branch26(buf + 52, helper->getRVA() - rva - 52);
|
||||
}
|
||||
|
||||
Chunk *desc = nullptr;
|
||||
Defined *helper = nullptr;
|
||||
};
|
||||
|
||||
// A chunk for the import descriptor table.
|
||||
class DelayAddressChunk : public Chunk {
|
||||
class DelayAddressChunk : public NonSectionChunk {
|
||||
public:
|
||||
explicit DelayAddressChunk(Chunk *C) : Thunk(C) {
|
||||
Alignment = Config->Wordsize;
|
||||
explicit DelayAddressChunk(Chunk *c) : thunk(c) {
|
||||
setAlignment(config->wordsize);
|
||||
}
|
||||
size_t getSize() const override { return Config->Wordsize; }
|
||||
size_t getSize() const override { return config->wordsize; }
|
||||
|
||||
void writeTo(uint8_t *Buf) const override {
|
||||
if (Config->is64()) {
|
||||
write64le(Buf + OutputSectionOff, Thunk->getRVA() + Config->ImageBase);
|
||||
void writeTo(uint8_t *buf) const override {
|
||||
if (config->is64()) {
|
||||
write64le(buf, thunk->getRVA() + config->imageBase);
|
||||
} else {
|
||||
uint32_t Bit = 0;
|
||||
uint32_t bit = 0;
|
||||
// Pointer to thumb code must have the LSB set, so adjust it.
|
||||
if (Config->Machine == ARMNT)
|
||||
Bit = 1;
|
||||
write32le(Buf + OutputSectionOff, (Thunk->getRVA() + Config->ImageBase) | Bit);
|
||||
if (config->machine == ARMNT)
|
||||
bit = 1;
|
||||
write32le(buf, (thunk->getRVA() + config->imageBase) | bit);
|
||||
}
|
||||
}
|
||||
|
||||
void getBaserels(std::vector<Baserel> *Res) override {
|
||||
Res->emplace_back(RVA);
|
||||
void getBaserels(std::vector<Baserel> *res) override {
|
||||
res->emplace_back(rva);
|
||||
}
|
||||
|
||||
Chunk *Thunk;
|
||||
Chunk *thunk;
|
||||
};
|
||||
|
||||
// Export table
|
||||
// Read Microsoft PE/COFF spec 5.3 for details.
|
||||
|
||||
// A chunk for the export descriptor table.
|
||||
class ExportDirectoryChunk : public Chunk {
|
||||
class ExportDirectoryChunk : public NonSectionChunk {
|
||||
public:
|
||||
ExportDirectoryChunk(int I, int J, Chunk *D, Chunk *A, Chunk *N, Chunk *O)
|
||||
: MaxOrdinal(I), NameTabSize(J), DLLName(D), AddressTab(A), NameTab(N),
|
||||
OrdinalTab(O) {}
|
||||
ExportDirectoryChunk(int i, int j, Chunk *d, Chunk *a, Chunk *n, Chunk *o)
|
||||
: maxOrdinal(i), nameTabSize(j), dllName(d), addressTab(a), nameTab(n),
|
||||
ordinalTab(o) {}
|
||||
|
||||
size_t getSize() const override {
|
||||
return sizeof(export_directory_table_entry);
|
||||
}
|
||||
|
||||
void writeTo(uint8_t *Buf) const override {
|
||||
memset(Buf + OutputSectionOff, 0, getSize());
|
||||
void writeTo(uint8_t *buf) const override {
|
||||
memset(buf, 0, getSize());
|
||||
|
||||
auto *E = (export_directory_table_entry *)(Buf + OutputSectionOff);
|
||||
E->NameRVA = DLLName->getRVA();
|
||||
E->OrdinalBase = 0;
|
||||
E->AddressTableEntries = MaxOrdinal + 1;
|
||||
E->NumberOfNamePointers = NameTabSize;
|
||||
E->ExportAddressTableRVA = AddressTab->getRVA();
|
||||
E->NamePointerRVA = NameTab->getRVA();
|
||||
E->OrdinalTableRVA = OrdinalTab->getRVA();
|
||||
auto *e = (export_directory_table_entry *)(buf);
|
||||
e->NameRVA = dllName->getRVA();
|
||||
e->OrdinalBase = 0;
|
||||
e->AddressTableEntries = maxOrdinal + 1;
|
||||
e->NumberOfNamePointers = nameTabSize;
|
||||
e->ExportAddressTableRVA = addressTab->getRVA();
|
||||
e->NamePointerRVA = nameTab->getRVA();
|
||||
e->OrdinalTableRVA = ordinalTab->getRVA();
|
||||
}
|
||||
|
||||
uint16_t MaxOrdinal;
|
||||
uint16_t NameTabSize;
|
||||
Chunk *DLLName;
|
||||
Chunk *AddressTab;
|
||||
Chunk *NameTab;
|
||||
Chunk *OrdinalTab;
|
||||
uint16_t maxOrdinal;
|
||||
uint16_t nameTabSize;
|
||||
Chunk *dllName;
|
||||
Chunk *addressTab;
|
||||
Chunk *nameTab;
|
||||
Chunk *ordinalTab;
|
||||
};
|
||||
|
||||
class AddressTableChunk : public Chunk {
|
||||
class AddressTableChunk : public NonSectionChunk {
|
||||
public:
|
||||
explicit AddressTableChunk(size_t MaxOrdinal) : Size(MaxOrdinal + 1) {}
|
||||
size_t getSize() const override { return Size * 4; }
|
||||
explicit AddressTableChunk(size_t maxOrdinal) : size(maxOrdinal + 1) {}
|
||||
size_t getSize() const override { return size * 4; }
|
||||
|
||||
void writeTo(uint8_t *Buf) const override {
|
||||
memset(Buf + OutputSectionOff, 0, getSize());
|
||||
void writeTo(uint8_t *buf) const override {
|
||||
memset(buf, 0, getSize());
|
||||
|
||||
for (const Export &E : Config->Exports) {
|
||||
uint8_t *P = Buf + OutputSectionOff + E.Ordinal * 4;
|
||||
uint32_t Bit = 0;
|
||||
for (const Export &e : config->exports) {
|
||||
uint8_t *p = buf + e.ordinal * 4;
|
||||
uint32_t bit = 0;
|
||||
// Pointer to thumb code must have the LSB set, so adjust it.
|
||||
if (Config->Machine == ARMNT && !E.Data)
|
||||
Bit = 1;
|
||||
if (E.ForwardChunk) {
|
||||
write32le(P, E.ForwardChunk->getRVA() | Bit);
|
||||
if (config->machine == ARMNT && !e.data)
|
||||
bit = 1;
|
||||
if (e.forwardChunk) {
|
||||
write32le(p, e.forwardChunk->getRVA() | bit);
|
||||
} else {
|
||||
write32le(P, cast<Defined>(E.Sym)->getRVA() | Bit);
|
||||
write32le(p, cast<Defined>(e.sym)->getRVA() | bit);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
size_t Size;
|
||||
size_t size;
|
||||
};
|
||||
|
||||
class NamePointersChunk : public Chunk {
|
||||
class NamePointersChunk : public NonSectionChunk {
|
||||
public:
|
||||
explicit NamePointersChunk(std::vector<Chunk *> &V) : Chunks(V) {}
|
||||
size_t getSize() const override { return Chunks.size() * 4; }
|
||||
explicit NamePointersChunk(std::vector<Chunk *> &v) : chunks(v) {}
|
||||
size_t getSize() const override { return chunks.size() * 4; }
|
||||
|
||||
void writeTo(uint8_t *Buf) const override {
|
||||
uint8_t *P = Buf + OutputSectionOff;
|
||||
for (Chunk *C : Chunks) {
|
||||
write32le(P, C->getRVA());
|
||||
P += 4;
|
||||
void writeTo(uint8_t *buf) const override {
|
||||
for (Chunk *c : chunks) {
|
||||
write32le(buf, c->getRVA());
|
||||
buf += 4;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<Chunk *> Chunks;
|
||||
std::vector<Chunk *> chunks;
|
||||
};
|
||||
|
||||
class ExportOrdinalChunk : public Chunk {
|
||||
class ExportOrdinalChunk : public NonSectionChunk {
|
||||
public:
|
||||
explicit ExportOrdinalChunk(size_t I) : Size(I) {}
|
||||
size_t getSize() const override { return Size * 2; }
|
||||
explicit ExportOrdinalChunk(size_t i) : size(i) {}
|
||||
size_t getSize() const override { return size * 2; }
|
||||
|
||||
void writeTo(uint8_t *Buf) const override {
|
||||
uint8_t *P = Buf + OutputSectionOff;
|
||||
for (Export &E : Config->Exports) {
|
||||
if (E.Noname)
|
||||
void writeTo(uint8_t *buf) const override {
|
||||
for (Export &e : config->exports) {
|
||||
if (e.noname)
|
||||
continue;
|
||||
write16le(P, E.Ordinal);
|
||||
P += 2;
|
||||
write16le(buf, e.ordinal);
|
||||
buf += 2;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
size_t Size;
|
||||
size_t size;
|
||||
};
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
void IdataContents::create() {
|
||||
std::vector<std::vector<DefinedImportData *>> V = binImports(Imports);
|
||||
std::vector<std::vector<DefinedImportData *>> v = binImports(imports);
|
||||
|
||||
// Create .idata contents for each DLL.
|
||||
for (std::vector<DefinedImportData *> &Syms : V) {
|
||||
for (std::vector<DefinedImportData *> &syms : v) {
|
||||
// Create lookup and address tables. If they have external names,
|
||||
// we need to create HintName chunks to store the names.
|
||||
// we need to create hintName chunks to store the names.
|
||||
// If they don't (if they are import-by-ordinals), we store only
|
||||
// ordinal values to the table.
|
||||
size_t Base = Lookups.size();
|
||||
for (DefinedImportData *S : Syms) {
|
||||
uint16_t Ord = S->getOrdinal();
|
||||
if (S->getExternalName().empty()) {
|
||||
Lookups.push_back(make<OrdinalOnlyChunk>(Ord));
|
||||
Addresses.push_back(make<OrdinalOnlyChunk>(Ord));
|
||||
size_t base = lookups.size();
|
||||
for (DefinedImportData *s : syms) {
|
||||
uint16_t ord = s->getOrdinal();
|
||||
if (s->getExternalName().empty()) {
|
||||
lookups.push_back(make<OrdinalOnlyChunk>(ord));
|
||||
addresses.push_back(make<OrdinalOnlyChunk>(ord));
|
||||
continue;
|
||||
}
|
||||
auto *C = make<HintNameChunk>(S->getExternalName(), Ord);
|
||||
Lookups.push_back(make<LookupChunk>(C));
|
||||
Addresses.push_back(make<LookupChunk>(C));
|
||||
Hints.push_back(C);
|
||||
auto *c = make<HintNameChunk>(s->getExternalName(), ord);
|
||||
lookups.push_back(make<LookupChunk>(c));
|
||||
addresses.push_back(make<LookupChunk>(c));
|
||||
hints.push_back(c);
|
||||
}
|
||||
// Terminate with null values.
|
||||
Lookups.push_back(make<NullChunk>(Config->Wordsize));
|
||||
Addresses.push_back(make<NullChunk>(Config->Wordsize));
|
||||
lookups.push_back(make<NullChunk>(config->wordsize));
|
||||
addresses.push_back(make<NullChunk>(config->wordsize));
|
||||
|
||||
for (int I = 0, E = Syms.size(); I < E; ++I)
|
||||
Syms[I]->setLocation(Addresses[Base + I]);
|
||||
for (int i = 0, e = syms.size(); i < e; ++i)
|
||||
syms[i]->setLocation(addresses[base + i]);
|
||||
|
||||
// Create the import table header.
|
||||
DLLNames.push_back(make<StringChunk>(Syms[0]->getDLLName()));
|
||||
auto *Dir = make<ImportDirectoryChunk>(DLLNames.back());
|
||||
Dir->LookupTab = Lookups[Base];
|
||||
Dir->AddressTab = Addresses[Base];
|
||||
Dirs.push_back(Dir);
|
||||
dllNames.push_back(make<StringChunk>(syms[0]->getDLLName()));
|
||||
auto *dir = make<ImportDirectoryChunk>(dllNames.back());
|
||||
dir->lookupTab = lookups[base];
|
||||
dir->addressTab = addresses[base];
|
||||
dirs.push_back(dir);
|
||||
}
|
||||
// Add null terminator.
|
||||
Dirs.push_back(make<NullChunk>(sizeof(ImportDirectoryTableEntry)));
|
||||
dirs.push_back(make<NullChunk>(sizeof(ImportDirectoryTableEntry)));
|
||||
}
|
||||
|
||||
std::vector<Chunk *> DelayLoadContents::getChunks() {
|
||||
std::vector<Chunk *> V;
|
||||
V.insert(V.end(), Dirs.begin(), Dirs.end());
|
||||
V.insert(V.end(), Names.begin(), Names.end());
|
||||
V.insert(V.end(), HintNames.begin(), HintNames.end());
|
||||
V.insert(V.end(), DLLNames.begin(), DLLNames.end());
|
||||
return V;
|
||||
std::vector<Chunk *> v;
|
||||
v.insert(v.end(), dirs.begin(), dirs.end());
|
||||
v.insert(v.end(), names.begin(), names.end());
|
||||
v.insert(v.end(), hintNames.begin(), hintNames.end());
|
||||
v.insert(v.end(), dllNames.begin(), dllNames.end());
|
||||
return v;
|
||||
}
|
||||
|
||||
std::vector<Chunk *> DelayLoadContents::getDataChunks() {
|
||||
std::vector<Chunk *> V;
|
||||
V.insert(V.end(), ModuleHandles.begin(), ModuleHandles.end());
|
||||
V.insert(V.end(), Addresses.begin(), Addresses.end());
|
||||
return V;
|
||||
std::vector<Chunk *> v;
|
||||
v.insert(v.end(), moduleHandles.begin(), moduleHandles.end());
|
||||
v.insert(v.end(), addresses.begin(), addresses.end());
|
||||
return v;
|
||||
}
|
||||
|
||||
uint64_t DelayLoadContents::getDirSize() {
|
||||
return Dirs.size() * sizeof(delay_import_directory_table_entry);
|
||||
return dirs.size() * sizeof(delay_import_directory_table_entry);
|
||||
}
|
||||
|
||||
void DelayLoadContents::create(Defined *H) {
|
||||
Helper = H;
|
||||
std::vector<std::vector<DefinedImportData *>> V = binImports(Imports);
|
||||
void DelayLoadContents::create(Defined *h) {
|
||||
helper = h;
|
||||
std::vector<std::vector<DefinedImportData *>> v = binImports(imports);
|
||||
|
||||
// Create .didat contents for each DLL.
|
||||
for (std::vector<DefinedImportData *> &Syms : V) {
|
||||
for (std::vector<DefinedImportData *> &syms : v) {
|
||||
// Create the delay import table header.
|
||||
DLLNames.push_back(make<StringChunk>(Syms[0]->getDLLName()));
|
||||
auto *Dir = make<DelayDirectoryChunk>(DLLNames.back());
|
||||
dllNames.push_back(make<StringChunk>(syms[0]->getDLLName()));
|
||||
auto *dir = make<DelayDirectoryChunk>(dllNames.back());
|
||||
|
||||
size_t Base = Addresses.size();
|
||||
for (DefinedImportData *S : Syms) {
|
||||
Chunk *T = newThunkChunk(S, Dir);
|
||||
auto *A = make<DelayAddressChunk>(T);
|
||||
Addresses.push_back(A);
|
||||
Thunks.push_back(T);
|
||||
StringRef ExtName = S->getExternalName();
|
||||
if (ExtName.empty()) {
|
||||
Names.push_back(make<OrdinalOnlyChunk>(S->getOrdinal()));
|
||||
size_t base = addresses.size();
|
||||
Chunk *tm = newTailMergeChunk(dir);
|
||||
for (DefinedImportData *s : syms) {
|
||||
Chunk *t = newThunkChunk(s, tm);
|
||||
auto *a = make<DelayAddressChunk>(t);
|
||||
addresses.push_back(a);
|
||||
thunks.push_back(t);
|
||||
StringRef extName = s->getExternalName();
|
||||
if (extName.empty()) {
|
||||
names.push_back(make<OrdinalOnlyChunk>(s->getOrdinal()));
|
||||
} else {
|
||||
auto *C = make<HintNameChunk>(ExtName, 0);
|
||||
Names.push_back(make<LookupChunk>(C));
|
||||
HintNames.push_back(C);
|
||||
auto *c = make<HintNameChunk>(extName, 0);
|
||||
names.push_back(make<LookupChunk>(c));
|
||||
hintNames.push_back(c);
|
||||
}
|
||||
}
|
||||
thunks.push_back(tm);
|
||||
// Terminate with null values.
|
||||
Addresses.push_back(make<NullChunk>(8));
|
||||
Names.push_back(make<NullChunk>(8));
|
||||
addresses.push_back(make<NullChunk>(8));
|
||||
names.push_back(make<NullChunk>(8));
|
||||
|
||||
for (int I = 0, E = Syms.size(); I < E; ++I)
|
||||
Syms[I]->setLocation(Addresses[Base + I]);
|
||||
auto *MH = make<NullChunk>(8);
|
||||
MH->Alignment = 8;
|
||||
ModuleHandles.push_back(MH);
|
||||
for (int i = 0, e = syms.size(); i < e; ++i)
|
||||
syms[i]->setLocation(addresses[base + i]);
|
||||
auto *mh = make<NullChunk>(8);
|
||||
mh->setAlignment(8);
|
||||
moduleHandles.push_back(mh);
|
||||
|
||||
// Fill the delay import table header fields.
|
||||
Dir->ModuleHandle = MH;
|
||||
Dir->AddressTab = Addresses[Base];
|
||||
Dir->NameTab = Names[Base];
|
||||
Dirs.push_back(Dir);
|
||||
dir->moduleHandle = mh;
|
||||
dir->addressTab = addresses[base];
|
||||
dir->nameTab = names[base];
|
||||
dirs.push_back(dir);
|
||||
}
|
||||
// Add null terminator.
|
||||
Dirs.push_back(make<NullChunk>(sizeof(delay_import_directory_table_entry)));
|
||||
dirs.push_back(make<NullChunk>(sizeof(delay_import_directory_table_entry)));
|
||||
}
|
||||
|
||||
Chunk *DelayLoadContents::newThunkChunk(DefinedImportData *S, Chunk *Dir) {
|
||||
switch (Config->Machine) {
|
||||
Chunk *DelayLoadContents::newTailMergeChunk(Chunk *dir) {
|
||||
switch (config->machine) {
|
||||
case AMD64:
|
||||
return make<ThunkChunkX64>(S, Dir, Helper);
|
||||
return make<TailMergeChunkX64>(dir, helper);
|
||||
case I386:
|
||||
return make<ThunkChunkX86>(S, Dir, Helper);
|
||||
return make<TailMergeChunkX86>(dir, helper);
|
||||
case ARMNT:
|
||||
return make<ThunkChunkARM>(S, Dir, Helper);
|
||||
return make<TailMergeChunkARM>(dir, helper);
|
||||
case ARM64:
|
||||
return make<ThunkChunkARM64>(S, Dir, Helper);
|
||||
return make<TailMergeChunkARM64>(dir, helper);
|
||||
default:
|
||||
llvm_unreachable("unsupported machine type");
|
||||
}
|
||||
}
|
||||
|
||||
Chunk *DelayLoadContents::newThunkChunk(DefinedImportData *s,
|
||||
Chunk *tailMerge) {
|
||||
switch (config->machine) {
|
||||
case AMD64:
|
||||
return make<ThunkChunkX64>(s, tailMerge);
|
||||
case I386:
|
||||
return make<ThunkChunkX86>(s, tailMerge);
|
||||
case ARMNT:
|
||||
return make<ThunkChunkARM>(s, tailMerge);
|
||||
case ARM64:
|
||||
return make<ThunkChunkARM64>(s, tailMerge);
|
||||
default:
|
||||
llvm_unreachable("unsupported machine type");
|
||||
}
|
||||
}
|
||||
|
||||
EdataContents::EdataContents() {
|
||||
uint16_t MaxOrdinal = 0;
|
||||
for (Export &E : Config->Exports)
|
||||
MaxOrdinal = std::max(MaxOrdinal, E.Ordinal);
|
||||
uint16_t maxOrdinal = 0;
|
||||
for (Export &e : config->exports)
|
||||
maxOrdinal = std::max(maxOrdinal, e.ordinal);
|
||||
|
||||
auto *DLLName = make<StringChunk>(sys::path::filename(Config->OutputFile));
|
||||
auto *AddressTab = make<AddressTableChunk>(MaxOrdinal);
|
||||
std::vector<Chunk *> Names;
|
||||
for (Export &E : Config->Exports)
|
||||
if (!E.Noname)
|
||||
Names.push_back(make<StringChunk>(E.ExportName));
|
||||
auto *dllName = make<StringChunk>(sys::path::filename(config->outputFile));
|
||||
auto *addressTab = make<AddressTableChunk>(maxOrdinal);
|
||||
std::vector<Chunk *> names;
|
||||
for (Export &e : config->exports)
|
||||
if (!e.noname)
|
||||
names.push_back(make<StringChunk>(e.exportName));
|
||||
|
||||
std::vector<Chunk *> Forwards;
|
||||
for (Export &E : Config->Exports) {
|
||||
if (E.ForwardTo.empty())
|
||||
std::vector<Chunk *> forwards;
|
||||
for (Export &e : config->exports) {
|
||||
if (e.forwardTo.empty())
|
||||
continue;
|
||||
E.ForwardChunk = make<StringChunk>(E.ForwardTo);
|
||||
Forwards.push_back(E.ForwardChunk);
|
||||
e.forwardChunk = make<StringChunk>(e.forwardTo);
|
||||
forwards.push_back(e.forwardChunk);
|
||||
}
|
||||
|
||||
auto *NameTab = make<NamePointersChunk>(Names);
|
||||
auto *OrdinalTab = make<ExportOrdinalChunk>(Names.size());
|
||||
auto *Dir = make<ExportDirectoryChunk>(MaxOrdinal, Names.size(), DLLName,
|
||||
AddressTab, NameTab, OrdinalTab);
|
||||
Chunks.push_back(Dir);
|
||||
Chunks.push_back(DLLName);
|
||||
Chunks.push_back(AddressTab);
|
||||
Chunks.push_back(NameTab);
|
||||
Chunks.push_back(OrdinalTab);
|
||||
Chunks.insert(Chunks.end(), Names.begin(), Names.end());
|
||||
Chunks.insert(Chunks.end(), Forwards.begin(), Forwards.end());
|
||||
auto *nameTab = make<NamePointersChunk>(names);
|
||||
auto *ordinalTab = make<ExportOrdinalChunk>(names.size());
|
||||
auto *dir = make<ExportDirectoryChunk>(maxOrdinal, names.size(), dllName,
|
||||
addressTab, nameTab, ordinalTab);
|
||||
chunks.push_back(dir);
|
||||
chunks.push_back(dllName);
|
||||
chunks.push_back(addressTab);
|
||||
chunks.push_back(nameTab);
|
||||
chunks.push_back(ordinalTab);
|
||||
chunks.insert(chunks.end(), names.begin(), names.end());
|
||||
chunks.insert(chunks.end(), forwards.begin(), forwards.end());
|
||||
}
|
||||
|
||||
} // namespace coff
|
||||
|
||||
60
deps/lld/COFF/DLL.h
vendored
60
deps/lld/COFF/DLL.h
vendored
@@ -1,9 +1,8 @@
|
||||
//===- DLL.h ----------------------------------------------------*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Linker
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
@@ -22,45 +21,46 @@ namespace coff {
|
||||
// call create() to populate the chunk vectors.
|
||||
class IdataContents {
|
||||
public:
|
||||
void add(DefinedImportData *Sym) { Imports.push_back(Sym); }
|
||||
bool empty() { return Imports.empty(); }
|
||||
void add(DefinedImportData *sym) { imports.push_back(sym); }
|
||||
bool empty() { return imports.empty(); }
|
||||
|
||||
void create();
|
||||
|
||||
std::vector<DefinedImportData *> Imports;
|
||||
std::vector<Chunk *> Dirs;
|
||||
std::vector<Chunk *> Lookups;
|
||||
std::vector<Chunk *> Addresses;
|
||||
std::vector<Chunk *> Hints;
|
||||
std::vector<Chunk *> DLLNames;
|
||||
std::vector<DefinedImportData *> imports;
|
||||
std::vector<Chunk *> dirs;
|
||||
std::vector<Chunk *> lookups;
|
||||
std::vector<Chunk *> addresses;
|
||||
std::vector<Chunk *> hints;
|
||||
std::vector<Chunk *> dllNames;
|
||||
};
|
||||
|
||||
// Windows-specific.
|
||||
// DelayLoadContents creates all chunks for the delay-load DLL import table.
|
||||
class DelayLoadContents {
|
||||
public:
|
||||
void add(DefinedImportData *Sym) { Imports.push_back(Sym); }
|
||||
bool empty() { return Imports.empty(); }
|
||||
void create(Defined *Helper);
|
||||
void add(DefinedImportData *sym) { imports.push_back(sym); }
|
||||
bool empty() { return imports.empty(); }
|
||||
void create(Defined *helper);
|
||||
std::vector<Chunk *> getChunks();
|
||||
std::vector<Chunk *> getDataChunks();
|
||||
ArrayRef<Chunk *> getCodeChunks() { return Thunks; }
|
||||
ArrayRef<Chunk *> getCodeChunks() { return thunks; }
|
||||
|
||||
uint64_t getDirRVA() { return Dirs[0]->getRVA(); }
|
||||
uint64_t getDirRVA() { return dirs[0]->getRVA(); }
|
||||
uint64_t getDirSize();
|
||||
|
||||
private:
|
||||
Chunk *newThunkChunk(DefinedImportData *S, Chunk *Dir);
|
||||
Chunk *newThunkChunk(DefinedImportData *s, Chunk *tailMerge);
|
||||
Chunk *newTailMergeChunk(Chunk *dir);
|
||||
|
||||
Defined *Helper;
|
||||
std::vector<DefinedImportData *> Imports;
|
||||
std::vector<Chunk *> Dirs;
|
||||
std::vector<Chunk *> ModuleHandles;
|
||||
std::vector<Chunk *> Addresses;
|
||||
std::vector<Chunk *> Names;
|
||||
std::vector<Chunk *> HintNames;
|
||||
std::vector<Chunk *> Thunks;
|
||||
std::vector<Chunk *> DLLNames;
|
||||
Defined *helper;
|
||||
std::vector<DefinedImportData *> imports;
|
||||
std::vector<Chunk *> dirs;
|
||||
std::vector<Chunk *> moduleHandles;
|
||||
std::vector<Chunk *> addresses;
|
||||
std::vector<Chunk *> names;
|
||||
std::vector<Chunk *> hintNames;
|
||||
std::vector<Chunk *> thunks;
|
||||
std::vector<Chunk *> dllNames;
|
||||
};
|
||||
|
||||
// Windows-specific.
|
||||
@@ -68,11 +68,11 @@ private:
|
||||
class EdataContents {
|
||||
public:
|
||||
EdataContents();
|
||||
std::vector<Chunk *> Chunks;
|
||||
std::vector<Chunk *> chunks;
|
||||
|
||||
uint64_t getRVA() { return Chunks[0]->getRVA(); }
|
||||
uint64_t getRVA() { return chunks[0]->getRVA(); }
|
||||
uint64_t getSize() {
|
||||
return Chunks.back()->getRVA() + Chunks.back()->getSize() - getRVA();
|
||||
return chunks.back()->getRVA() + chunks.back()->getSize() - getRVA();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
268
deps/lld/COFF/DebugTypes.cpp
vendored
Normal file
268
deps/lld/COFF/DebugTypes.cpp
vendored
Normal file
@@ -0,0 +1,268 @@
|
||||
//===- DebugTypes.cpp -----------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "DebugTypes.h"
|
||||
#include "Driver.h"
|
||||
#include "InputFiles.h"
|
||||
#include "lld/Common/ErrorHandler.h"
|
||||
#include "llvm/DebugInfo/CodeView/TypeRecord.h"
|
||||
#include "llvm/DebugInfo/PDB/GenericError.h"
|
||||
#include "llvm/DebugInfo/PDB/Native/InfoStream.h"
|
||||
#include "llvm/DebugInfo/PDB/Native/NativeSession.h"
|
||||
#include "llvm/DebugInfo/PDB/Native/PDBFile.h"
|
||||
#include "llvm/Support/Path.h"
|
||||
|
||||
using namespace lld;
|
||||
using namespace lld::coff;
|
||||
using namespace llvm;
|
||||
using namespace llvm::codeview;
|
||||
|
||||
namespace {
|
||||
// The TypeServerSource class represents a PDB type server, a file referenced by
|
||||
// OBJ files compiled with MSVC /Zi. A single PDB can be shared by several OBJ
|
||||
// files, therefore there must be only once instance per OBJ lot. The file path
|
||||
// is discovered from the dependent OBJ's debug type stream. The
|
||||
// TypeServerSource object is then queued and loaded by the COFF Driver. The
|
||||
// debug type stream for such PDB files will be merged first in the final PDB,
|
||||
// before any dependent OBJ.
|
||||
class TypeServerSource : public TpiSource {
|
||||
public:
|
||||
explicit TypeServerSource(MemoryBufferRef m, llvm::pdb::NativeSession *s)
|
||||
: TpiSource(PDB, nullptr), session(s), mb(m) {}
|
||||
|
||||
// Queue a PDB type server for loading in the COFF Driver
|
||||
static void enqueue(const ObjFile *dependentFile,
|
||||
const TypeServer2Record &ts);
|
||||
|
||||
// Create an instance
|
||||
static Expected<TypeServerSource *> getInstance(MemoryBufferRef m);
|
||||
|
||||
// Fetch the PDB instance loaded for a corresponding dependent OBJ.
|
||||
static Expected<TypeServerSource *>
|
||||
findFromFile(const ObjFile *dependentFile);
|
||||
|
||||
static std::map<std::string, std::pair<std::string, TypeServerSource *>>
|
||||
instances;
|
||||
|
||||
// The interface to the PDB (if it was opened successfully)
|
||||
std::unique_ptr<llvm::pdb::NativeSession> session;
|
||||
|
||||
private:
|
||||
MemoryBufferRef mb;
|
||||
};
|
||||
|
||||
// This class represents the debug type stream of an OBJ file that depends on a
|
||||
// PDB type server (see TypeServerSource).
|
||||
class UseTypeServerSource : public TpiSource {
|
||||
public:
|
||||
UseTypeServerSource(const ObjFile *f, const TypeServer2Record *ts)
|
||||
: TpiSource(UsingPDB, f), typeServerDependency(*ts) {}
|
||||
|
||||
// Information about the PDB type server dependency, that needs to be loaded
|
||||
// in before merging this OBJ.
|
||||
TypeServer2Record typeServerDependency;
|
||||
};
|
||||
|
||||
// This class represents the debug type stream of a Microsoft precompiled
|
||||
// headers OBJ (PCH OBJ). This OBJ kind needs to be merged first in the output
|
||||
// PDB, before any other OBJs that depend on this. Note that only MSVC generate
|
||||
// such files, clang does not.
|
||||
class PrecompSource : public TpiSource {
|
||||
public:
|
||||
PrecompSource(const ObjFile *f) : TpiSource(PCH, f) {}
|
||||
};
|
||||
|
||||
// This class represents the debug type stream of an OBJ file that depends on a
|
||||
// Microsoft precompiled headers OBJ (see PrecompSource).
|
||||
class UsePrecompSource : public TpiSource {
|
||||
public:
|
||||
UsePrecompSource(const ObjFile *f, const PrecompRecord *precomp)
|
||||
: TpiSource(UsingPCH, f), precompDependency(*precomp) {}
|
||||
|
||||
// Information about the Precomp OBJ dependency, that needs to be loaded in
|
||||
// before merging this OBJ.
|
||||
PrecompRecord precompDependency;
|
||||
};
|
||||
} // namespace
|
||||
|
||||
static std::vector<std::unique_ptr<TpiSource>> GC;
|
||||
|
||||
TpiSource::TpiSource(TpiKind k, const ObjFile *f) : kind(k), file(f) {
|
||||
GC.push_back(std::unique_ptr<TpiSource>(this));
|
||||
}
|
||||
|
||||
TpiSource *lld::coff::makeTpiSource(const ObjFile *f) {
|
||||
return new TpiSource(TpiSource::Regular, f);
|
||||
}
|
||||
|
||||
TpiSource *lld::coff::makeUseTypeServerSource(const ObjFile *f,
|
||||
const TypeServer2Record *ts) {
|
||||
TypeServerSource::enqueue(f, *ts);
|
||||
return new UseTypeServerSource(f, ts);
|
||||
}
|
||||
|
||||
TpiSource *lld::coff::makePrecompSource(const ObjFile *f) {
|
||||
return new PrecompSource(f);
|
||||
}
|
||||
|
||||
TpiSource *lld::coff::makeUsePrecompSource(const ObjFile *f,
|
||||
const PrecompRecord *precomp) {
|
||||
return new UsePrecompSource(f, precomp);
|
||||
}
|
||||
|
||||
namespace lld {
|
||||
namespace coff {
|
||||
template <>
|
||||
const PrecompRecord &retrieveDependencyInfo(const TpiSource *source) {
|
||||
assert(source->kind == TpiSource::UsingPCH);
|
||||
return ((const UsePrecompSource *)source)->precompDependency;
|
||||
}
|
||||
|
||||
template <>
|
||||
const TypeServer2Record &retrieveDependencyInfo(const TpiSource *source) {
|
||||
assert(source->kind == TpiSource::UsingPDB);
|
||||
return ((const UseTypeServerSource *)source)->typeServerDependency;
|
||||
}
|
||||
} // namespace coff
|
||||
} // namespace lld
|
||||
|
||||
std::map<std::string, std::pair<std::string, TypeServerSource *>>
|
||||
TypeServerSource::instances;
|
||||
|
||||
// Make a PDB path assuming the PDB is in the same folder as the OBJ
|
||||
static std::string getPdbBaseName(const ObjFile *file, StringRef tSPath) {
|
||||
StringRef localPath =
|
||||
!file->parentName.empty() ? file->parentName : file->getName();
|
||||
SmallString<128> path = sys::path::parent_path(localPath);
|
||||
|
||||
// Currently, type server PDBs are only created by MSVC cl, which only runs
|
||||
// on Windows, so we can assume type server paths are Windows style.
|
||||
sys::path::append(path, sys::path::filename(tSPath, sys::path::Style::windows));
|
||||
return path.str();
|
||||
}
|
||||
|
||||
// The casing of the PDB path stamped in the OBJ can differ from the actual path
|
||||
// on disk. With this, we ensure to always use lowercase as a key for the
|
||||
// PDBInputFile::Instances map, at least on Windows.
|
||||
static std::string normalizePdbPath(StringRef path) {
|
||||
#if defined(_WIN32)
|
||||
return path.lower();
|
||||
#else // LINUX
|
||||
return path;
|
||||
#endif
|
||||
}
|
||||
|
||||
// If existing, return the actual PDB path on disk.
|
||||
static Optional<std::string> findPdbPath(StringRef pdbPath,
|
||||
const ObjFile *dependentFile) {
|
||||
// Ensure the file exists before anything else. In some cases, if the path
|
||||
// points to a removable device, Driver::enqueuePath() would fail with an
|
||||
// error (EAGAIN, "resource unavailable try again") which we want to skip
|
||||
// silently.
|
||||
if (llvm::sys::fs::exists(pdbPath))
|
||||
return normalizePdbPath(pdbPath);
|
||||
std::string ret = getPdbBaseName(dependentFile, pdbPath);
|
||||
if (llvm::sys::fs::exists(ret))
|
||||
return normalizePdbPath(ret);
|
||||
return None;
|
||||
}
|
||||
|
||||
// Fetch the PDB instance that was already loaded by the COFF Driver.
|
||||
Expected<TypeServerSource *>
|
||||
TypeServerSource::findFromFile(const ObjFile *dependentFile) {
|
||||
const TypeServer2Record &ts =
|
||||
retrieveDependencyInfo<TypeServer2Record>(dependentFile->debugTypesObj);
|
||||
|
||||
Optional<std::string> p = findPdbPath(ts.Name, dependentFile);
|
||||
if (!p)
|
||||
return createFileError(ts.Name, errorCodeToError(std::error_code(
|
||||
ENOENT, std::generic_category())));
|
||||
|
||||
auto it = TypeServerSource::instances.find(*p);
|
||||
// The PDB file exists on disk, at this point we expect it to have been
|
||||
// inserted in the map by TypeServerSource::loadPDB()
|
||||
assert(it != TypeServerSource::instances.end());
|
||||
|
||||
std::pair<std::string, TypeServerSource *> &pdb = it->second;
|
||||
|
||||
if (!pdb.second)
|
||||
return createFileError(
|
||||
*p, createStringError(inconvertibleErrorCode(), pdb.first.c_str()));
|
||||
|
||||
pdb::PDBFile &pdbFile = (pdb.second)->session->getPDBFile();
|
||||
pdb::InfoStream &info = cantFail(pdbFile.getPDBInfoStream());
|
||||
|
||||
// Just because a file with a matching name was found doesn't mean it can be
|
||||
// used. The GUID must match between the PDB header and the OBJ
|
||||
// TypeServer2 record. The 'Age' is used by MSVC incremental compilation.
|
||||
if (info.getGuid() != ts.getGuid())
|
||||
return createFileError(
|
||||
ts.Name,
|
||||
make_error<pdb::PDBError>(pdb::pdb_error_code::signature_out_of_date));
|
||||
|
||||
return pdb.second;
|
||||
}
|
||||
|
||||
// FIXME: Temporary interface until PDBLinker::maybeMergeTypeServerPDB() is
|
||||
// moved here.
|
||||
Expected<llvm::pdb::NativeSession *>
|
||||
lld::coff::findTypeServerSource(const ObjFile *f) {
|
||||
Expected<TypeServerSource *> ts = TypeServerSource::findFromFile(f);
|
||||
if (!ts)
|
||||
return ts.takeError();
|
||||
return ts.get()->session.get();
|
||||
}
|
||||
|
||||
// Queue a PDB type server for loading in the COFF Driver
|
||||
void TypeServerSource::enqueue(const ObjFile *dependentFile,
|
||||
const TypeServer2Record &ts) {
|
||||
// Start by finding where the PDB is located (either the record path or next
|
||||
// to the OBJ file)
|
||||
Optional<std::string> p = findPdbPath(ts.Name, dependentFile);
|
||||
if (!p)
|
||||
return;
|
||||
auto it = TypeServerSource::instances.emplace(
|
||||
*p, std::pair<std::string, TypeServerSource *>{});
|
||||
if (!it.second)
|
||||
return; // another OBJ already scheduled this PDB for load
|
||||
|
||||
driver->enqueuePath(*p, false);
|
||||
}
|
||||
|
||||
// Create an instance of TypeServerSource or an error string if the PDB couldn't
|
||||
// be loaded. The error message will be displayed later, when the referring OBJ
|
||||
// will be merged in. NOTE - a PDB load failure is not a link error: some
|
||||
// debug info will simply be missing from the final PDB - that is the default
|
||||
// accepted behavior.
|
||||
void lld::coff::loadTypeServerSource(llvm::MemoryBufferRef m) {
|
||||
std::string path = normalizePdbPath(m.getBufferIdentifier());
|
||||
|
||||
Expected<TypeServerSource *> ts = TypeServerSource::getInstance(m);
|
||||
if (!ts)
|
||||
TypeServerSource::instances[path] = {toString(ts.takeError()), nullptr};
|
||||
else
|
||||
TypeServerSource::instances[path] = {{}, *ts};
|
||||
}
|
||||
|
||||
Expected<TypeServerSource *> TypeServerSource::getInstance(MemoryBufferRef m) {
|
||||
std::unique_ptr<llvm::pdb::IPDBSession> iSession;
|
||||
Error err = pdb::NativeSession::createFromPdb(
|
||||
MemoryBuffer::getMemBuffer(m, false), iSession);
|
||||
if (err)
|
||||
return std::move(err);
|
||||
|
||||
std::unique_ptr<llvm::pdb::NativeSession> session(
|
||||
static_cast<pdb::NativeSession *>(iSession.release()));
|
||||
|
||||
pdb::PDBFile &pdbFile = session->getPDBFile();
|
||||
Expected<pdb::InfoStream &> info = pdbFile.getPDBInfoStream();
|
||||
// All PDB Files should have an Info stream.
|
||||
if (!info)
|
||||
return info.takeError();
|
||||
return new TypeServerSource(m, session.release());
|
||||
}
|
||||
60
deps/lld/COFF/DebugTypes.h
vendored
Normal file
60
deps/lld/COFF/DebugTypes.h
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
//===- DebugTypes.h ---------------------------------------------*- C++ -*-===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLD_COFF_DEBUGTYPES_H
|
||||
#define LLD_COFF_DEBUGTYPES_H
|
||||
|
||||
#include "llvm/Support/Error.h"
|
||||
#include "llvm/Support/MemoryBuffer.h"
|
||||
|
||||
namespace llvm {
|
||||
namespace codeview {
|
||||
class PrecompRecord;
|
||||
class TypeServer2Record;
|
||||
} // namespace codeview
|
||||
namespace pdb {
|
||||
class NativeSession;
|
||||
}
|
||||
} // namespace llvm
|
||||
|
||||
namespace lld {
|
||||
namespace coff {
|
||||
|
||||
class ObjFile;
|
||||
|
||||
class TpiSource {
|
||||
public:
|
||||
enum TpiKind { Regular, PCH, UsingPCH, PDB, UsingPDB };
|
||||
|
||||
TpiSource(TpiKind k, const ObjFile *f);
|
||||
virtual ~TpiSource() {}
|
||||
|
||||
const TpiKind kind;
|
||||
const ObjFile *file;
|
||||
};
|
||||
|
||||
TpiSource *makeTpiSource(const ObjFile *f);
|
||||
TpiSource *makeUseTypeServerSource(const ObjFile *f,
|
||||
const llvm::codeview::TypeServer2Record *ts);
|
||||
TpiSource *makePrecompSource(const ObjFile *f);
|
||||
TpiSource *makeUsePrecompSource(const ObjFile *f,
|
||||
const llvm::codeview::PrecompRecord *precomp);
|
||||
|
||||
void loadTypeServerSource(llvm::MemoryBufferRef m);
|
||||
|
||||
// Temporary interface to get the dependency
|
||||
template <typename T> const T &retrieveDependencyInfo(const TpiSource *source);
|
||||
|
||||
// Temporary interface until we move PDBLinker::maybeMergeTypeServerPDB here
|
||||
llvm::Expected<llvm::pdb::NativeSession *>
|
||||
findTypeServerSource(const ObjFile *f);
|
||||
|
||||
} // namespace coff
|
||||
} // namespace lld
|
||||
|
||||
#endif
|
||||
1942
deps/lld/COFF/Driver.cpp
vendored
1942
deps/lld/COFF/Driver.cpp
vendored
File diff suppressed because it is too large
Load Diff
111
deps/lld/COFF/Driver.h
vendored
111
deps/lld/COFF/Driver.h
vendored
@@ -1,9 +1,8 @@
|
||||
//===- Driver.h -------------------------------------------------*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Linker
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
@@ -31,7 +30,7 @@ namespace lld {
|
||||
namespace coff {
|
||||
|
||||
class LinkerDriver;
|
||||
extern LinkerDriver *Driver;
|
||||
extern LinkerDriver *driver;
|
||||
|
||||
using llvm::COFF::MachineTypes;
|
||||
using llvm::COFF::WindowsSubsystem;
|
||||
@@ -45,65 +44,71 @@ public:
|
||||
class ArgParser {
|
||||
public:
|
||||
// Concatenate LINK environment variable and given arguments and parse them.
|
||||
llvm::opt::InputArgList parseLINK(std::vector<const char *> Args);
|
||||
llvm::opt::InputArgList parseLINK(std::vector<const char *> args);
|
||||
|
||||
// Tokenizes a given string and then parses as command line options.
|
||||
llvm::opt::InputArgList parse(StringRef S) { return parse(tokenize(S)); }
|
||||
llvm::opt::InputArgList parse(StringRef s) { return parse(tokenize(s)); }
|
||||
|
||||
// Tokenizes a given string and then parses as command line options in
|
||||
// .drectve section. /EXPORT options are returned in second element
|
||||
// to be processed in fastpath.
|
||||
std::pair<llvm::opt::InputArgList, std::vector<StringRef>>
|
||||
parseDirectives(StringRef S);
|
||||
parseDirectives(StringRef s);
|
||||
|
||||
private:
|
||||
// Parses command line options.
|
||||
llvm::opt::InputArgList parse(llvm::ArrayRef<const char *> Args);
|
||||
llvm::opt::InputArgList parse(llvm::ArrayRef<const char *> args);
|
||||
|
||||
std::vector<const char *> tokenize(StringRef S);
|
||||
std::vector<const char *> tokenize(StringRef s);
|
||||
|
||||
COFFOptTable Table;
|
||||
COFFOptTable table;
|
||||
};
|
||||
|
||||
class LinkerDriver {
|
||||
public:
|
||||
void link(llvm::ArrayRef<const char *> Args);
|
||||
void link(llvm::ArrayRef<const char *> args);
|
||||
|
||||
// Used by the resolver to parse .drectve section contents.
|
||||
void parseDirectives(StringRef S);
|
||||
void parseDirectives(InputFile *file);
|
||||
|
||||
// Used by ArchiveFile to enqueue members.
|
||||
void enqueueArchiveMember(const Archive::Child &C, StringRef SymName,
|
||||
StringRef ParentName);
|
||||
void enqueueArchiveMember(const Archive::Child &c, const Archive::Symbol &sym,
|
||||
StringRef parentName);
|
||||
|
||||
MemoryBufferRef takeBuffer(std::unique_ptr<MemoryBuffer> MB);
|
||||
MemoryBufferRef takeBuffer(std::unique_ptr<MemoryBuffer> mb);
|
||||
|
||||
void enqueuePath(StringRef path, bool wholeArchive);
|
||||
|
||||
private:
|
||||
std::unique_ptr<llvm::TarWriter> Tar; // for /linkrepro
|
||||
std::unique_ptr<llvm::TarWriter> tar; // for /linkrepro
|
||||
|
||||
// Opens a file. Path has to be resolved already.
|
||||
MemoryBufferRef openFile(StringRef Path);
|
||||
MemoryBufferRef openFile(StringRef path);
|
||||
|
||||
// Searches a file from search paths.
|
||||
Optional<StringRef> findFile(StringRef Filename);
|
||||
Optional<StringRef> findLib(StringRef Filename);
|
||||
StringRef doFindFile(StringRef Filename);
|
||||
StringRef doFindLib(StringRef Filename);
|
||||
StringRef doFindLibMinGW(StringRef Filename);
|
||||
Optional<StringRef> findFile(StringRef filename);
|
||||
Optional<StringRef> findLib(StringRef filename);
|
||||
StringRef doFindFile(StringRef filename);
|
||||
StringRef doFindLib(StringRef filename);
|
||||
StringRef doFindLibMinGW(StringRef filename);
|
||||
|
||||
// Parses LIB environment which contains a list of search paths.
|
||||
void addLibSearchPaths();
|
||||
|
||||
// Library search path. The first element is always "" (current directory).
|
||||
std::vector<StringRef> SearchPaths;
|
||||
std::vector<StringRef> searchPaths;
|
||||
|
||||
void maybeExportMinGWSymbols(const llvm::opt::InputArgList &args);
|
||||
|
||||
// We don't want to add the same file more than once.
|
||||
// Files are uniquified by their filesystem and file number.
|
||||
std::set<llvm::sys::fs::UniqueID> VisitedFiles;
|
||||
std::set<llvm::sys::fs::UniqueID> visitedFiles;
|
||||
|
||||
std::set<std::string> VisitedLibs;
|
||||
std::set<std::string> visitedLibs;
|
||||
|
||||
Symbol *addUndefined(StringRef Sym);
|
||||
Symbol *addUndefined(StringRef sym);
|
||||
|
||||
StringRef mangleMaybe(Symbol *s);
|
||||
|
||||
// Windows specific -- "main" is not the only main function in Windows.
|
||||
// You can choose one from these four -- {w,}{WinMain,main}.
|
||||
@@ -115,60 +120,60 @@ private:
|
||||
StringRef findDefaultEntry();
|
||||
WindowsSubsystem inferSubsystem();
|
||||
|
||||
void addBuffer(std::unique_ptr<MemoryBuffer> MB, bool WholeArchive);
|
||||
void addArchiveBuffer(MemoryBufferRef MBRef, StringRef SymName,
|
||||
StringRef ParentName);
|
||||
void addBuffer(std::unique_ptr<MemoryBuffer> mb, bool wholeArchive);
|
||||
void addArchiveBuffer(MemoryBufferRef mbref, StringRef symName,
|
||||
StringRef parentName, uint64_t offsetInArchive);
|
||||
|
||||
void enqueuePath(StringRef Path, bool WholeArchive);
|
||||
|
||||
void enqueueTask(std::function<void()> Task);
|
||||
void enqueueTask(std::function<void()> task);
|
||||
bool run();
|
||||
|
||||
std::list<std::function<void()>> TaskQueue;
|
||||
std::vector<StringRef> FilePaths;
|
||||
std::vector<MemoryBufferRef> Resources;
|
||||
std::list<std::function<void()>> taskQueue;
|
||||
std::vector<StringRef> filePaths;
|
||||
std::vector<MemoryBufferRef> resources;
|
||||
|
||||
llvm::StringSet<> DirectivesExports;
|
||||
llvm::StringSet<> directivesExports;
|
||||
};
|
||||
|
||||
// Functions below this line are defined in DriverUtils.cpp.
|
||||
|
||||
void printHelp(const char *Argv0);
|
||||
|
||||
// For /machine option.
|
||||
MachineTypes getMachineType(StringRef Arg);
|
||||
StringRef machineToStr(MachineTypes MT);
|
||||
void printHelp(const char *argv0);
|
||||
|
||||
// Parses a string in the form of "<integer>[,<integer>]".
|
||||
void parseNumbers(StringRef Arg, uint64_t *Addr, uint64_t *Size = nullptr);
|
||||
void parseNumbers(StringRef arg, uint64_t *addr, uint64_t *size = nullptr);
|
||||
|
||||
void parseGuard(StringRef Arg);
|
||||
void parseGuard(StringRef arg);
|
||||
|
||||
// Parses a string in the form of "<integer>[.<integer>]".
|
||||
// Minor's default value is 0.
|
||||
void parseVersion(StringRef Arg, uint32_t *Major, uint32_t *Minor);
|
||||
void parseVersion(StringRef arg, uint32_t *major, uint32_t *minor);
|
||||
|
||||
// Parses a string in the form of "<subsystem>[,<integer>[.<integer>]]".
|
||||
void parseSubsystem(StringRef Arg, WindowsSubsystem *Sys, uint32_t *Major,
|
||||
uint32_t *Minor);
|
||||
void parseSubsystem(StringRef arg, WindowsSubsystem *sys, uint32_t *major,
|
||||
uint32_t *minor);
|
||||
|
||||
void parseAlternateName(StringRef);
|
||||
void parseMerge(StringRef);
|
||||
void parseSection(StringRef);
|
||||
void parseAligncomm(StringRef);
|
||||
|
||||
// Parses a string in the form of "[:<integer>]"
|
||||
void parseFunctionPadMin(llvm::opt::Arg *a, llvm::COFF::MachineTypes machine);
|
||||
|
||||
// Parses a string in the form of "EMBED[,=<integer>]|NO".
|
||||
void parseManifest(StringRef Arg);
|
||||
void parseManifest(StringRef arg);
|
||||
|
||||
// Parses a string in the form of "level=<string>|uiAccess=<string>"
|
||||
void parseManifestUAC(StringRef Arg);
|
||||
void parseManifestUAC(StringRef arg);
|
||||
|
||||
// Parses a string in the form of "cd|net[,(cd|net)]*"
|
||||
void parseSwaprun(StringRef arg);
|
||||
|
||||
// Create a resource file containing a manifest XML.
|
||||
std::unique_ptr<MemoryBuffer> createManifestRes();
|
||||
void createSideBySideManifest();
|
||||
|
||||
// Used for dllexported symbols.
|
||||
Export parseExport(StringRef Arg);
|
||||
Export parseExport(StringRef arg);
|
||||
void fixupExports();
|
||||
void assignExportOrdinals();
|
||||
|
||||
@@ -176,12 +181,12 @@ void assignExportOrdinals();
|
||||
// if value matches previous values for the key.
|
||||
// This feature used in the directive section to reject
|
||||
// incompatible objects.
|
||||
void checkFailIfMismatch(StringRef Arg);
|
||||
void checkFailIfMismatch(StringRef arg, InputFile *source);
|
||||
|
||||
// Convert Windows resource files (.res files) to a .obj file.
|
||||
MemoryBufferRef convertResToCOFF(ArrayRef<MemoryBufferRef> MBs);
|
||||
MemoryBufferRef convertResToCOFF(ArrayRef<MemoryBufferRef> mbs);
|
||||
|
||||
void runMSVCLinker(std::string Rsp, ArrayRef<StringRef> Objects);
|
||||
void runMSVCLinker(std::string rsp, ArrayRef<StringRef> objects);
|
||||
|
||||
// Create enum with OPT_xxx values for each option in Options.td
|
||||
enum {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user