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" |
| 41 | export * |
| 42 | } |
| 43 | } |
| 44 | |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 45 | explicit module intel { |
| 46 | requires x86 |
Douglas Gregor | 3ec6663 | 2012-02-02 18:42:48 +0000 | [diff] [blame] | 47 | export * |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 48 | |
| 49 | header "immintrin.h" |
| 50 | header "x86intrin.h" |
| 51 | |
Douglas Gregor | 3ec6663 | 2012-02-02 18:42:48 +0000 | [diff] [blame] | 52 | explicit module mm_malloc { |
| 53 | header "mm_malloc.h" |
| 54 | export * // note: for <stdlib.h> dependency |
| 55 | } |
| 56 | |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 57 | explicit module cpuid { |
| 58 | header "cpuid.h" |
| 59 | } |
| 60 | |
| 61 | explicit module mmx { |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 62 | header "mmintrin.h" |
| 63 | } |
| 64 | |
Douglas Gregor | 4c69859 | 2012-11-05 20:11:10 +0000 | [diff] [blame] | 65 | explicit module f16c { |
Douglas Gregor | 4c69859 | 2012-11-05 20:11:10 +0000 | [diff] [blame] | 66 | header "f16cintrin.h" |
| 67 | } |
| 68 | |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 69 | explicit module sse { |
John Thompson | debce24 | 2016-03-22 20:57:51 +0000 | [diff] [blame] | 70 | export mm_malloc |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 71 | export mmx |
Richard Smith | 23d8d03 | 2015-05-14 00:45:20 +0000 | [diff] [blame] | 72 | export sse2 // note: for hackish <emmintrin.h> dependency |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 73 | header "xmmintrin.h" |
| 74 | } |
| 75 | |
| 76 | explicit module sse2 { |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 77 | export sse |
| 78 | header "emmintrin.h" |
| 79 | } |
| 80 | |
| 81 | explicit module sse3 { |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 82 | export sse2 |
| 83 | header "pmmintrin.h" |
| 84 | } |
| 85 | |
| 86 | explicit module ssse3 { |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 87 | export sse3 |
| 88 | header "tmmintrin.h" |
| 89 | } |
| 90 | |
| 91 | explicit module sse4_1 { |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 92 | export ssse3 |
| 93 | header "smmintrin.h" |
| 94 | } |
| 95 | |
| 96 | explicit module sse4_2 { |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 97 | export sse4_1 |
| 98 | header "nmmintrin.h" |
| 99 | } |
| 100 | |
Douglas Gregor | 4c69859 | 2012-11-05 20:11:10 +0000 | [diff] [blame] | 101 | explicit module sse4a { |
Douglas Gregor | 4c69859 | 2012-11-05 20:11:10 +0000 | [diff] [blame] | 102 | export sse3 |
Douglas Gregor | 10b4f2a | 2012-11-05 20:41:30 +0000 | [diff] [blame] | 103 | header "ammintrin.h" |
Douglas Gregor | 4c69859 | 2012-11-05 20:11:10 +0000 | [diff] [blame] | 104 | } |
| 105 | |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 106 | explicit module avx { |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 107 | export sse4_2 |
| 108 | header "avxintrin.h" |
| 109 | } |
| 110 | |
| 111 | explicit module avx2 { |
Douglas Gregor | 71022ca | 2012-01-30 18:49:05 +0000 | [diff] [blame] | 112 | export avx |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 113 | header "avx2intrin.h" |
| 114 | } |
| 115 | |
Elena Demikhovsky | bd1a49b | 2014-07-22 12:08:25 +0000 | [diff] [blame] | 116 | explicit module avx512f { |
Elena Demikhovsky | bd1a49b | 2014-07-22 12:08:25 +0000 | [diff] [blame] | 117 | export avx2 |
| 118 | header "avx512fintrin.h" |
| 119 | } |
| 120 | |
| 121 | explicit module avx512er { |
Elena Demikhovsky | bd1a49b | 2014-07-22 12:08:25 +0000 | [diff] [blame] | 122 | header "avx512erintrin.h" |
| 123 | } |
| 124 | |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 125 | explicit module bmi { |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 126 | header "bmiintrin.h" |
| 127 | } |
| 128 | |
| 129 | explicit module bmi2 { |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 130 | header "bmi2intrin.h" |
| 131 | } |
| 132 | |
Douglas Gregor | 4c69859 | 2012-11-05 20:11:10 +0000 | [diff] [blame] | 133 | explicit module fma { |
Douglas Gregor | 4c69859 | 2012-11-05 20:11:10 +0000 | [diff] [blame] | 134 | header "fmaintrin.h" |
| 135 | } |
| 136 | |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 137 | explicit module fma4 { |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 138 | export sse3 |
| 139 | header "fma4intrin.h" |
| 140 | } |
| 141 | |
| 142 | explicit module lzcnt { |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 143 | header "lzcntintrin.h" |
| 144 | } |
| 145 | |
| 146 | explicit module popcnt { |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 147 | header "popcntintrin.h" |
| 148 | } |
| 149 | |
| 150 | explicit module mm3dnow { |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 151 | header "mm3dnow.h" |
| 152 | } |
Douglas Gregor | 4c69859 | 2012-11-05 20:11:10 +0000 | [diff] [blame] | 153 | |
| 154 | explicit module xop { |
Douglas Gregor | 4c69859 | 2012-11-05 20:11:10 +0000 | [diff] [blame] | 155 | export fma4 |
| 156 | header "xopintrin.h" |
| 157 | } |
Douglas Gregor | dc779ab | 2012-11-05 23:30:26 +0000 | [diff] [blame] | 158 | |
| 159 | explicit module aes_pclmul { |
Douglas Gregor | dc779ab | 2012-11-05 23:30:26 +0000 | [diff] [blame] | 160 | header "wmmintrin.h" |
John Thompson | b7892ff | 2015-05-27 18:26:41 +0000 | [diff] [blame] | 161 | export aes |
| 162 | export pclmul |
Douglas Gregor | dc779ab | 2012-11-05 23:30:26 +0000 | [diff] [blame] | 163 | } |
| 164 | |
| 165 | explicit module aes { |
Douglas Gregor | dc779ab | 2012-11-05 23:30:26 +0000 | [diff] [blame] | 166 | header "__wmmintrin_aes.h" |
| 167 | } |
| 168 | |
| 169 | explicit module pclmul { |
Douglas Gregor | dc779ab | 2012-11-05 23:30:26 +0000 | [diff] [blame] | 170 | header "__wmmintrin_pclmul.h" |
| 171 | } |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 172 | } |
Ulrich Weigand | cc67344 | 2015-04-01 14:15:35 +0000 | [diff] [blame] | 173 | |
| 174 | explicit module systemz { |
| 175 | requires systemz |
| 176 | export * |
| 177 | |
| 178 | header "s390intrin.h" |
| 179 | |
| 180 | explicit module htm { |
| 181 | requires htm |
| 182 | header "htmintrin.h" |
| 183 | header "htmxlintrin.h" |
| 184 | } |
Ulrich Weigand | ca25643 | 2015-07-30 14:10:43 +0000 | [diff] [blame] | 185 | |
| 186 | explicit module zvector { |
| 187 | requires zvector, vx |
| 188 | header "vecintrin.h" |
| 189 | } |
Ulrich Weigand | cc67344 | 2015-04-01 14:15:35 +0000 | [diff] [blame] | 190 | } |
Douglas Gregor | 3f09de6 | 2012-01-29 20:52:14 +0000 | [diff] [blame] | 191 | } |
Richard Smith | ef99e4d | 2014-10-03 00:31:35 +0000 | [diff] [blame] | 192 | |
| 193 | module _Builtin_stddef_max_align_t [system] [extern_c] { |
| 194 | header "__stddef_max_align_t.h" |
| 195 | } |