1/*===---- module.modulemap - intrinsics module map -------------------------===
2 *
3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 * See https://llvm.org/LICENSE.txt for license information.
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 *
7 *===-----------------------------------------------------------------------===
8 */
9
10module _Builtin_intrinsics [system] [extern_c] {
11 explicit module altivec {
12 requires altivec
13 header "altivec.h"
14 }
15
16 explicit module arm {
17 requires arm
18
19 explicit module acle {
20 header "arm_acle.h"
21 export *
22 }
23
24 explicit module bf16 {
25 header "arm_bf16.h"
26 export *
27 }
28
29 explicit module fp16 {
30 header "arm_fp16.h"
31 export *
32 }
33
34 explicit module neon {
35 requires neon
36 header "arm_neon.h"
37 export *
38 }
39
40 explicit module sve {
41 requires sve
42 header "arm_sve.h"
43 export *
44 }
45 }
46
47 explicit module arm64 {
48 requires arm64
49 requires windows
50
51 header "arm64intr.h"
52 export *
53
54 explicit module neon {
55 requires neon
56 header "arm64_neon.h"
57 export *
58 }
59 }
60
61 explicit module intel {
62 requires x86
63 export *
64
65 header "immintrin.h"
66 textual header "f16cintrin.h"
67 textual header "avxintrin.h"
68 textual header "avx2intrin.h"
69 textual header "avx512fintrin.h"
70 textual header "fmaintrin.h"
71
72 header "x86intrin.h"
73 textual header "bmiintrin.h"
74 textual header "bmi2intrin.h"
75 textual header "lzcntintrin.h"
76 textual header "xopintrin.h"
77 textual header "fma4intrin.h"
78 textual header "mwaitxintrin.h"
79 textual header "clzerointrin.h"
80 textual header "wbnoinvdintrin.h"
81 textual header "cldemoteintrin.h"
82 textual header "waitpkgintrin.h"
83 textual header "movdirintrin.h"
84 textual header "pconfigintrin.h"
85 textual header "sgxintrin.h"
86 textual header "ptwriteintrin.h"
87 textual header "invpcidintrin.h"
88
89 textual header "__wmmintrin_aes.h"
90 textual header "__wmmintrin_pclmul.h"
91
92 textual header "mm3dnow.h"
93
94 explicit module mm_malloc {
95 requires !freestanding
96 header "mm_malloc.h"
97 export * // note: for <stdlib.h> dependency
98 }
99
100 explicit module cpuid {
101 requires gnuinlineasm
102 header "cpuid.h"
103 }
104
105 explicit module mmx {
106 header "mmintrin.h"
107 }
108
109 explicit module sse {
110 export mm_malloc
111 export mmx
112 export sse2 // note: for hackish <emmintrin.h> dependency
113 header "xmmintrin.h"
114 }
115
116 explicit module sse2 {
117 export sse
118 header "emmintrin.h"
119 }
120
121 explicit module sse3 {
122 export sse2
123 header "pmmintrin.h"
124 }
125
126 explicit module ssse3 {
127 export sse3
128 header "tmmintrin.h"
129 }
130
131 explicit module sse4_1 {
132 export ssse3
133 header "smmintrin.h"
134 }
135
136 explicit module sse4_2 {
137 export sse4_1
138 header "nmmintrin.h"
139 }
140
141 explicit module sse4a {
142 export sse3
143 header "ammintrin.h"
144 }
145
146 explicit module popcnt {
147 header "popcntintrin.h"
148 }
149
150 explicit module aes_pclmul {
151 header "wmmintrin.h"
152 export aes
153 export pclmul
154 }
155 }
156
157 explicit module systemz {
158 requires systemz
159 export *
160
161 header "s390intrin.h"
162
163 explicit module htm {
164 requires htm
165 header "htmintrin.h"
166 header "htmxlintrin.h"
167 }
168
169 explicit module zvector {
170 requires zvector, vx
171 header "vecintrin.h"
172 }
173 }
174}
175
176// Start -fbuiltin-headers-in-system-modules affected modules
177
178// The following modules all ignore their headers when
179// -fbuiltin-headers-in-system-modules is passed, and many of
180// those headers join system modules when present.
181
182// e.g. if -fbuiltin-headers-in-system-modules is passed, then
183// float.h will not be in the _Builtin_float module (that module
184// will be empty). If there is a system module that declares
185// `header "float.h"`, then the builtin float.h will join
186// that module. The system float.h (if present) will be treated
187// as a textual header in the sytem module.
188module _Builtin_float [system] {
189 textual header "float.h"
190
191 explicit module float {
192 header "__float_float.h"
193 export *
194 }
195
196 explicit module header_macro {
197 header "__float_header_macro.h"
198 export *
199 }
200
201 explicit module infinity_nan {
202 header "__float_infinity_nan.h"
203 export *
204 }
205}
206
207module _Builtin_inttypes [system] {
208 header "inttypes.h"
209 export *
210}
211
212module _Builtin_iso646 [system] {
213 header "iso646.h"
214 export *
215}
216
217module _Builtin_limits [system] {
218 header "limits.h"
219 export *
220}
221
222module _Builtin_stdalign [system] {
223 header "stdalign.h"
224 export *
225}
226
227module _Builtin_stdarg [system] {
228 textual header "stdarg.h"
229
230 explicit module __gnuc_va_list {
231 header "__stdarg___gnuc_va_list.h"
232 export *
233 }
234
235 explicit module __va_copy {
236 header "__stdarg___va_copy.h"
237 export *
238 }
239
240 explicit module header_macro {
241 header "__stdarg_header_macro.h"
242 export *
243 }
244
245 explicit module va_arg {
246 header "__stdarg_va_arg.h"
247 export *
248 }
249
250 explicit module va_copy {
251 header "__stdarg_va_copy.h"
252 export *
253 }
254
255 explicit module va_list {
256 header "__stdarg_va_list.h"
257 export *
258 }
259}
260
261module _Builtin_stdatomic [system] {
262 header "stdatomic.h"
263 export *
264}
265
266module _Builtin_stdbool [system] {
267 header "stdbool.h"
268 export *
269}
270
271module _Builtin_stdckdint [system] {
272 header "stdckdint.h"
273 export *
274}
275
276module _Builtin_stdcountof [system] {
277 header "stdcountof.h"
278 export *
279}
280
281module _Builtin_stddef [system] {
282 textual header "stddef.h"
283
284 explicit module header_macro {
285 header "__stddef_header_macro.h"
286 export *
287 }
288 // __stddef_max_align_t.h is always in this module, even if
289 // -fbuiltin-headers-in-system-modules is passed.
290 explicit module max_align_t {
291 header "__stddef_max_align_t.h"
292 export *
293 }
294
295 explicit module null {
296 header "__stddef_null.h"
297 export *
298 }
299
300 explicit module nullptr_t {
301 header "__stddef_nullptr_t.h"
302 export *
303 }
304
305 explicit module offsetof {
306 header "__stddef_offsetof.h"
307 export *
308 }
309
310 explicit module ptrdiff_t {
311 header "__stddef_ptrdiff_t.h"
312 export *
313 }
314
315 explicit module rsize_t {
316 header "__stddef_rsize_t.h"
317 export *
318 }
319
320 explicit module size_t {
321 header "__stddef_size_t.h"
322 export *
323 }
324
325 explicit module unreachable {
326 header "__stddef_unreachable.h"
327 export *
328 }
329
330 explicit module wchar_t {
331 header "__stddef_wchar_t.h"
332 export *
333 }
334}
335
336// wint_t is provided by <wchar.h> and not <stddef.h>. It's here
337// for compatibility, but must be explicitly requested. Therefore
338// __stddef_wint_t.h is not part of _Builtin_stddef. It is always in
339// this module even if -fbuiltin-headers-in-system-modules is passed.
340module _Builtin_stddef_wint_t [system] {
341 header "__stddef_wint_t.h"
342 export *
343}
344
345module _Builtin_stdint [system] {
346 header "stdint.h"
347 export *
348}
349
350module _Builtin_stdnoreturn [system] {
351 header "stdnoreturn.h"
352 export *
353}
354
355module _Builtin_tgmath [system] {
356 header "tgmath.h"
357 export *
358}
359
360module _Builtin_unwind [system] {
361 header "unwind.h"
362 export *
363}
364// End -fbuiltin-headers-in-system-modules affected modules
365
366module opencl_c [system] {
367 requires opencl
368 header "opencl-c.h"
369 header "opencl-c-base.h"
370}
371
372module ptrauth [system] {
373 header "ptrauth.h"
374 export *
375}