Yunzhong Gao | c293a26 | 2016-04-04 18:46:09 +0000 | [diff] [blame] | 1 | /*===---- module.modulemap - intrinsics module map -------------------------=== |
| 2 | * |
| 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 4 | * of this software and associated documentation files (the "Software"), to deal |
| 5 | * in the Software without restriction, including without limitation the rights |
| 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 7 | * copies of the Software, and to permit persons to whom the Software is |
| 8 | * furnished to do so, subject to the following conditions: |
| 9 | * |
| 10 | * The above copyright notice and this permission notice shall be included in |
| 11 | * all copies or substantial portions of the Software. |
| 12 | * |
| 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 19 | * THE SOFTWARE. |
| 20 | * |
| 21 | *===-----------------------------------------------------------------------=== |
| 22 | */ |
| 23 | |
Ben Langmuir | c67a774 | 2015-01-13 21:54:32 +0000 | [diff] [blame] | 24 | module _Builtin_intrinsics [system] [extern_c] { |
Douglas Gregor | 232e343 | 2012-01-31 21:57:50 +0000 | [diff] [blame] | 25 | explicit module altivec { |
| 26 | requires altivec |
| 27 | header "altivec.h" |
| 28 | } |
| 29 | |
Douglas Gregor | 5cad45b | 2013-05-20 14:07:18 +0000 | [diff] [blame] | 30 | explicit module arm { |
| 31 | requires arm |
| 32 | |
Yi Kong | cd08139 | 2014-07-23 09:00:21 +0000 | [diff] [blame] | 33 | explicit module acle { |
| 34 | header "arm_acle.h" |
| 35 | export * |
| 36 | } |
| 37 | |
Douglas Gregor | 5cad45b | 2013-05-20 14:07:18 +0000 | [diff] [blame] | 38 | explicit module neon { |
| 39 | requires neon |
| 40 | header "arm_neon.h" |
Abderrazek Zaafrani | ce8746d | 2018-01-19 23:11:18 +0000 | [diff] [blame] | 41 | header "arm_fp16.h" |
Douglas Gregor | 5cad45b | 2013-05-20 14:07:18 +0000 | [diff] [blame] | 42 | export * |
| 43 | } |
| 44 | } |
| 45 | |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 46 | explicit module intel { |
| 47 | requires x86 |
Douglas Gregor | 3ec6663 | 2012-02-02 18:42:48 +0000 | [diff] [blame] | 48 | export * |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 49 | |
| 50 | header "immintrin.h" |
Richard Smith | 20d4701 | 2016-04-16 00:46:26 +0000 | [diff] [blame] | 51 | textual header "f16cintrin.h" |
| 52 | textual header "avxintrin.h" |
| 53 | textual header "avx2intrin.h" |
| 54 | textual header "avx512fintrin.h" |
| 55 | textual header "avx512erintrin.h" |
| 56 | textual header "fmaintrin.h" |
| 57 | |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 58 | header "x86intrin.h" |
Richard Smith | 20d4701 | 2016-04-16 00:46:26 +0000 | [diff] [blame] | 59 | textual header "bmiintrin.h" |
| 60 | textual header "bmi2intrin.h" |
| 61 | textual header "lzcntintrin.h" |
| 62 | textual header "xopintrin.h" |
| 63 | textual header "fma4intrin.h" |
Richard Smith | f5c3a63 | 2016-05-20 01:06:47 +0000 | [diff] [blame] | 64 | textual header "mwaitxintrin.h" |
Craig Topper | 4574226 | 2017-02-09 06:10:14 +0000 | [diff] [blame] | 65 | textual header "clzerointrin.h" |
Craig Topper | 5f1d10e | 2018-04-24 17:40:49 +0000 | [diff] [blame] | 66 | textual header "wbnoinvdintrin.h" |
| 67 | textual header "cldemoteintrin.h" |
| 68 | textual header "waitpkgintrin.h" |
Gabor Buella | a51e0c2 | 2018-05-01 10:05:42 +0000 | [diff] [blame] | 69 | textual header "movdirintrin.h" |
Gabor Buella | b0f310d | 2018-05-08 06:49:41 +0000 | [diff] [blame] | 70 | textual header "pconfigintrin.h" |
Gabor Buella | 5e52fa9 | 2018-05-08 07:12:34 +0000 | [diff] [blame^] | 71 | textual header "sgxintrin.h" |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 72 | |
Douglas Gregor | 3ec6663 | 2012-02-02 18:42:48 +0000 | [diff] [blame] | 73 | explicit module mm_malloc { |
Elad Cohen | fb6358d | 2016-09-04 06:00:42 +0000 | [diff] [blame] | 74 | requires !freestanding |
Douglas Gregor | 3ec6663 | 2012-02-02 18:42:48 +0000 | [diff] [blame] | 75 | header "mm_malloc.h" |
| 76 | export * // note: for <stdlib.h> dependency |
| 77 | } |
| 78 | |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 79 | explicit module cpuid { |
Bruno Cardoso Lopes | 6736e19 | 2016-08-30 21:25:42 +0000 | [diff] [blame] | 80 | requires gnuinlineasm |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 81 | header "cpuid.h" |
| 82 | } |
| 83 | |
| 84 | explicit module mmx { |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 85 | header "mmintrin.h" |
| 86 | } |
| 87 | |
| 88 | explicit module sse { |
John Thompson | debce24 | 2016-03-22 20:57:51 +0000 | [diff] [blame] | 89 | export mm_malloc |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 90 | export mmx |
Richard Smith | 23d8d03 | 2015-05-14 00:45:20 +0000 | [diff] [blame] | 91 | export sse2 // note: for hackish <emmintrin.h> dependency |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 92 | header "xmmintrin.h" |
| 93 | } |
| 94 | |
| 95 | explicit module sse2 { |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 96 | export sse |
| 97 | header "emmintrin.h" |
| 98 | } |
| 99 | |
| 100 | explicit module sse3 { |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 101 | export sse2 |
| 102 | header "pmmintrin.h" |
| 103 | } |
| 104 | |
| 105 | explicit module ssse3 { |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 106 | export sse3 |
| 107 | header "tmmintrin.h" |
| 108 | } |
| 109 | |
| 110 | explicit module sse4_1 { |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 111 | export ssse3 |
| 112 | header "smmintrin.h" |
| 113 | } |
| 114 | |
| 115 | explicit module sse4_2 { |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 116 | export sse4_1 |
| 117 | header "nmmintrin.h" |
| 118 | } |
| 119 | |
Douglas Gregor | 4c69859 | 2012-11-05 20:11:10 +0000 | [diff] [blame] | 120 | explicit module sse4a { |
Douglas Gregor | 4c69859 | 2012-11-05 20:11:10 +0000 | [diff] [blame] | 121 | export sse3 |
Douglas Gregor | 10b4f2a | 2012-11-05 20:41:30 +0000 | [diff] [blame] | 122 | header "ammintrin.h" |
Douglas Gregor | 4c69859 | 2012-11-05 20:11:10 +0000 | [diff] [blame] | 123 | } |
| 124 | |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 125 | explicit module popcnt { |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 126 | header "popcntintrin.h" |
| 127 | } |
| 128 | |
| 129 | explicit module mm3dnow { |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 130 | header "mm3dnow.h" |
| 131 | } |
Douglas Gregor | 4c69859 | 2012-11-05 20:11:10 +0000 | [diff] [blame] | 132 | |
Douglas Gregor | dc779ab | 2012-11-05 23:30:26 +0000 | [diff] [blame] | 133 | explicit module aes_pclmul { |
Douglas Gregor | dc779ab | 2012-11-05 23:30:26 +0000 | [diff] [blame] | 134 | header "wmmintrin.h" |
John Thompson | b7892ff | 2015-05-27 18:26:41 +0000 | [diff] [blame] | 135 | export aes |
| 136 | export pclmul |
Douglas Gregor | dc779ab | 2012-11-05 23:30:26 +0000 | [diff] [blame] | 137 | } |
| 138 | |
| 139 | explicit module aes { |
Douglas Gregor | dc779ab | 2012-11-05 23:30:26 +0000 | [diff] [blame] | 140 | header "__wmmintrin_aes.h" |
| 141 | } |
| 142 | |
| 143 | explicit module pclmul { |
Douglas Gregor | dc779ab | 2012-11-05 23:30:26 +0000 | [diff] [blame] | 144 | header "__wmmintrin_pclmul.h" |
| 145 | } |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 146 | } |
Ulrich Weigand | cc67344 | 2015-04-01 14:15:35 +0000 | [diff] [blame] | 147 | |
| 148 | explicit module systemz { |
| 149 | requires systemz |
| 150 | export * |
| 151 | |
| 152 | header "s390intrin.h" |
| 153 | |
| 154 | explicit module htm { |
| 155 | requires htm |
| 156 | header "htmintrin.h" |
| 157 | header "htmxlintrin.h" |
| 158 | } |
Ulrich Weigand | ca25643 | 2015-07-30 14:10:43 +0000 | [diff] [blame] | 159 | |
| 160 | explicit module zvector { |
| 161 | requires zvector, vx |
| 162 | header "vecintrin.h" |
| 163 | } |
Ulrich Weigand | cc67344 | 2015-04-01 14:15:35 +0000 | [diff] [blame] | 164 | } |
Douglas Gregor | 3f09de6 | 2012-01-29 20:52:14 +0000 | [diff] [blame] | 165 | } |
Richard Smith | ef99e4d | 2014-10-03 00:31:35 +0000 | [diff] [blame] | 166 | |
| 167 | module _Builtin_stddef_max_align_t [system] [extern_c] { |
| 168 | header "__stddef_max_align_t.h" |
| 169 | } |
Yaxun Liu | 143f083 | 2016-06-20 19:26:00 +0000 | [diff] [blame] | 170 | |
| 171 | module opencl_c { |
| 172 | requires opencl |
| 173 | header "opencl-c.h" |
| 174 | } |