xcodebuild-helper 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (202) hide show
  1. checksums.yaml +7 -0
  2. data/.codeclimate.yml +20 -0
  3. data/.gitignore +1 -0
  4. data/.rspec +2 -0
  5. data/.travis.yml +7 -0
  6. data/Gemfile +6 -0
  7. data/Gemfile.lock +110 -0
  8. data/Guardfile +18 -0
  9. data/README.md +7 -0
  10. data/Rakefile +7 -0
  11. data/TODO.md +3 -0
  12. data/bin/oclint +5 -0
  13. data/bin/oclint-0.8 +5 -0
  14. data/bin/oclint-json-compilation-database +5 -0
  15. data/bin/oclint-xcodebuild +5 -0
  16. data/externals/oclint/LICENSE +69 -0
  17. data/externals/oclint/bin/oclint +0 -0
  18. data/externals/oclint/bin/oclint-0.10.2 +0 -0
  19. data/externals/oclint/bin/oclint-json-compilation-database +88 -0
  20. data/externals/oclint/bin/oclint-xcodebuild +218 -0
  21. data/externals/oclint/lib/clang/3.7.0/asan_blacklist.txt +13 -0
  22. data/externals/oclint/lib/clang/3.7.0/include/Intrin.h +958 -0
  23. data/externals/oclint/lib/clang/3.7.0/include/__stddef_max_align_t.h +43 -0
  24. data/externals/oclint/lib/clang/3.7.0/include/__wmmintrin_aes.h +72 -0
  25. data/externals/oclint/lib/clang/3.7.0/include/__wmmintrin_pclmul.h +34 -0
  26. data/externals/oclint/lib/clang/3.7.0/include/adxintrin.h +88 -0
  27. data/externals/oclint/lib/clang/3.7.0/include/altivec.h +13528 -0
  28. data/externals/oclint/lib/clang/3.7.0/include/ammintrin.h +215 -0
  29. data/externals/oclint/lib/clang/3.7.0/include/arm_acle.h +304 -0
  30. data/externals/oclint/lib/clang/3.7.0/include/arm_neon.h +68419 -0
  31. data/externals/oclint/lib/clang/3.7.0/include/avx2intrin.h +1256 -0
  32. data/externals/oclint/lib/clang/3.7.0/include/avx512bwintrin.h +1250 -0
  33. data/externals/oclint/lib/clang/3.7.0/include/avx512cdintrin.h +131 -0
  34. data/externals/oclint/lib/clang/3.7.0/include/avx512dqintrin.h +242 -0
  35. data/externals/oclint/lib/clang/3.7.0/include/avx512erintrin.h +285 -0
  36. data/externals/oclint/lib/clang/3.7.0/include/avx512fintrin.h +2457 -0
  37. data/externals/oclint/lib/clang/3.7.0/include/avx512vlbwintrin.h +1907 -0
  38. data/externals/oclint/lib/clang/3.7.0/include/avx512vldqintrin.h +353 -0
  39. data/externals/oclint/lib/clang/3.7.0/include/avx512vlintrin.h +1982 -0
  40. data/externals/oclint/lib/clang/3.7.0/include/avxintrin.h +1308 -0
  41. data/externals/oclint/lib/clang/3.7.0/include/bmi2intrin.h +99 -0
  42. data/externals/oclint/lib/clang/3.7.0/include/bmiintrin.h +153 -0
  43. data/externals/oclint/lib/clang/3.7.0/include/cpuid.h +209 -0
  44. data/externals/oclint/lib/clang/3.7.0/include/cuda_builtin_vars.h +110 -0
  45. data/externals/oclint/lib/clang/3.7.0/include/emmintrin.h +1480 -0
  46. data/externals/oclint/lib/clang/3.7.0/include/f16cintrin.h +63 -0
  47. data/externals/oclint/lib/clang/3.7.0/include/float.h +124 -0
  48. data/externals/oclint/lib/clang/3.7.0/include/fma4intrin.h +236 -0
  49. data/externals/oclint/lib/clang/3.7.0/include/fmaintrin.h +234 -0
  50. data/externals/oclint/lib/clang/3.7.0/include/fxsrintrin.h +55 -0
  51. data/externals/oclint/lib/clang/3.7.0/include/htmintrin.h +226 -0
  52. data/externals/oclint/lib/clang/3.7.0/include/htmxlintrin.h +363 -0
  53. data/externals/oclint/lib/clang/3.7.0/include/ia32intrin.h +101 -0
  54. data/externals/oclint/lib/clang/3.7.0/include/immintrin.h +203 -0
  55. data/externals/oclint/lib/clang/3.7.0/include/inttypes.h +102 -0
  56. data/externals/oclint/lib/clang/3.7.0/include/iso646.h +43 -0
  57. data/externals/oclint/lib/clang/3.7.0/include/limits.h +118 -0
  58. data/externals/oclint/lib/clang/3.7.0/include/lzcntintrin.h +72 -0
  59. data/externals/oclint/lib/clang/3.7.0/include/mm3dnow.h +167 -0
  60. data/externals/oclint/lib/clang/3.7.0/include/mm_malloc.h +75 -0
  61. data/externals/oclint/lib/clang/3.7.0/include/mmintrin.h +507 -0
  62. data/externals/oclint/lib/clang/3.7.0/include/module.modulemap +196 -0
  63. data/externals/oclint/lib/clang/3.7.0/include/nmmintrin.h +35 -0
  64. data/externals/oclint/lib/clang/3.7.0/include/pmmintrin.h +122 -0
  65. data/externals/oclint/lib/clang/3.7.0/include/popcntintrin.h +50 -0
  66. data/externals/oclint/lib/clang/3.7.0/include/prfchwintrin.h +39 -0
  67. data/externals/oclint/lib/clang/3.7.0/include/rdseedintrin.h +59 -0
  68. data/externals/oclint/lib/clang/3.7.0/include/rtmintrin.h +59 -0
  69. data/externals/oclint/lib/clang/3.7.0/include/s390intrin.h +39 -0
  70. data/externals/oclint/lib/clang/3.7.0/include/sanitizer/allocator_interface.h +66 -0
  71. data/externals/oclint/lib/clang/3.7.0/include/sanitizer/asan_interface.h +155 -0
  72. data/externals/oclint/lib/clang/3.7.0/include/sanitizer/common_interface_defs.h +118 -0
  73. data/externals/oclint/lib/clang/3.7.0/include/sanitizer/coverage_interface.h +63 -0
  74. data/externals/oclint/lib/clang/3.7.0/include/sanitizer/dfsan_interface.h +114 -0
  75. data/externals/oclint/lib/clang/3.7.0/include/sanitizer/linux_syscall_hooks.h +3070 -0
  76. data/externals/oclint/lib/clang/3.7.0/include/sanitizer/lsan_interface.h +84 -0
  77. data/externals/oclint/lib/clang/3.7.0/include/sanitizer/msan_interface.h +107 -0
  78. data/externals/oclint/lib/clang/3.7.0/include/sanitizer/tsan_interface_atomic.h +222 -0
  79. data/externals/oclint/lib/clang/3.7.0/include/shaintrin.h +79 -0
  80. data/externals/oclint/lib/clang/3.7.0/include/smmintrin.h +487 -0
  81. data/externals/oclint/lib/clang/3.7.0/include/stdalign.h +35 -0
  82. data/externals/oclint/lib/clang/3.7.0/include/stdarg.h +52 -0
  83. data/externals/oclint/lib/clang/3.7.0/include/stdatomic.h +190 -0
  84. data/externals/oclint/lib/clang/3.7.0/include/stdbool.h +44 -0
  85. data/externals/oclint/lib/clang/3.7.0/include/stddef.h +137 -0
  86. data/externals/oclint/lib/clang/3.7.0/include/stdint.h +707 -0
  87. data/externals/oclint/lib/clang/3.7.0/include/stdnoreturn.h +30 -0
  88. data/externals/oclint/lib/clang/3.7.0/include/tbmintrin.h +154 -0
  89. data/externals/oclint/lib/clang/3.7.0/include/tgmath.h +1374 -0
  90. data/externals/oclint/lib/clang/3.7.0/include/tmmintrin.h +230 -0
  91. data/externals/oclint/lib/clang/3.7.0/include/unwind.h +282 -0
  92. data/externals/oclint/lib/clang/3.7.0/include/vadefs.h +65 -0
  93. data/externals/oclint/lib/clang/3.7.0/include/varargs.h +26 -0
  94. data/externals/oclint/lib/clang/3.7.0/include/vecintrin.h +8946 -0
  95. data/externals/oclint/lib/clang/3.7.0/include/wmmintrin.h +42 -0
  96. data/externals/oclint/lib/clang/3.7.0/include/x86intrin.h +81 -0
  97. data/externals/oclint/lib/clang/3.7.0/include/xmmintrin.h +1008 -0
  98. data/externals/oclint/lib/clang/3.7.0/include/xopintrin.h +809 -0
  99. data/externals/oclint/lib/clang/3.7.0/include/xtestintrin.h +41 -0
  100. data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.asan_iossim_dynamic.dylib +0 -0
  101. data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib +0 -0
  102. data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.builtins-i386.a +0 -0
  103. data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.builtins-x86_64.a +0 -0
  104. data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.profile_osx.a +0 -0
  105. data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.safestack_osx.a +0 -0
  106. data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.ubsan_iossim_dynamic.dylib +0 -0
  107. data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.ubsan_osx_dynamic.dylib +0 -0
  108. data/externals/oclint/lib/oclint/reporters/libHTMLReporter.dylib +0 -0
  109. data/externals/oclint/lib/oclint/reporters/libJSONReporter.dylib +0 -0
  110. data/externals/oclint/lib/oclint/reporters/libPMDReporter.dylib +0 -0
  111. data/externals/oclint/lib/oclint/reporters/libTextReporter.dylib +0 -0
  112. data/externals/oclint/lib/oclint/reporters/libXMLReporter.dylib +0 -0
  113. data/externals/oclint/lib/oclint/reporters/libXcodeReporter.dylib +0 -0
  114. data/externals/oclint/lib/oclint/rules/libAvoidBranchingStatementAsLastInLoopRule.dylib +0 -0
  115. data/externals/oclint/lib/oclint/rules/libAvoidDefaultArgumentsOnVirtualMethodsRule.dylib +0 -0
  116. data/externals/oclint/lib/oclint/rules/libAvoidPrivateStaticMembersRule.dylib +0 -0
  117. data/externals/oclint/lib/oclint/rules/libBaseClassDestructorShouldBeVirtualOrProtectedRule.dylib +0 -0
  118. data/externals/oclint/lib/oclint/rules/libBitwiseOperatorInConditionalRule.dylib +0 -0
  119. data/externals/oclint/lib/oclint/rules/libBrokenNullCheckRule.dylib +0 -0
  120. data/externals/oclint/lib/oclint/rules/libBrokenOddnessCheckRule.dylib +0 -0
  121. data/externals/oclint/lib/oclint/rules/libCollapsibleIfStatementsRule.dylib +0 -0
  122. data/externals/oclint/lib/oclint/rules/libConstantConditionalOperatorRule.dylib +0 -0
  123. data/externals/oclint/lib/oclint/rules/libConstantIfExpressionRule.dylib +0 -0
  124. data/externals/oclint/lib/oclint/rules/libCoveredSwitchStatementsDontNeedDefaultRule.dylib +0 -0
  125. data/externals/oclint/lib/oclint/rules/libCyclomaticComplexityRule.dylib +0 -0
  126. data/externals/oclint/lib/oclint/rules/libDeadCodeRule.dylib +0 -0
  127. data/externals/oclint/lib/oclint/rules/libDefaultLabelNotLastInSwitchStatementRule.dylib +0 -0
  128. data/externals/oclint/lib/oclint/rules/libDestructorOfVirtualClassRule.dylib +0 -0
  129. data/externals/oclint/lib/oclint/rules/libDoubleNegativeRule.dylib +0 -0
  130. data/externals/oclint/lib/oclint/rules/libEmptyCatchStatementRule.dylib +0 -0
  131. data/externals/oclint/lib/oclint/rules/libEmptyDoWhileStatementRule.dylib +0 -0
  132. data/externals/oclint/lib/oclint/rules/libEmptyElseBlockRule.dylib +0 -0
  133. data/externals/oclint/lib/oclint/rules/libEmptyFinallyStatementRule.dylib +0 -0
  134. data/externals/oclint/lib/oclint/rules/libEmptyForStatementRule.dylib +0 -0
  135. data/externals/oclint/lib/oclint/rules/libEmptyIfStatementRule.dylib +0 -0
  136. data/externals/oclint/lib/oclint/rules/libEmptySwitchStatementRule.dylib +0 -0
  137. data/externals/oclint/lib/oclint/rules/libEmptyTryStatementRule.dylib +0 -0
  138. data/externals/oclint/lib/oclint/rules/libEmptyWhileStatementRule.dylib +0 -0
  139. data/externals/oclint/lib/oclint/rules/libForLoopShouldBeWhileLoopRule.dylib +0 -0
  140. data/externals/oclint/lib/oclint/rules/libGotoStatementRule.dylib +0 -0
  141. data/externals/oclint/lib/oclint/rules/libInvertedLogicRule.dylib +0 -0
  142. data/externals/oclint/lib/oclint/rules/libJumbledIncrementerRule.dylib +0 -0
  143. data/externals/oclint/lib/oclint/rules/libLongClassRule.dylib +0 -0
  144. data/externals/oclint/lib/oclint/rules/libLongLineRule.dylib +0 -0
  145. data/externals/oclint/lib/oclint/rules/libLongMethodRule.dylib +0 -0
  146. data/externals/oclint/lib/oclint/rules/libLongVariableNameRule.dylib +0 -0
  147. data/externals/oclint/lib/oclint/rules/libMisplacedNullCheckRule.dylib +0 -0
  148. data/externals/oclint/lib/oclint/rules/libMissingBreakInSwitchStatementRule.dylib +0 -0
  149. data/externals/oclint/lib/oclint/rules/libMultipleUnaryOperatorRule.dylib +0 -0
  150. data/externals/oclint/lib/oclint/rules/libNPathComplexityRule.dylib +0 -0
  151. data/externals/oclint/lib/oclint/rules/libNcssMethodCountRule.dylib +0 -0
  152. data/externals/oclint/lib/oclint/rules/libNestedBlockDepthRule.dylib +0 -0
  153. data/externals/oclint/lib/oclint/rules/libNonCaseLabelInSwitchStatementRule.dylib +0 -0
  154. data/externals/oclint/lib/oclint/rules/libObjCAssignIvarOutsideAccessorsRule.dylib +0 -0
  155. data/externals/oclint/lib/oclint/rules/libObjCBoxedExpressionsRule.dylib +0 -0
  156. data/externals/oclint/lib/oclint/rules/libObjCContainerLiteralsRule.dylib +0 -0
  157. data/externals/oclint/lib/oclint/rules/libObjCNSNumberLiteralsRule.dylib +0 -0
  158. data/externals/oclint/lib/oclint/rules/libObjCObjectSubscriptingRule.dylib +0 -0
  159. data/externals/oclint/lib/oclint/rules/libObjCVerifyIsEqualHashRule.dylib +0 -0
  160. data/externals/oclint/lib/oclint/rules/libObjCVerifyMustCallSuperRule.dylib +0 -0
  161. data/externals/oclint/lib/oclint/rules/libObjCVerifyProhibitedCallRule.dylib +0 -0
  162. data/externals/oclint/lib/oclint/rules/libObjCVerifyProtectedMethodRule.dylib +0 -0
  163. data/externals/oclint/lib/oclint/rules/libObjCVerifySubclassMustImplementRule.dylib +0 -0
  164. data/externals/oclint/lib/oclint/rules/libParameterReassignmentRule.dylib +0 -0
  165. data/externals/oclint/lib/oclint/rules/libPreferEarlyExitRule.dylib +0 -0
  166. data/externals/oclint/lib/oclint/rules/libRedundantConditionalOperatorRule.dylib +0 -0
  167. data/externals/oclint/lib/oclint/rules/libRedundantIfStatementRule.dylib +0 -0
  168. data/externals/oclint/lib/oclint/rules/libRedundantLocalVariableRule.dylib +0 -0
  169. data/externals/oclint/lib/oclint/rules/libRedundantNilCheckRule.dylib +0 -0
  170. data/externals/oclint/lib/oclint/rules/libReturnFromFinallyBlockRule.dylib +0 -0
  171. data/externals/oclint/lib/oclint/rules/libShortVariableNameRule.dylib +0 -0
  172. data/externals/oclint/lib/oclint/rules/libSwitchStatementsShouldHaveDefaultRule.dylib +0 -0
  173. data/externals/oclint/lib/oclint/rules/libThrowExceptionFromFinallyBlockRule.dylib +0 -0
  174. data/externals/oclint/lib/oclint/rules/libTooFewBranchesInSwitchStatementRule.dylib +0 -0
  175. data/externals/oclint/lib/oclint/rules/libTooManyFieldsRule.dylib +0 -0
  176. data/externals/oclint/lib/oclint/rules/libTooManyMethodsRule.dylib +0 -0
  177. data/externals/oclint/lib/oclint/rules/libTooManyParametersRule.dylib +0 -0
  178. data/externals/oclint/lib/oclint/rules/libUnnecessaryElseStatementRule.dylib +0 -0
  179. data/externals/oclint/lib/oclint/rules/libUnnecessaryNullCheckForCXXDeallocRule.dylib +0 -0
  180. data/externals/oclint/lib/oclint/rules/libUnusedLocalVariableRule.dylib +0 -0
  181. data/externals/oclint/lib/oclint/rules/libUnusedMethodParameterRule.dylib +0 -0
  182. data/externals/oclint/lib/oclint/rules/libUselessParenthesesRule.dylib +0 -0
  183. data/lib/coverage_plan.rb +19 -0
  184. data/lib/device.rb +27 -0
  185. data/lib/execute.rb +7 -0
  186. data/lib/lint_plan.rb +41 -0
  187. data/lib/rules.rb +23 -0
  188. data/lib/test_plan.rb +11 -0
  189. data/lib/version.rb +3 -0
  190. data/lib/xcode.rb +128 -0
  191. data/lib/xcodebuild-helper.rb +110 -0
  192. data/spec/coverage_plan_spec.rb +18 -0
  193. data/spec/device_spec.rb +24 -0
  194. data/spec/lint_plan_spec.rb +35 -0
  195. data/spec/rule_spec.rb +37 -0
  196. data/spec/spec_helper.rb +17 -0
  197. data/spec/test_plan_spec.rb +11 -0
  198. data/spec/xcode_dsl_actions_spec.rb +136 -0
  199. data/spec/xcode_dsl_spec.rb +176 -0
  200. data/spec/xcode_spec.rb +79 -0
  201. data/xcodebuild-helper.gemspec +26 -0
  202. metadata +327 -0
@@ -0,0 +1,196 @@
1
+ module _Builtin_intrinsics [system] [extern_c] {
2
+ explicit module altivec {
3
+ requires altivec
4
+ header "altivec.h"
5
+ }
6
+
7
+ explicit module arm {
8
+ requires arm
9
+
10
+ explicit module acle {
11
+ header "arm_acle.h"
12
+ export *
13
+ }
14
+
15
+ explicit module neon {
16
+ requires neon
17
+ header "arm_neon.h"
18
+ export *
19
+ }
20
+ }
21
+
22
+ explicit module intel {
23
+ requires x86
24
+ export *
25
+
26
+ header "immintrin.h"
27
+ header "x86intrin.h"
28
+
29
+ explicit module mm_malloc {
30
+ header "mm_malloc.h"
31
+ export * // note: for <stdlib.h> dependency
32
+ }
33
+
34
+ explicit module cpuid {
35
+ requires x86
36
+ header "cpuid.h"
37
+ }
38
+
39
+ explicit module mmx {
40
+ requires mmx
41
+ header "mmintrin.h"
42
+ }
43
+
44
+ explicit module f16c {
45
+ requires f16c
46
+ header "f16cintrin.h"
47
+ }
48
+
49
+ explicit module sse {
50
+ requires sse
51
+ export mmx
52
+ export sse2 // note: for hackish <emmintrin.h> dependency
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
+
86
+ explicit module sse4a {
87
+ requires sse4a
88
+ export sse3
89
+ header "ammintrin.h"
90
+ }
91
+
92
+ explicit module avx {
93
+ requires avx
94
+ export sse4_2
95
+ header "avxintrin.h"
96
+ }
97
+
98
+ explicit module avx2 {
99
+ requires avx2
100
+ export avx
101
+ header "avx2intrin.h"
102
+ }
103
+
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
+
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
+
125
+ explicit module fma {
126
+ requires fma
127
+ header "fmaintrin.h"
128
+ }
129
+
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
+ }
150
+
151
+ explicit module xop {
152
+ requires xop
153
+ export fma4
154
+ header "xopintrin.h"
155
+ }
156
+
157
+ explicit module aes_pclmul {
158
+ requires aes, pclmul
159
+ header "wmmintrin.h"
160
+ export aes
161
+ export pclmul
162
+ }
163
+
164
+ explicit module aes {
165
+ requires aes
166
+ header "__wmmintrin_aes.h"
167
+ }
168
+
169
+ explicit module pclmul {
170
+ requires pclmul
171
+ header "__wmmintrin_pclmul.h"
172
+ }
173
+ }
174
+
175
+ explicit module systemz {
176
+ requires systemz
177
+ export *
178
+
179
+ header "s390intrin.h"
180
+
181
+ explicit module htm {
182
+ requires htm
183
+ header "htmintrin.h"
184
+ header "htmxlintrin.h"
185
+ }
186
+
187
+ explicit module zvector {
188
+ requires zvector, vx
189
+ header "vecintrin.h"
190
+ }
191
+ }
192
+ }
193
+
194
+ module _Builtin_stddef_max_align_t [system] [extern_c] {
195
+ header "__stddef_max_align_t.h"
196
+ }
@@ -0,0 +1,35 @@
1
+ /*===---- nmmintrin.h - SSE4 intrinsics ------------------------------------===
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
+
24
+ #ifndef _NMMINTRIN_H
25
+ #define _NMMINTRIN_H
26
+
27
+ #ifndef __SSE4_2__
28
+ #error "SSE4.2 instruction set not enabled"
29
+ #else
30
+
31
+ /* To match expectations of gcc we put the sse4.2 definitions into smmintrin.h,
32
+ just include it now then. */
33
+ #include <smmintrin.h>
34
+ #endif /* __SSE4_2__ */
35
+ #endif /* _NMMINTRIN_H */
@@ -0,0 +1,122 @@
1
+ /*===---- pmmintrin.h - SSE3 intrinsics ------------------------------------===
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
+
24
+ #ifndef __PMMINTRIN_H
25
+ #define __PMMINTRIN_H
26
+
27
+ #ifndef __SSE3__
28
+ #error "SSE3 instruction set not enabled"
29
+ #else
30
+
31
+ #include <emmintrin.h>
32
+
33
+ /* Define the default attributes for the functions in this file. */
34
+ #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__))
35
+
36
+ static __inline__ __m128i __DEFAULT_FN_ATTRS
37
+ _mm_lddqu_si128(__m128i const *__p)
38
+ {
39
+ return (__m128i)__builtin_ia32_lddqu((char const *)__p);
40
+ }
41
+
42
+ static __inline__ __m128 __DEFAULT_FN_ATTRS
43
+ _mm_addsub_ps(__m128 __a, __m128 __b)
44
+ {
45
+ return __builtin_ia32_addsubps(__a, __b);
46
+ }
47
+
48
+ static __inline__ __m128 __DEFAULT_FN_ATTRS
49
+ _mm_hadd_ps(__m128 __a, __m128 __b)
50
+ {
51
+ return __builtin_ia32_haddps(__a, __b);
52
+ }
53
+
54
+ static __inline__ __m128 __DEFAULT_FN_ATTRS
55
+ _mm_hsub_ps(__m128 __a, __m128 __b)
56
+ {
57
+ return __builtin_ia32_hsubps(__a, __b);
58
+ }
59
+
60
+ static __inline__ __m128 __DEFAULT_FN_ATTRS
61
+ _mm_movehdup_ps(__m128 __a)
62
+ {
63
+ return __builtin_shufflevector(__a, __a, 1, 1, 3, 3);
64
+ }
65
+
66
+ static __inline__ __m128 __DEFAULT_FN_ATTRS
67
+ _mm_moveldup_ps(__m128 __a)
68
+ {
69
+ return __builtin_shufflevector(__a, __a, 0, 0, 2, 2);
70
+ }
71
+
72
+ static __inline__ __m128d __DEFAULT_FN_ATTRS
73
+ _mm_addsub_pd(__m128d __a, __m128d __b)
74
+ {
75
+ return __builtin_ia32_addsubpd(__a, __b);
76
+ }
77
+
78
+ static __inline__ __m128d __DEFAULT_FN_ATTRS
79
+ _mm_hadd_pd(__m128d __a, __m128d __b)
80
+ {
81
+ return __builtin_ia32_haddpd(__a, __b);
82
+ }
83
+
84
+ static __inline__ __m128d __DEFAULT_FN_ATTRS
85
+ _mm_hsub_pd(__m128d __a, __m128d __b)
86
+ {
87
+ return __builtin_ia32_hsubpd(__a, __b);
88
+ }
89
+
90
+ #define _mm_loaddup_pd(dp) _mm_load1_pd(dp)
91
+
92
+ static __inline__ __m128d __DEFAULT_FN_ATTRS
93
+ _mm_movedup_pd(__m128d __a)
94
+ {
95
+ return __builtin_shufflevector(__a, __a, 0, 0);
96
+ }
97
+
98
+ #define _MM_DENORMALS_ZERO_ON (0x0040)
99
+ #define _MM_DENORMALS_ZERO_OFF (0x0000)
100
+
101
+ #define _MM_DENORMALS_ZERO_MASK (0x0040)
102
+
103
+ #define _MM_GET_DENORMALS_ZERO_MODE() (_mm_getcsr() & _MM_DENORMALS_ZERO_MASK)
104
+ #define _MM_SET_DENORMALS_ZERO_MODE(x) (_mm_setcsr((_mm_getcsr() & ~_MM_DENORMALS_ZERO_MASK) | (x)))
105
+
106
+ static __inline__ void __DEFAULT_FN_ATTRS
107
+ _mm_monitor(void const *__p, unsigned __extensions, unsigned __hints)
108
+ {
109
+ __builtin_ia32_monitor((void *)__p, __extensions, __hints);
110
+ }
111
+
112
+ static __inline__ void __DEFAULT_FN_ATTRS
113
+ _mm_mwait(unsigned __extensions, unsigned __hints)
114
+ {
115
+ __builtin_ia32_mwait(__extensions, __hints);
116
+ }
117
+
118
+ #undef __DEFAULT_FN_ATTRS
119
+
120
+ #endif /* __SSE3__ */
121
+
122
+ #endif /* __PMMINTRIN_H */
@@ -0,0 +1,50 @@
1
+ /*===---- popcntintrin.h - POPCNT intrinsics -------------------------------===
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
+
24
+ #ifndef __POPCNT__
25
+ #error "POPCNT instruction set not enabled"
26
+ #endif
27
+
28
+ #ifndef _POPCNTINTRIN_H
29
+ #define _POPCNTINTRIN_H
30
+
31
+ /* Define the default attributes for the functions in this file. */
32
+ #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__))
33
+
34
+ static __inline__ int __DEFAULT_FN_ATTRS
35
+ _mm_popcnt_u32(unsigned int __A)
36
+ {
37
+ return __builtin_popcount(__A);
38
+ }
39
+
40
+ #ifdef __x86_64__
41
+ static __inline__ long long __DEFAULT_FN_ATTRS
42
+ _mm_popcnt_u64(unsigned long long __A)
43
+ {
44
+ return __builtin_popcountll(__A);
45
+ }
46
+ #endif /* __x86_64__ */
47
+
48
+ #undef __DEFAULT_FN_ATTRS
49
+
50
+ #endif /* _POPCNTINTRIN_H */
@@ -0,0 +1,39 @@
1
+ /*===---- prfchwintrin.h - PREFETCHW intrinsic -----------------------------===
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
+
24
+ #if !defined(__X86INTRIN_H) && !defined(_MM3DNOW_H_INCLUDED)
25
+ #error "Never use <prfchwintrin.h> directly; include <x86intrin.h> or <mm3dnow.h> instead."
26
+ #endif
27
+
28
+ #ifndef __PRFCHWINTRIN_H
29
+ #define __PRFCHWINTRIN_H
30
+
31
+ #if defined(__PRFCHW__) || defined(__3dNOW__)
32
+ static __inline__ void __attribute__((__always_inline__, __nodebug__))
33
+ _m_prefetchw(void *__P)
34
+ {
35
+ __builtin_prefetch (__P, 1, 3 /* _MM_HINT_T0 */);
36
+ }
37
+ #endif
38
+
39
+ #endif /* __PRFCHWINTRIN_H */
@@ -0,0 +1,59 @@
1
+ /*===---- rdseedintrin.h - RDSEED intrinsics -------------------------------===
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
+
24
+ #ifndef __X86INTRIN_H
25
+ #error "Never use <rdseedintrin.h> directly; include <x86intrin.h> instead."
26
+ #endif
27
+
28
+ #ifndef __RDSEEDINTRIN_H
29
+ #define __RDSEEDINTRIN_H
30
+
31
+ #ifdef __RDSEED__
32
+
33
+ /* Define the default attributes for the functions in this file. */
34
+ #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__))
35
+
36
+ static __inline__ int __DEFAULT_FN_ATTRS
37
+ _rdseed16_step(unsigned short *__p)
38
+ {
39
+ return __builtin_ia32_rdseed16_step(__p);
40
+ }
41
+
42
+ static __inline__ int __DEFAULT_FN_ATTRS
43
+ _rdseed32_step(unsigned int *__p)
44
+ {
45
+ return __builtin_ia32_rdseed32_step(__p);
46
+ }
47
+
48
+ #ifdef __x86_64__
49
+ static __inline__ int __DEFAULT_FN_ATTRS
50
+ _rdseed64_step(unsigned long long *__p)
51
+ {
52
+ return __builtin_ia32_rdseed64_step(__p);
53
+ }
54
+ #endif
55
+
56
+ #undef __DEFAULT_FN_ATTRS
57
+
58
+ #endif /* __RDSEED__ */
59
+ #endif /* __RDSEEDINTRIN_H */