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