Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame^] | 1 | module _Builtin_intrinsics [system] [extern_c] { |
Douglas Gregor | eb7b9eb | 2012-01-31 21:57:50 +0000 | [diff] [blame] | 2 | explicit module altivec { |
| 3 | requires altivec |
| 4 | header "altivec.h" |
| 5 | } |
| 6 | |
Douglas Gregor | 44b6fa3 | 2013-05-20 14:07:18 +0000 | [diff] [blame] | 7 | explicit module arm { |
| 8 | requires arm |
| 9 | |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 10 | explicit module acle { |
| 11 | header "arm_acle.h" |
| 12 | export * |
| 13 | } |
| 14 | |
Douglas Gregor | 44b6fa3 | 2013-05-20 14:07:18 +0000 | [diff] [blame] | 15 | explicit module neon { |
| 16 | requires neon |
| 17 | header "arm_neon.h" |
| 18 | export * |
| 19 | } |
| 20 | } |
| 21 | |
Douglas Gregor | e727d21 | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 22 | explicit module intel { |
| 23 | requires x86 |
Douglas Gregor | 2f04f18 | 2012-02-02 18:42:48 +0000 | [diff] [blame] | 24 | export * |
Douglas Gregor | e727d21 | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 25 | |
| 26 | header "immintrin.h" |
| 27 | header "x86intrin.h" |
| 28 | |
Douglas Gregor | 2f04f18 | 2012-02-02 18:42:48 +0000 | [diff] [blame] | 29 | explicit module mm_malloc { |
| 30 | header "mm_malloc.h" |
| 31 | export * // note: for <stdlib.h> dependency |
| 32 | } |
| 33 | |
Douglas Gregor | e727d21 | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 34 | explicit module cpuid { |
Richard Smith | 4a3c6c6 | 2013-04-04 02:55:24 +0000 | [diff] [blame] | 35 | requires x86 |
Douglas Gregor | e727d21 | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 36 | header "cpuid.h" |
| 37 | } |
| 38 | |
| 39 | explicit module mmx { |
| 40 | requires mmx |
| 41 | header "mmintrin.h" |
| 42 | } |
| 43 | |
Douglas Gregor | a65c5a3 | 2012-11-05 20:11:10 +0000 | [diff] [blame] | 44 | explicit module f16c { |
| 45 | requires f16c |
| 46 | header "f16cintrin.h" |
| 47 | } |
| 48 | |
Douglas Gregor | e727d21 | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 49 | explicit module sse { |
| 50 | requires sse |
| 51 | export mmx |
Douglas Gregor | df98357 | 2013-06-07 22:49:44 +0000 | [diff] [blame] | 52 | export * // note: for hackish <emmintrin.h> dependency |
Douglas Gregor | e727d21 | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 53 | header "xmmintrin.h" |
| 54 | } |
| 55 | |
| 56 | explicit module sse2 { |
| 57 | requires sse2 |
| 58 | export sse |
| 59 | header "emmintrin.h" |
| 60 | } |
| 61 | |
| 62 | explicit module sse3 { |
| 63 | requires sse3 |
| 64 | export sse2 |
| 65 | header "pmmintrin.h" |
| 66 | } |
| 67 | |
| 68 | explicit module ssse3 { |
| 69 | requires ssse3 |
| 70 | export sse3 |
| 71 | header "tmmintrin.h" |
| 72 | } |
| 73 | |
| 74 | explicit module sse4_1 { |
| 75 | requires sse41 |
| 76 | export ssse3 |
| 77 | header "smmintrin.h" |
| 78 | } |
| 79 | |
| 80 | explicit module sse4_2 { |
| 81 | requires sse42 |
| 82 | export sse4_1 |
| 83 | header "nmmintrin.h" |
| 84 | } |
| 85 | |
Douglas Gregor | a65c5a3 | 2012-11-05 20:11:10 +0000 | [diff] [blame] | 86 | explicit module sse4a { |
| 87 | requires sse4a |
| 88 | export sse3 |
Douglas Gregor | 6db024c | 2012-11-05 20:41:30 +0000 | [diff] [blame] | 89 | header "ammintrin.h" |
Douglas Gregor | a65c5a3 | 2012-11-05 20:11:10 +0000 | [diff] [blame] | 90 | } |
| 91 | |
Douglas Gregor | e727d21 | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 92 | explicit module avx { |
| 93 | requires avx |
| 94 | export sse4_2 |
| 95 | header "avxintrin.h" |
| 96 | } |
| 97 | |
| 98 | explicit module avx2 { |
| 99 | requires avx2 |
Douglas Gregor | ba0e318 | 2012-01-30 18:49:05 +0000 | [diff] [blame] | 100 | export avx |
Douglas Gregor | e727d21 | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 101 | header "avx2intrin.h" |
| 102 | } |
| 103 | |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 104 | explicit module avx512f { |
| 105 | requires avx512f |
| 106 | export avx2 |
| 107 | header "avx512fintrin.h" |
| 108 | } |
| 109 | |
| 110 | explicit module avx512er { |
| 111 | requires avx512er |
| 112 | header "avx512erintrin.h" |
| 113 | } |
| 114 | |
Douglas Gregor | e727d21 | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 115 | explicit module bmi { |
| 116 | requires bmi |
| 117 | header "bmiintrin.h" |
| 118 | } |
| 119 | |
| 120 | explicit module bmi2 { |
| 121 | requires bmi2 |
| 122 | header "bmi2intrin.h" |
| 123 | } |
| 124 | |
Douglas Gregor | a65c5a3 | 2012-11-05 20:11:10 +0000 | [diff] [blame] | 125 | explicit module fma { |
| 126 | requires fma |
| 127 | header "fmaintrin.h" |
| 128 | } |
| 129 | |
Douglas Gregor | e727d21 | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 130 | explicit module fma4 { |
| 131 | requires fma4 |
| 132 | export sse3 |
| 133 | header "fma4intrin.h" |
| 134 | } |
| 135 | |
| 136 | explicit module lzcnt { |
| 137 | requires lzcnt |
| 138 | header "lzcntintrin.h" |
| 139 | } |
| 140 | |
| 141 | explicit module popcnt { |
| 142 | requires popcnt |
| 143 | header "popcntintrin.h" |
| 144 | } |
| 145 | |
| 146 | explicit module mm3dnow { |
| 147 | requires mm3dnow |
| 148 | header "mm3dnow.h" |
| 149 | } |
Douglas Gregor | a65c5a3 | 2012-11-05 20:11:10 +0000 | [diff] [blame] | 150 | |
| 151 | explicit module xop { |
| 152 | requires xop |
| 153 | export fma4 |
| 154 | header "xopintrin.h" |
| 155 | } |
Douglas Gregor | 3043175 | 2012-11-05 23:30:26 +0000 | [diff] [blame] | 156 | |
| 157 | explicit module aes_pclmul { |
| 158 | requires aes, pclmul |
| 159 | header "wmmintrin.h" |
| 160 | } |
| 161 | |
| 162 | explicit module aes { |
| 163 | requires aes |
| 164 | header "__wmmintrin_aes.h" |
| 165 | } |
| 166 | |
| 167 | explicit module pclmul { |
| 168 | requires pclmul |
| 169 | header "__wmmintrin_pclmul.h" |
| 170 | } |
Douglas Gregor | e727d21 | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 171 | } |
Douglas Gregor | 3e80d8a | 2012-01-29 20:52:14 +0000 | [diff] [blame] | 172 | } |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 173 | |
| 174 | module _Builtin_stddef_max_align_t [system] [extern_c] { |
| 175 | header "__stddef_max_align_t.h" |
| 176 | } |