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