xref: /freebsd/contrib/llvm-project/clang/lib/Headers/module.modulemap (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
10b57cec5SDimitry Andric/*===---- module.modulemap - intrinsics module map -------------------------===
20b57cec5SDimitry Andric *
30b57cec5SDimitry Andric * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric * See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric *
70b57cec5SDimitry Andric *===-----------------------------------------------------------------------===
80b57cec5SDimitry Andric */
90b57cec5SDimitry Andric
100b57cec5SDimitry Andricmodule _Builtin_intrinsics [system] [extern_c] {
110b57cec5SDimitry Andric  explicit module altivec {
120b57cec5SDimitry Andric    requires altivec
130b57cec5SDimitry Andric    header "altivec.h"
140b57cec5SDimitry Andric  }
150b57cec5SDimitry Andric
160b57cec5SDimitry Andric  explicit module arm {
170b57cec5SDimitry Andric    requires arm
180b57cec5SDimitry Andric
190b57cec5SDimitry Andric    explicit module acle {
200b57cec5SDimitry Andric      header "arm_acle.h"
210b57cec5SDimitry Andric      export *
220b57cec5SDimitry Andric    }
230b57cec5SDimitry Andric
240b57cec5SDimitry Andric    explicit module neon {
250b57cec5SDimitry Andric      requires neon
260b57cec5SDimitry Andric      header "arm_neon.h"
270b57cec5SDimitry Andric      header "arm_fp16.h"
280b57cec5SDimitry Andric      export *
290b57cec5SDimitry Andric    }
305ffd83dbSDimitry Andric
315ffd83dbSDimitry Andric    explicit module sve {
325ffd83dbSDimitry Andric      requires sve
335ffd83dbSDimitry Andric      header "arm_sve.h"
345ffd83dbSDimitry Andric      export *
355ffd83dbSDimitry Andric    }
360b57cec5SDimitry Andric  }
370b57cec5SDimitry Andric
380b57cec5SDimitry Andric  explicit module intel {
390b57cec5SDimitry Andric    requires x86
400b57cec5SDimitry Andric    export *
410b57cec5SDimitry Andric
420b57cec5SDimitry Andric    header "immintrin.h"
430b57cec5SDimitry Andric    textual header "f16cintrin.h"
440b57cec5SDimitry Andric    textual header "avxintrin.h"
450b57cec5SDimitry Andric    textual header "avx2intrin.h"
460b57cec5SDimitry Andric    textual header "avx512fintrin.h"
470b57cec5SDimitry Andric    textual header "fmaintrin.h"
480b57cec5SDimitry Andric
490b57cec5SDimitry Andric    header "x86intrin.h"
500b57cec5SDimitry Andric    textual header "bmiintrin.h"
510b57cec5SDimitry Andric    textual header "bmi2intrin.h"
520b57cec5SDimitry Andric    textual header "lzcntintrin.h"
530b57cec5SDimitry Andric    textual header "xopintrin.h"
540b57cec5SDimitry Andric    textual header "fma4intrin.h"
550b57cec5SDimitry Andric    textual header "mwaitxintrin.h"
560b57cec5SDimitry Andric    textual header "clzerointrin.h"
570b57cec5SDimitry Andric    textual header "wbnoinvdintrin.h"
580b57cec5SDimitry Andric    textual header "cldemoteintrin.h"
590b57cec5SDimitry Andric    textual header "waitpkgintrin.h"
600b57cec5SDimitry Andric    textual header "movdirintrin.h"
610b57cec5SDimitry Andric    textual header "pconfigintrin.h"
620b57cec5SDimitry Andric    textual header "sgxintrin.h"
630b57cec5SDimitry Andric    textual header "ptwriteintrin.h"
640b57cec5SDimitry Andric    textual header "invpcidintrin.h"
650b57cec5SDimitry Andric
660b57cec5SDimitry Andric    textual header "__wmmintrin_aes.h"
670b57cec5SDimitry Andric    textual header "__wmmintrin_pclmul.h"
680b57cec5SDimitry Andric
690b57cec5SDimitry Andric    explicit module mm_malloc {
700b57cec5SDimitry Andric      requires !freestanding
710b57cec5SDimitry Andric      header "mm_malloc.h"
720b57cec5SDimitry Andric      export * // note: for <stdlib.h> dependency
730b57cec5SDimitry Andric    }
740b57cec5SDimitry Andric
750b57cec5SDimitry Andric    explicit module cpuid {
760b57cec5SDimitry Andric      requires gnuinlineasm
770b57cec5SDimitry Andric      header "cpuid.h"
780b57cec5SDimitry Andric    }
790b57cec5SDimitry Andric
800b57cec5SDimitry Andric    explicit module mmx {
810b57cec5SDimitry Andric      header "mmintrin.h"
820b57cec5SDimitry Andric    }
830b57cec5SDimitry Andric
840b57cec5SDimitry Andric    explicit module sse {
850b57cec5SDimitry Andric      export mm_malloc
860b57cec5SDimitry Andric      export mmx
870b57cec5SDimitry Andric      export sse2 // note: for hackish <emmintrin.h> dependency
880b57cec5SDimitry Andric      header "xmmintrin.h"
890b57cec5SDimitry Andric    }
900b57cec5SDimitry Andric
910b57cec5SDimitry Andric    explicit module sse2 {
920b57cec5SDimitry Andric      export sse
930b57cec5SDimitry Andric      header "emmintrin.h"
940b57cec5SDimitry Andric    }
950b57cec5SDimitry Andric
960b57cec5SDimitry Andric    explicit module sse3 {
970b57cec5SDimitry Andric      export sse2
980b57cec5SDimitry Andric      header "pmmintrin.h"
990b57cec5SDimitry Andric    }
1000b57cec5SDimitry Andric
1010b57cec5SDimitry Andric    explicit module ssse3 {
1020b57cec5SDimitry Andric      export sse3
1030b57cec5SDimitry Andric      header "tmmintrin.h"
1040b57cec5SDimitry Andric    }
1050b57cec5SDimitry Andric
1060b57cec5SDimitry Andric    explicit module sse4_1 {
1070b57cec5SDimitry Andric      export ssse3
1080b57cec5SDimitry Andric      header "smmintrin.h"
1090b57cec5SDimitry Andric    }
1100b57cec5SDimitry Andric
1110b57cec5SDimitry Andric    explicit module sse4_2 {
1120b57cec5SDimitry Andric      export sse4_1
1130b57cec5SDimitry Andric      header "nmmintrin.h"
1140b57cec5SDimitry Andric    }
1150b57cec5SDimitry Andric
1160b57cec5SDimitry Andric    explicit module sse4a {
1170b57cec5SDimitry Andric      export sse3
1180b57cec5SDimitry Andric      header "ammintrin.h"
1190b57cec5SDimitry Andric    }
1200b57cec5SDimitry Andric
1210b57cec5SDimitry Andric    explicit module popcnt {
1220b57cec5SDimitry Andric      header "popcntintrin.h"
1230b57cec5SDimitry Andric    }
1240b57cec5SDimitry Andric
1250b57cec5SDimitry Andric    explicit module mm3dnow {
1260b57cec5SDimitry Andric      header "mm3dnow.h"
1270b57cec5SDimitry Andric    }
1280b57cec5SDimitry Andric
1290b57cec5SDimitry Andric    explicit module aes_pclmul {
1300b57cec5SDimitry Andric      header "wmmintrin.h"
1310b57cec5SDimitry Andric      export aes
1320b57cec5SDimitry Andric      export pclmul
1330b57cec5SDimitry Andric    }
1340b57cec5SDimitry Andric  }
1350b57cec5SDimitry Andric
1360b57cec5SDimitry Andric  explicit module systemz {
1370b57cec5SDimitry Andric    requires systemz
1380b57cec5SDimitry Andric    export *
1390b57cec5SDimitry Andric
1400b57cec5SDimitry Andric    header "s390intrin.h"
1410b57cec5SDimitry Andric
1420b57cec5SDimitry Andric    explicit module htm {
1430b57cec5SDimitry Andric      requires htm
1440b57cec5SDimitry Andric      header "htmintrin.h"
1450b57cec5SDimitry Andric      header "htmxlintrin.h"
1460b57cec5SDimitry Andric    }
1470b57cec5SDimitry Andric
1480b57cec5SDimitry Andric    explicit module zvector {
1490b57cec5SDimitry Andric      requires zvector, vx
1500b57cec5SDimitry Andric      header "vecintrin.h"
1510b57cec5SDimitry Andric    }
1520b57cec5SDimitry Andric  }
1530b57cec5SDimitry Andric}
1540b57cec5SDimitry Andric
1555f757f3fSDimitry Andric// Start -fbuiltin-headers-in-system-modules affected modules
1565f757f3fSDimitry Andric
157439352acSDimitry Andric// The following modules all ignore their headers when
158439352acSDimitry Andric// -fbuiltin-headers-in-system-modules is passed, and many of
159439352acSDimitry Andric// those headers join system modules when present.
1605f757f3fSDimitry Andric
1615f757f3fSDimitry Andric// e.g. if -fbuiltin-headers-in-system-modules is passed, then
1625f757f3fSDimitry Andric// float.h will not be in the _Builtin_float module (that module
1635f757f3fSDimitry Andric// will be empty). If there is a system module that declares
1645f757f3fSDimitry Andric// `header "float.h"`, then the builtin float.h will join
1655f757f3fSDimitry Andric// that module. The system float.h (if present) will be treated
1665f757f3fSDimitry Andric// as a textual header in the sytem module.
1675f757f3fSDimitry Andricmodule _Builtin_float [system] {
1685f757f3fSDimitry Andric  header "float.h"
1695f757f3fSDimitry Andric  export *
1700b57cec5SDimitry Andric}
1710b57cec5SDimitry Andric
1725f757f3fSDimitry Andricmodule _Builtin_inttypes [system] {
1735f757f3fSDimitry Andric  header "inttypes.h"
1745f757f3fSDimitry Andric  export *
1755f757f3fSDimitry Andric}
1765f757f3fSDimitry Andric
1775f757f3fSDimitry Andricmodule _Builtin_iso646 [system] {
1785f757f3fSDimitry Andric  header "iso646.h"
1795f757f3fSDimitry Andric  export *
1805f757f3fSDimitry Andric}
1815f757f3fSDimitry Andric
1825f757f3fSDimitry Andricmodule _Builtin_limits [system] {
1835f757f3fSDimitry Andric  header "limits.h"
1845f757f3fSDimitry Andric  export *
1855f757f3fSDimitry Andric}
1865f757f3fSDimitry Andric
1875f757f3fSDimitry Andricmodule _Builtin_stdalign [system] {
1885f757f3fSDimitry Andric  header "stdalign.h"
1895f757f3fSDimitry Andric  export *
1905f757f3fSDimitry Andric}
1915f757f3fSDimitry Andric
1925f757f3fSDimitry Andricmodule _Builtin_stdarg [system] {
1935f757f3fSDimitry Andric  textual header "stdarg.h"
1945f757f3fSDimitry Andric
1955f757f3fSDimitry Andric  explicit module __gnuc_va_list {
1965f757f3fSDimitry Andric    header "__stdarg___gnuc_va_list.h"
1975f757f3fSDimitry Andric    export *
1985f757f3fSDimitry Andric  }
1995f757f3fSDimitry Andric
2005f757f3fSDimitry Andric  explicit module __va_copy {
2015f757f3fSDimitry Andric    header "__stdarg___va_copy.h"
2025f757f3fSDimitry Andric    export *
2035f757f3fSDimitry Andric  }
2045f757f3fSDimitry Andric
205*0fca6ea1SDimitry Andric  explicit module header_macro {
206*0fca6ea1SDimitry Andric    header "__stdarg_header_macro.h"
207*0fca6ea1SDimitry Andric    export *
208*0fca6ea1SDimitry Andric  }
209*0fca6ea1SDimitry Andric
2105f757f3fSDimitry Andric  explicit module va_arg {
2115f757f3fSDimitry Andric    header "__stdarg_va_arg.h"
2125f757f3fSDimitry Andric    export *
2135f757f3fSDimitry Andric  }
2145f757f3fSDimitry Andric
2155f757f3fSDimitry Andric  explicit module va_copy {
2165f757f3fSDimitry Andric    header "__stdarg_va_copy.h"
2175f757f3fSDimitry Andric    export *
2185f757f3fSDimitry Andric  }
2195f757f3fSDimitry Andric
2205f757f3fSDimitry Andric  explicit module va_list {
2215f757f3fSDimitry Andric    header "__stdarg_va_list.h"
2225f757f3fSDimitry Andric    export *
2235f757f3fSDimitry Andric  }
2245f757f3fSDimitry Andric}
2255f757f3fSDimitry Andric
2265f757f3fSDimitry Andricmodule _Builtin_stdatomic [system] {
2275f757f3fSDimitry Andric  header "stdatomic.h"
2285f757f3fSDimitry Andric  export *
2295f757f3fSDimitry Andric}
2305f757f3fSDimitry Andric
2315f757f3fSDimitry Andricmodule _Builtin_stdbool [system] {
2325f757f3fSDimitry Andric  header "stdbool.h"
2335f757f3fSDimitry Andric  export *
2345f757f3fSDimitry Andric}
2355f757f3fSDimitry Andric
2365f757f3fSDimitry Andricmodule _Builtin_stddef [system] {
2375f757f3fSDimitry Andric  textual header "stddef.h"
2385f757f3fSDimitry Andric
239*0fca6ea1SDimitry Andric  explicit module header_macro {
240*0fca6ea1SDimitry Andric    header "__stddef_header_macro.h"
241*0fca6ea1SDimitry Andric    export *
242*0fca6ea1SDimitry Andric  }
243439352acSDimitry Andric  // __stddef_max_align_t.h is always in this module, even if
244439352acSDimitry Andric  // -fbuiltin-headers-in-system-modules is passed.
2455f757f3fSDimitry Andric  explicit module max_align_t {
2465f757f3fSDimitry Andric    header "__stddef_max_align_t.h"
2475f757f3fSDimitry Andric    export *
2485f757f3fSDimitry Andric  }
2495f757f3fSDimitry Andric
2505f757f3fSDimitry Andric  explicit module null {
2515f757f3fSDimitry Andric    header "__stddef_null.h"
2525f757f3fSDimitry Andric    export *
2535f757f3fSDimitry Andric  }
2545f757f3fSDimitry Andric
2555f757f3fSDimitry Andric  explicit module nullptr_t {
2565f757f3fSDimitry Andric    header "__stddef_nullptr_t.h"
2575f757f3fSDimitry Andric    export *
2585f757f3fSDimitry Andric  }
2595f757f3fSDimitry Andric
2605f757f3fSDimitry Andric  explicit module offsetof {
2615f757f3fSDimitry Andric    header "__stddef_offsetof.h"
2625f757f3fSDimitry Andric    export *
2635f757f3fSDimitry Andric  }
2645f757f3fSDimitry Andric
2655f757f3fSDimitry Andric  explicit module ptrdiff_t {
2665f757f3fSDimitry Andric    header "__stddef_ptrdiff_t.h"
2675f757f3fSDimitry Andric    export *
2685f757f3fSDimitry Andric  }
2695f757f3fSDimitry Andric
2705f757f3fSDimitry Andric  explicit module rsize_t {
2715f757f3fSDimitry Andric    header "__stddef_rsize_t.h"
2725f757f3fSDimitry Andric    export *
2735f757f3fSDimitry Andric  }
2745f757f3fSDimitry Andric
2755f757f3fSDimitry Andric  explicit module size_t {
2765f757f3fSDimitry Andric    header "__stddef_size_t.h"
2775f757f3fSDimitry Andric    export *
2785f757f3fSDimitry Andric  }
2795f757f3fSDimitry Andric
2805f757f3fSDimitry Andric  explicit module unreachable {
2815f757f3fSDimitry Andric    header "__stddef_unreachable.h"
2825f757f3fSDimitry Andric    export *
2835f757f3fSDimitry Andric  }
2845f757f3fSDimitry Andric
2855f757f3fSDimitry Andric  explicit module wchar_t {
2865f757f3fSDimitry Andric    header "__stddef_wchar_t.h"
2875f757f3fSDimitry Andric    export *
2885f757f3fSDimitry Andric  }
2895f757f3fSDimitry Andric}
2905f757f3fSDimitry Andric
291439352acSDimitry Andric// wint_t is provided by <wchar.h> and not <stddef.h>. It's here
292439352acSDimitry Andric// for compatibility, but must be explicitly requested. Therefore
293439352acSDimitry Andric// __stddef_wint_t.h is not part of _Builtin_stddef. It is always in
294439352acSDimitry Andric// this module even if -fbuiltin-headers-in-system-modules is passed.
2955f757f3fSDimitry Andricmodule _Builtin_stddef_wint_t [system] {
2965f757f3fSDimitry Andric  header "__stddef_wint_t.h"
2975f757f3fSDimitry Andric  export *
2985f757f3fSDimitry Andric}
2995f757f3fSDimitry Andric
3005f757f3fSDimitry Andricmodule _Builtin_stdint [system] {
3015f757f3fSDimitry Andric  header "stdint.h"
3025f757f3fSDimitry Andric  export *
3035f757f3fSDimitry Andric}
3045f757f3fSDimitry Andric
3055f757f3fSDimitry Andricmodule _Builtin_stdnoreturn [system] {
3065f757f3fSDimitry Andric  header "stdnoreturn.h"
3075f757f3fSDimitry Andric  export *
3085f757f3fSDimitry Andric}
3095f757f3fSDimitry Andric
3105f757f3fSDimitry Andricmodule _Builtin_tgmath [system] {
3115f757f3fSDimitry Andric  header "tgmath.h"
3125f757f3fSDimitry Andric  export *
3135f757f3fSDimitry Andric}
3145f757f3fSDimitry Andric
3155f757f3fSDimitry Andricmodule _Builtin_unwind [system] {
3165f757f3fSDimitry Andric  header "unwind.h"
3175f757f3fSDimitry Andric  export *
3185f757f3fSDimitry Andric}
3195f757f3fSDimitry Andric// End -fbuiltin-headers-in-system-modules affected modules
3205f757f3fSDimitry Andric
3210b57cec5SDimitry Andricmodule opencl_c {
3220b57cec5SDimitry Andric  requires opencl
3230b57cec5SDimitry Andric  header "opencl-c.h"
3240b57cec5SDimitry Andric  header "opencl-c-base.h"
3250b57cec5SDimitry Andric}
326*0fca6ea1SDimitry Andric
327*0fca6ea1SDimitry Andricmodule ptrauth {
328*0fca6ea1SDimitry Andric  header "ptrauth.h"
329*0fca6ea1SDimitry Andric  export *
330*0fca6ea1SDimitry Andric}
331