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