Douglas Gregor | 232e343 | 2012-01-31 21:57:50 +0000 | [diff] [blame] | 1 | module _Builtin_intrinsics [system] { |
| 2 | explicit module altivec { |
| 3 | requires altivec |
| 4 | header "altivec.h" |
| 5 | } |
| 6 | |
Douglas Gregor | 5cad45b | 2013-05-20 14:07:18 +0000 | [diff] [blame^] | 7 | explicit module arm { |
| 8 | requires arm |
| 9 | |
| 10 | explicit module neon { |
| 11 | requires neon |
| 12 | header "arm_neon.h" |
| 13 | export * |
| 14 | } |
| 15 | } |
| 16 | |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 17 | explicit module intel { |
| 18 | requires x86 |
Douglas Gregor | 3ec6663 | 2012-02-02 18:42:48 +0000 | [diff] [blame] | 19 | export * |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 20 | |
| 21 | header "immintrin.h" |
| 22 | header "x86intrin.h" |
| 23 | |
Douglas Gregor | 3ec6663 | 2012-02-02 18:42:48 +0000 | [diff] [blame] | 24 | explicit module mm_malloc { |
| 25 | header "mm_malloc.h" |
| 26 | export * // note: for <stdlib.h> dependency |
| 27 | } |
| 28 | |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 29 | explicit module cpuid { |
Richard Smith | 584f7dc | 2013-04-04 02:55:24 +0000 | [diff] [blame] | 30 | requires x86 |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 31 | header "cpuid.h" |
| 32 | } |
| 33 | |
| 34 | explicit module mmx { |
| 35 | requires mmx |
| 36 | header "mmintrin.h" |
| 37 | } |
| 38 | |
Douglas Gregor | 4c69859 | 2012-11-05 20:11:10 +0000 | [diff] [blame] | 39 | explicit module f16c { |
| 40 | requires f16c |
| 41 | header "f16cintrin.h" |
| 42 | } |
| 43 | |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 44 | explicit module sse { |
| 45 | requires sse |
| 46 | export mmx |
| 47 | header "xmmintrin.h" |
| 48 | } |
| 49 | |
| 50 | explicit module sse2 { |
| 51 | requires sse2 |
| 52 | export sse |
| 53 | header "emmintrin.h" |
| 54 | } |
| 55 | |
| 56 | explicit module sse3 { |
| 57 | requires sse3 |
| 58 | export sse2 |
| 59 | header "pmmintrin.h" |
| 60 | } |
| 61 | |
| 62 | explicit module ssse3 { |
| 63 | requires ssse3 |
| 64 | export sse3 |
| 65 | header "tmmintrin.h" |
| 66 | } |
| 67 | |
| 68 | explicit module sse4_1 { |
| 69 | requires sse41 |
| 70 | export ssse3 |
| 71 | header "smmintrin.h" |
| 72 | } |
| 73 | |
| 74 | explicit module sse4_2 { |
| 75 | requires sse42 |
| 76 | export sse4_1 |
| 77 | header "nmmintrin.h" |
| 78 | } |
| 79 | |
Douglas Gregor | 4c69859 | 2012-11-05 20:11:10 +0000 | [diff] [blame] | 80 | explicit module sse4a { |
| 81 | requires sse4a |
| 82 | export sse3 |
Douglas Gregor | 10b4f2a | 2012-11-05 20:41:30 +0000 | [diff] [blame] | 83 | header "ammintrin.h" |
Douglas Gregor | 4c69859 | 2012-11-05 20:11:10 +0000 | [diff] [blame] | 84 | } |
| 85 | |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 86 | explicit module avx { |
| 87 | requires avx |
| 88 | export sse4_2 |
| 89 | header "avxintrin.h" |
| 90 | } |
| 91 | |
| 92 | explicit module avx2 { |
| 93 | requires avx2 |
Douglas Gregor | 71022ca | 2012-01-30 18:49:05 +0000 | [diff] [blame] | 94 | export avx |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 95 | header "avx2intrin.h" |
| 96 | } |
| 97 | |
| 98 | explicit module bmi { |
| 99 | requires bmi |
| 100 | header "bmiintrin.h" |
| 101 | } |
| 102 | |
| 103 | explicit module bmi2 { |
| 104 | requires bmi2 |
| 105 | header "bmi2intrin.h" |
| 106 | } |
| 107 | |
Douglas Gregor | 4c69859 | 2012-11-05 20:11:10 +0000 | [diff] [blame] | 108 | explicit module fma { |
| 109 | requires fma |
| 110 | header "fmaintrin.h" |
| 111 | } |
| 112 | |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 113 | explicit module fma4 { |
| 114 | requires fma4 |
| 115 | export sse3 |
| 116 | header "fma4intrin.h" |
| 117 | } |
| 118 | |
| 119 | explicit module lzcnt { |
| 120 | requires lzcnt |
| 121 | header "lzcntintrin.h" |
| 122 | } |
| 123 | |
| 124 | explicit module popcnt { |
| 125 | requires popcnt |
| 126 | header "popcntintrin.h" |
| 127 | } |
| 128 | |
| 129 | explicit module mm3dnow { |
| 130 | requires mm3dnow |
| 131 | header "mm3dnow.h" |
| 132 | } |
Douglas Gregor | 4c69859 | 2012-11-05 20:11:10 +0000 | [diff] [blame] | 133 | |
| 134 | explicit module xop { |
| 135 | requires xop |
| 136 | export fma4 |
| 137 | header "xopintrin.h" |
| 138 | } |
Douglas Gregor | dc779ab | 2012-11-05 23:30:26 +0000 | [diff] [blame] | 139 | |
| 140 | explicit module aes_pclmul { |
| 141 | requires aes, pclmul |
| 142 | header "wmmintrin.h" |
| 143 | } |
| 144 | |
| 145 | explicit module aes { |
| 146 | requires aes |
| 147 | header "__wmmintrin_aes.h" |
| 148 | } |
| 149 | |
| 150 | explicit module pclmul { |
| 151 | requires pclmul |
| 152 | header "__wmmintrin_pclmul.h" |
| 153 | } |
Douglas Gregor | 0070c0b | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 154 | } |
Douglas Gregor | 3f09de6 | 2012-01-29 20:52:14 +0000 | [diff] [blame] | 155 | } |