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 { |
| 20 | header "cpuid.h" |
| 21 | } |
| 22 | |
| 23 | explicit module mmx { |
| 24 | requires mmx |
| 25 | header "mmintrin.h" |
| 26 | } |
| 27 | |
| 28 | explicit module sse { |
| 29 | requires sse |
| 30 | export mmx |
Douglas Gregor | 2f04f18 | 2012-02-02 18:42:48 +0000 | [diff] [blame] | 31 | export * // note: for hackish <emmintrin.h> dependency |
Douglas Gregor | e727d21 | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 32 | header "xmmintrin.h" |
| 33 | } |
| 34 | |
| 35 | explicit module sse2 { |
| 36 | requires sse2 |
| 37 | export sse |
| 38 | header "emmintrin.h" |
| 39 | } |
| 40 | |
| 41 | explicit module sse3 { |
| 42 | requires sse3 |
| 43 | export sse2 |
| 44 | header "pmmintrin.h" |
| 45 | } |
| 46 | |
| 47 | explicit module ssse3 { |
| 48 | requires ssse3 |
| 49 | export sse3 |
| 50 | header "tmmintrin.h" |
| 51 | } |
| 52 | |
| 53 | explicit module sse4_1 { |
| 54 | requires sse41 |
| 55 | export ssse3 |
| 56 | header "smmintrin.h" |
| 57 | } |
| 58 | |
| 59 | explicit module sse4_2 { |
| 60 | requires sse42 |
| 61 | export sse4_1 |
| 62 | header "nmmintrin.h" |
| 63 | } |
| 64 | |
| 65 | explicit module avx { |
| 66 | requires avx |
| 67 | export sse4_2 |
| 68 | header "avxintrin.h" |
| 69 | } |
| 70 | |
| 71 | explicit module avx2 { |
| 72 | requires avx2 |
Douglas Gregor | ba0e318 | 2012-01-30 18:49:05 +0000 | [diff] [blame] | 73 | export avx |
Douglas Gregor | e727d21 | 2012-01-30 06:38:25 +0000 | [diff] [blame] | 74 | header "avx2intrin.h" |
| 75 | } |
| 76 | |
| 77 | explicit module bmi { |
| 78 | requires bmi |
| 79 | header "bmiintrin.h" |
| 80 | } |
| 81 | |
| 82 | explicit module bmi2 { |
| 83 | requires bmi2 |
| 84 | header "bmi2intrin.h" |
| 85 | } |
| 86 | |
| 87 | explicit module fma4 { |
| 88 | requires fma4 |
| 89 | export sse3 |
| 90 | header "fma4intrin.h" |
| 91 | } |
| 92 | |
| 93 | explicit module lzcnt { |
| 94 | requires lzcnt |
| 95 | header "lzcntintrin.h" |
| 96 | } |
| 97 | |
| 98 | explicit module popcnt { |
| 99 | requires popcnt |
| 100 | header "popcntintrin.h" |
| 101 | } |
| 102 | |
| 103 | explicit module mm3dnow { |
| 104 | requires mm3dnow |
| 105 | header "mm3dnow.h" |
| 106 | } |
| 107 | } |
Douglas Gregor | 3e80d8a | 2012-01-29 20:52:14 +0000 | [diff] [blame] | 108 | } |