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