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