xcodebuild-helper 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.codeclimate.yml +20 -0
- data/.gitignore +1 -0
- data/.rspec +2 -0
- data/.travis.yml +7 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +110 -0
- data/Guardfile +18 -0
- data/README.md +7 -0
- data/Rakefile +7 -0
- data/TODO.md +3 -0
- data/bin/oclint +5 -0
- data/bin/oclint-0.8 +5 -0
- data/bin/oclint-json-compilation-database +5 -0
- data/bin/oclint-xcodebuild +5 -0
- data/externals/oclint/LICENSE +69 -0
- data/externals/oclint/bin/oclint +0 -0
- data/externals/oclint/bin/oclint-0.10.2 +0 -0
- data/externals/oclint/bin/oclint-json-compilation-database +88 -0
- data/externals/oclint/bin/oclint-xcodebuild +218 -0
- data/externals/oclint/lib/clang/3.7.0/asan_blacklist.txt +13 -0
- data/externals/oclint/lib/clang/3.7.0/include/Intrin.h +958 -0
- data/externals/oclint/lib/clang/3.7.0/include/__stddef_max_align_t.h +43 -0
- data/externals/oclint/lib/clang/3.7.0/include/__wmmintrin_aes.h +72 -0
- data/externals/oclint/lib/clang/3.7.0/include/__wmmintrin_pclmul.h +34 -0
- data/externals/oclint/lib/clang/3.7.0/include/adxintrin.h +88 -0
- data/externals/oclint/lib/clang/3.7.0/include/altivec.h +13528 -0
- data/externals/oclint/lib/clang/3.7.0/include/ammintrin.h +215 -0
- data/externals/oclint/lib/clang/3.7.0/include/arm_acle.h +304 -0
- data/externals/oclint/lib/clang/3.7.0/include/arm_neon.h +68419 -0
- data/externals/oclint/lib/clang/3.7.0/include/avx2intrin.h +1256 -0
- data/externals/oclint/lib/clang/3.7.0/include/avx512bwintrin.h +1250 -0
- data/externals/oclint/lib/clang/3.7.0/include/avx512cdintrin.h +131 -0
- data/externals/oclint/lib/clang/3.7.0/include/avx512dqintrin.h +242 -0
- data/externals/oclint/lib/clang/3.7.0/include/avx512erintrin.h +285 -0
- data/externals/oclint/lib/clang/3.7.0/include/avx512fintrin.h +2457 -0
- data/externals/oclint/lib/clang/3.7.0/include/avx512vlbwintrin.h +1907 -0
- data/externals/oclint/lib/clang/3.7.0/include/avx512vldqintrin.h +353 -0
- data/externals/oclint/lib/clang/3.7.0/include/avx512vlintrin.h +1982 -0
- data/externals/oclint/lib/clang/3.7.0/include/avxintrin.h +1308 -0
- data/externals/oclint/lib/clang/3.7.0/include/bmi2intrin.h +99 -0
- data/externals/oclint/lib/clang/3.7.0/include/bmiintrin.h +153 -0
- data/externals/oclint/lib/clang/3.7.0/include/cpuid.h +209 -0
- data/externals/oclint/lib/clang/3.7.0/include/cuda_builtin_vars.h +110 -0
- data/externals/oclint/lib/clang/3.7.0/include/emmintrin.h +1480 -0
- data/externals/oclint/lib/clang/3.7.0/include/f16cintrin.h +63 -0
- data/externals/oclint/lib/clang/3.7.0/include/float.h +124 -0
- data/externals/oclint/lib/clang/3.7.0/include/fma4intrin.h +236 -0
- data/externals/oclint/lib/clang/3.7.0/include/fmaintrin.h +234 -0
- data/externals/oclint/lib/clang/3.7.0/include/fxsrintrin.h +55 -0
- data/externals/oclint/lib/clang/3.7.0/include/htmintrin.h +226 -0
- data/externals/oclint/lib/clang/3.7.0/include/htmxlintrin.h +363 -0
- data/externals/oclint/lib/clang/3.7.0/include/ia32intrin.h +101 -0
- data/externals/oclint/lib/clang/3.7.0/include/immintrin.h +203 -0
- data/externals/oclint/lib/clang/3.7.0/include/inttypes.h +102 -0
- data/externals/oclint/lib/clang/3.7.0/include/iso646.h +43 -0
- data/externals/oclint/lib/clang/3.7.0/include/limits.h +118 -0
- data/externals/oclint/lib/clang/3.7.0/include/lzcntintrin.h +72 -0
- data/externals/oclint/lib/clang/3.7.0/include/mm3dnow.h +167 -0
- data/externals/oclint/lib/clang/3.7.0/include/mm_malloc.h +75 -0
- data/externals/oclint/lib/clang/3.7.0/include/mmintrin.h +507 -0
- data/externals/oclint/lib/clang/3.7.0/include/module.modulemap +196 -0
- data/externals/oclint/lib/clang/3.7.0/include/nmmintrin.h +35 -0
- data/externals/oclint/lib/clang/3.7.0/include/pmmintrin.h +122 -0
- data/externals/oclint/lib/clang/3.7.0/include/popcntintrin.h +50 -0
- data/externals/oclint/lib/clang/3.7.0/include/prfchwintrin.h +39 -0
- data/externals/oclint/lib/clang/3.7.0/include/rdseedintrin.h +59 -0
- data/externals/oclint/lib/clang/3.7.0/include/rtmintrin.h +59 -0
- data/externals/oclint/lib/clang/3.7.0/include/s390intrin.h +39 -0
- data/externals/oclint/lib/clang/3.7.0/include/sanitizer/allocator_interface.h +66 -0
- data/externals/oclint/lib/clang/3.7.0/include/sanitizer/asan_interface.h +155 -0
- data/externals/oclint/lib/clang/3.7.0/include/sanitizer/common_interface_defs.h +118 -0
- data/externals/oclint/lib/clang/3.7.0/include/sanitizer/coverage_interface.h +63 -0
- data/externals/oclint/lib/clang/3.7.0/include/sanitizer/dfsan_interface.h +114 -0
- data/externals/oclint/lib/clang/3.7.0/include/sanitizer/linux_syscall_hooks.h +3070 -0
- data/externals/oclint/lib/clang/3.7.0/include/sanitizer/lsan_interface.h +84 -0
- data/externals/oclint/lib/clang/3.7.0/include/sanitizer/msan_interface.h +107 -0
- data/externals/oclint/lib/clang/3.7.0/include/sanitizer/tsan_interface_atomic.h +222 -0
- data/externals/oclint/lib/clang/3.7.0/include/shaintrin.h +79 -0
- data/externals/oclint/lib/clang/3.7.0/include/smmintrin.h +487 -0
- data/externals/oclint/lib/clang/3.7.0/include/stdalign.h +35 -0
- data/externals/oclint/lib/clang/3.7.0/include/stdarg.h +52 -0
- data/externals/oclint/lib/clang/3.7.0/include/stdatomic.h +190 -0
- data/externals/oclint/lib/clang/3.7.0/include/stdbool.h +44 -0
- data/externals/oclint/lib/clang/3.7.0/include/stddef.h +137 -0
- data/externals/oclint/lib/clang/3.7.0/include/stdint.h +707 -0
- data/externals/oclint/lib/clang/3.7.0/include/stdnoreturn.h +30 -0
- data/externals/oclint/lib/clang/3.7.0/include/tbmintrin.h +154 -0
- data/externals/oclint/lib/clang/3.7.0/include/tgmath.h +1374 -0
- data/externals/oclint/lib/clang/3.7.0/include/tmmintrin.h +230 -0
- data/externals/oclint/lib/clang/3.7.0/include/unwind.h +282 -0
- data/externals/oclint/lib/clang/3.7.0/include/vadefs.h +65 -0
- data/externals/oclint/lib/clang/3.7.0/include/varargs.h +26 -0
- data/externals/oclint/lib/clang/3.7.0/include/vecintrin.h +8946 -0
- data/externals/oclint/lib/clang/3.7.0/include/wmmintrin.h +42 -0
- data/externals/oclint/lib/clang/3.7.0/include/x86intrin.h +81 -0
- data/externals/oclint/lib/clang/3.7.0/include/xmmintrin.h +1008 -0
- data/externals/oclint/lib/clang/3.7.0/include/xopintrin.h +809 -0
- data/externals/oclint/lib/clang/3.7.0/include/xtestintrin.h +41 -0
- data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.asan_iossim_dynamic.dylib +0 -0
- data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib +0 -0
- data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.builtins-i386.a +0 -0
- data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.builtins-x86_64.a +0 -0
- data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.profile_osx.a +0 -0
- data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.safestack_osx.a +0 -0
- data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.ubsan_iossim_dynamic.dylib +0 -0
- data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.ubsan_osx_dynamic.dylib +0 -0
- data/externals/oclint/lib/oclint/reporters/libHTMLReporter.dylib +0 -0
- data/externals/oclint/lib/oclint/reporters/libJSONReporter.dylib +0 -0
- data/externals/oclint/lib/oclint/reporters/libPMDReporter.dylib +0 -0
- data/externals/oclint/lib/oclint/reporters/libTextReporter.dylib +0 -0
- data/externals/oclint/lib/oclint/reporters/libXMLReporter.dylib +0 -0
- data/externals/oclint/lib/oclint/reporters/libXcodeReporter.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libAvoidBranchingStatementAsLastInLoopRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libAvoidDefaultArgumentsOnVirtualMethodsRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libAvoidPrivateStaticMembersRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libBaseClassDestructorShouldBeVirtualOrProtectedRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libBitwiseOperatorInConditionalRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libBrokenNullCheckRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libBrokenOddnessCheckRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libCollapsibleIfStatementsRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libConstantConditionalOperatorRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libConstantIfExpressionRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libCoveredSwitchStatementsDontNeedDefaultRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libCyclomaticComplexityRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libDeadCodeRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libDefaultLabelNotLastInSwitchStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libDestructorOfVirtualClassRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libDoubleNegativeRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libEmptyCatchStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libEmptyDoWhileStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libEmptyElseBlockRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libEmptyFinallyStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libEmptyForStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libEmptyIfStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libEmptySwitchStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libEmptyTryStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libEmptyWhileStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libForLoopShouldBeWhileLoopRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libGotoStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libInvertedLogicRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libJumbledIncrementerRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libLongClassRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libLongLineRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libLongMethodRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libLongVariableNameRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libMisplacedNullCheckRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libMissingBreakInSwitchStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libMultipleUnaryOperatorRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libNPathComplexityRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libNcssMethodCountRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libNestedBlockDepthRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libNonCaseLabelInSwitchStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libObjCAssignIvarOutsideAccessorsRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libObjCBoxedExpressionsRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libObjCContainerLiteralsRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libObjCNSNumberLiteralsRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libObjCObjectSubscriptingRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libObjCVerifyIsEqualHashRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libObjCVerifyMustCallSuperRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libObjCVerifyProhibitedCallRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libObjCVerifyProtectedMethodRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libObjCVerifySubclassMustImplementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libParameterReassignmentRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libPreferEarlyExitRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libRedundantConditionalOperatorRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libRedundantIfStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libRedundantLocalVariableRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libRedundantNilCheckRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libReturnFromFinallyBlockRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libShortVariableNameRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libSwitchStatementsShouldHaveDefaultRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libThrowExceptionFromFinallyBlockRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libTooFewBranchesInSwitchStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libTooManyFieldsRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libTooManyMethodsRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libTooManyParametersRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libUnnecessaryElseStatementRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libUnnecessaryNullCheckForCXXDeallocRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libUnusedLocalVariableRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libUnusedMethodParameterRule.dylib +0 -0
- data/externals/oclint/lib/oclint/rules/libUselessParenthesesRule.dylib +0 -0
- data/lib/coverage_plan.rb +19 -0
- data/lib/device.rb +27 -0
- data/lib/execute.rb +7 -0
- data/lib/lint_plan.rb +41 -0
- data/lib/rules.rb +23 -0
- data/lib/test_plan.rb +11 -0
- data/lib/version.rb +3 -0
- data/lib/xcode.rb +128 -0
- data/lib/xcodebuild-helper.rb +110 -0
- data/spec/coverage_plan_spec.rb +18 -0
- data/spec/device_spec.rb +24 -0
- data/spec/lint_plan_spec.rb +35 -0
- data/spec/rule_spec.rb +37 -0
- data/spec/spec_helper.rb +17 -0
- data/spec/test_plan_spec.rb +11 -0
- data/spec/xcode_dsl_actions_spec.rb +136 -0
- data/spec/xcode_dsl_spec.rb +176 -0
- data/spec/xcode_spec.rb +79 -0
- data/xcodebuild-helper.gemspec +26 -0
- metadata +327 -0
@@ -0,0 +1,101 @@
|
|
1
|
+
/* ===-------- ia32intrin.h ---------------------------------------------------===
|
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 <ia32intrin.h> directly; include <x86intrin.h> instead."
|
26
|
+
#endif
|
27
|
+
|
28
|
+
#ifndef __IA32INTRIN_H
|
29
|
+
#define __IA32INTRIN_H
|
30
|
+
|
31
|
+
#ifdef __x86_64__
|
32
|
+
static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__))
|
33
|
+
__readeflags(void)
|
34
|
+
{
|
35
|
+
unsigned long long __res = 0;
|
36
|
+
__asm__ __volatile__ ("pushf\n\t"
|
37
|
+
"popq %0\n"
|
38
|
+
:"=r"(__res)
|
39
|
+
:
|
40
|
+
:
|
41
|
+
);
|
42
|
+
return __res;
|
43
|
+
}
|
44
|
+
|
45
|
+
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
46
|
+
__writeeflags(unsigned long long __f)
|
47
|
+
{
|
48
|
+
__asm__ __volatile__ ("pushq %0\n\t"
|
49
|
+
"popf\n"
|
50
|
+
:
|
51
|
+
:"r"(__f)
|
52
|
+
:"flags"
|
53
|
+
);
|
54
|
+
}
|
55
|
+
|
56
|
+
#else /* !__x86_64__ */
|
57
|
+
static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
|
58
|
+
__readeflags(void)
|
59
|
+
{
|
60
|
+
unsigned int __res = 0;
|
61
|
+
__asm__ __volatile__ ("pushf\n\t"
|
62
|
+
"popl %0\n"
|
63
|
+
:"=r"(__res)
|
64
|
+
:
|
65
|
+
:
|
66
|
+
);
|
67
|
+
return __res;
|
68
|
+
}
|
69
|
+
|
70
|
+
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
71
|
+
__writeeflags(unsigned int __f)
|
72
|
+
{
|
73
|
+
__asm__ __volatile__ ("pushl %0\n\t"
|
74
|
+
"popf\n"
|
75
|
+
:
|
76
|
+
:"r"(__f)
|
77
|
+
:"flags"
|
78
|
+
);
|
79
|
+
}
|
80
|
+
#endif /* !__x86_64__ */
|
81
|
+
|
82
|
+
static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__))
|
83
|
+
__rdpmc(int __A) {
|
84
|
+
return __builtin_ia32_rdpmc(__A);
|
85
|
+
}
|
86
|
+
|
87
|
+
/* __rdtsc */
|
88
|
+
static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__))
|
89
|
+
__rdtsc(void) {
|
90
|
+
return __builtin_ia32_rdtsc();
|
91
|
+
}
|
92
|
+
|
93
|
+
/* __rdtscp */
|
94
|
+
static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__))
|
95
|
+
__rdtscp(unsigned int *__A) {
|
96
|
+
return __builtin_ia32_rdtscp(__A);
|
97
|
+
}
|
98
|
+
|
99
|
+
#define _rdtsc() __rdtsc()
|
100
|
+
|
101
|
+
#endif /* __IA32INTRIN_H */
|
@@ -0,0 +1,203 @@
|
|
1
|
+
/*===---- immintrin.h - Intel 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 __IMMINTRIN_H
|
25
|
+
#define __IMMINTRIN_H
|
26
|
+
|
27
|
+
#ifdef __MMX__
|
28
|
+
#include <mmintrin.h>
|
29
|
+
#endif
|
30
|
+
|
31
|
+
#ifdef __SSE__
|
32
|
+
#include <xmmintrin.h>
|
33
|
+
#endif
|
34
|
+
|
35
|
+
#ifdef __SSE2__
|
36
|
+
#include <emmintrin.h>
|
37
|
+
#endif
|
38
|
+
|
39
|
+
#ifdef __SSE3__
|
40
|
+
#include <pmmintrin.h>
|
41
|
+
#endif
|
42
|
+
|
43
|
+
#ifdef __SSSE3__
|
44
|
+
#include <tmmintrin.h>
|
45
|
+
#endif
|
46
|
+
|
47
|
+
#if defined (__SSE4_2__) || defined (__SSE4_1__)
|
48
|
+
#include <smmintrin.h>
|
49
|
+
#endif
|
50
|
+
|
51
|
+
#if defined (__AES__) || defined (__PCLMUL__)
|
52
|
+
#include <wmmintrin.h>
|
53
|
+
#endif
|
54
|
+
|
55
|
+
#ifdef __AVX__
|
56
|
+
#include <avxintrin.h>
|
57
|
+
#endif
|
58
|
+
|
59
|
+
#ifdef __AVX2__
|
60
|
+
#include <avx2intrin.h>
|
61
|
+
#endif
|
62
|
+
|
63
|
+
#ifdef __BMI__
|
64
|
+
#include <bmiintrin.h>
|
65
|
+
#endif
|
66
|
+
|
67
|
+
#ifdef __BMI2__
|
68
|
+
#include <bmi2intrin.h>
|
69
|
+
#endif
|
70
|
+
|
71
|
+
#ifdef __LZCNT__
|
72
|
+
#include <lzcntintrin.h>
|
73
|
+
#endif
|
74
|
+
|
75
|
+
#ifdef __FMA__
|
76
|
+
#include <fmaintrin.h>
|
77
|
+
#endif
|
78
|
+
|
79
|
+
#ifdef __AVX512F__
|
80
|
+
#include <avx512fintrin.h>
|
81
|
+
#endif
|
82
|
+
|
83
|
+
#ifdef __AVX512VL__
|
84
|
+
#include <avx512vlintrin.h>
|
85
|
+
#endif
|
86
|
+
|
87
|
+
#ifdef __AVX512BW__
|
88
|
+
#include <avx512bwintrin.h>
|
89
|
+
#endif
|
90
|
+
|
91
|
+
#ifdef __AVX512CD__
|
92
|
+
#include <avx512cdintrin.h>
|
93
|
+
#endif
|
94
|
+
|
95
|
+
#ifdef __AVX512DQ__
|
96
|
+
#include <avx512dqintrin.h>
|
97
|
+
#endif
|
98
|
+
|
99
|
+
#if defined (__AVX512VL__) && defined (__AVX512BW__)
|
100
|
+
#include <avx512vlbwintrin.h>
|
101
|
+
#endif
|
102
|
+
|
103
|
+
#if defined (__AVX512VL__) && defined (__AVX512DQ__)
|
104
|
+
#include <avx512vldqintrin.h>
|
105
|
+
#endif
|
106
|
+
|
107
|
+
#ifdef __AVX512ER__
|
108
|
+
#include <avx512erintrin.h>
|
109
|
+
#endif
|
110
|
+
|
111
|
+
#ifdef __RDRND__
|
112
|
+
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
113
|
+
_rdrand16_step(unsigned short *__p)
|
114
|
+
{
|
115
|
+
return __builtin_ia32_rdrand16_step(__p);
|
116
|
+
}
|
117
|
+
|
118
|
+
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
119
|
+
_rdrand32_step(unsigned int *__p)
|
120
|
+
{
|
121
|
+
return __builtin_ia32_rdrand32_step(__p);
|
122
|
+
}
|
123
|
+
|
124
|
+
#ifdef __x86_64__
|
125
|
+
static __inline__ int __attribute__((__always_inline__, __nodebug__))
|
126
|
+
_rdrand64_step(unsigned long long *__p)
|
127
|
+
{
|
128
|
+
return __builtin_ia32_rdrand64_step(__p);
|
129
|
+
}
|
130
|
+
#endif
|
131
|
+
#endif /* __RDRND__ */
|
132
|
+
|
133
|
+
#ifdef __FSGSBASE__
|
134
|
+
#ifdef __x86_64__
|
135
|
+
static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
|
136
|
+
_readfsbase_u32(void)
|
137
|
+
{
|
138
|
+
return __builtin_ia32_rdfsbase32();
|
139
|
+
}
|
140
|
+
|
141
|
+
static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__))
|
142
|
+
_readfsbase_u64(void)
|
143
|
+
{
|
144
|
+
return __builtin_ia32_rdfsbase64();
|
145
|
+
}
|
146
|
+
|
147
|
+
static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
|
148
|
+
_readgsbase_u32(void)
|
149
|
+
{
|
150
|
+
return __builtin_ia32_rdgsbase32();
|
151
|
+
}
|
152
|
+
|
153
|
+
static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__))
|
154
|
+
_readgsbase_u64(void)
|
155
|
+
{
|
156
|
+
return __builtin_ia32_rdgsbase64();
|
157
|
+
}
|
158
|
+
|
159
|
+
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
160
|
+
_writefsbase_u32(unsigned int __V)
|
161
|
+
{
|
162
|
+
return __builtin_ia32_wrfsbase32(__V);
|
163
|
+
}
|
164
|
+
|
165
|
+
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
166
|
+
_writefsbase_u64(unsigned long long __V)
|
167
|
+
{
|
168
|
+
return __builtin_ia32_wrfsbase64(__V);
|
169
|
+
}
|
170
|
+
|
171
|
+
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
172
|
+
_writegsbase_u32(unsigned int __V)
|
173
|
+
{
|
174
|
+
return __builtin_ia32_wrgsbase32(__V);
|
175
|
+
}
|
176
|
+
|
177
|
+
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
178
|
+
_writegsbase_u64(unsigned long long __V)
|
179
|
+
{
|
180
|
+
return __builtin_ia32_wrgsbase64(__V);
|
181
|
+
}
|
182
|
+
#endif
|
183
|
+
#endif /* __FSGSBASE__ */
|
184
|
+
|
185
|
+
#ifdef __RTM__
|
186
|
+
#include <rtmintrin.h>
|
187
|
+
#endif
|
188
|
+
|
189
|
+
#ifdef __RTM__
|
190
|
+
#include <xtestintrin.h>
|
191
|
+
#endif
|
192
|
+
|
193
|
+
#ifdef __SHA__
|
194
|
+
#include <shaintrin.h>
|
195
|
+
#endif
|
196
|
+
|
197
|
+
#include <fxsrintrin.h>
|
198
|
+
|
199
|
+
/* Some intrinsics inside adxintrin.h are available only on processors with ADX,
|
200
|
+
* whereas others are also available at all times. */
|
201
|
+
#include <adxintrin.h>
|
202
|
+
|
203
|
+
#endif /* __IMMINTRIN_H */
|
@@ -0,0 +1,102 @@
|
|
1
|
+
/*===---- inttypes.h - Standard header for integer printf macros ----------===*\
|
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
|
+
#ifndef __CLANG_INTTYPES_H
|
24
|
+
#define __CLANG_INTTYPES_H
|
25
|
+
|
26
|
+
#include_next <inttypes.h>
|
27
|
+
|
28
|
+
#if defined(_MSC_VER) && _MSC_VER < 1900
|
29
|
+
/* MSVC headers define int32_t as int, but PRIx32 as "lx" instead of "x".
|
30
|
+
* This triggers format warnings, so fix it up here. */
|
31
|
+
#undef PRId32
|
32
|
+
#undef PRIdLEAST32
|
33
|
+
#undef PRIdFAST32
|
34
|
+
#undef PRIi32
|
35
|
+
#undef PRIiLEAST32
|
36
|
+
#undef PRIiFAST32
|
37
|
+
#undef PRIo32
|
38
|
+
#undef PRIoLEAST32
|
39
|
+
#undef PRIoFAST32
|
40
|
+
#undef PRIu32
|
41
|
+
#undef PRIuLEAST32
|
42
|
+
#undef PRIuFAST32
|
43
|
+
#undef PRIx32
|
44
|
+
#undef PRIxLEAST32
|
45
|
+
#undef PRIxFAST32
|
46
|
+
#undef PRIX32
|
47
|
+
#undef PRIXLEAST32
|
48
|
+
#undef PRIXFAST32
|
49
|
+
|
50
|
+
#undef SCNd32
|
51
|
+
#undef SCNdLEAST32
|
52
|
+
#undef SCNdFAST32
|
53
|
+
#undef SCNi32
|
54
|
+
#undef SCNiLEAST32
|
55
|
+
#undef SCNiFAST32
|
56
|
+
#undef SCNo32
|
57
|
+
#undef SCNoLEAST32
|
58
|
+
#undef SCNoFAST32
|
59
|
+
#undef SCNu32
|
60
|
+
#undef SCNuLEAST32
|
61
|
+
#undef SCNuFAST32
|
62
|
+
#undef SCNx32
|
63
|
+
#undef SCNxLEAST32
|
64
|
+
#undef SCNxFAST32
|
65
|
+
|
66
|
+
#define PRId32 "d"
|
67
|
+
#define PRIdLEAST32 "d"
|
68
|
+
#define PRIdFAST32 "d"
|
69
|
+
#define PRIi32 "i"
|
70
|
+
#define PRIiLEAST32 "i"
|
71
|
+
#define PRIiFAST32 "i"
|
72
|
+
#define PRIo32 "o"
|
73
|
+
#define PRIoLEAST32 "o"
|
74
|
+
#define PRIoFAST32 "o"
|
75
|
+
#define PRIu32 "u"
|
76
|
+
#define PRIuLEAST32 "u"
|
77
|
+
#define PRIuFAST32 "u"
|
78
|
+
#define PRIx32 "x"
|
79
|
+
#define PRIxLEAST32 "x"
|
80
|
+
#define PRIxFAST32 "x"
|
81
|
+
#define PRIX32 "X"
|
82
|
+
#define PRIXLEAST32 "X"
|
83
|
+
#define PRIXFAST32 "X"
|
84
|
+
|
85
|
+
#define SCNd32 "d"
|
86
|
+
#define SCNdLEAST32 "d"
|
87
|
+
#define SCNdFAST32 "d"
|
88
|
+
#define SCNi32 "i"
|
89
|
+
#define SCNiLEAST32 "i"
|
90
|
+
#define SCNiFAST32 "i"
|
91
|
+
#define SCNo32 "o"
|
92
|
+
#define SCNoLEAST32 "o"
|
93
|
+
#define SCNoFAST32 "o"
|
94
|
+
#define SCNu32 "u"
|
95
|
+
#define SCNuLEAST32 "u"
|
96
|
+
#define SCNuFAST32 "u"
|
97
|
+
#define SCNx32 "x"
|
98
|
+
#define SCNxLEAST32 "x"
|
99
|
+
#define SCNxFAST32 "x"
|
100
|
+
#endif
|
101
|
+
|
102
|
+
#endif /* __CLANG_INTTYPES_H */
|
@@ -0,0 +1,43 @@
|
|
1
|
+
/*===---- iso646.h - Standard header for alternate spellings of operators---===
|
2
|
+
*
|
3
|
+
* Copyright (c) 2008 Eli Friedman
|
4
|
+
*
|
5
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
* of this software and associated documentation files (the "Software"), to deal
|
7
|
+
* in the Software without restriction, including without limitation the rights
|
8
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
* copies of the Software, and to permit persons to whom the Software is
|
10
|
+
* furnished to do so, subject to the following conditions:
|
11
|
+
*
|
12
|
+
* The above copyright notice and this permission notice shall be included in
|
13
|
+
* all copies or substantial portions of the Software.
|
14
|
+
*
|
15
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
* THE SOFTWARE.
|
22
|
+
*
|
23
|
+
*===-----------------------------------------------------------------------===
|
24
|
+
*/
|
25
|
+
|
26
|
+
#ifndef __ISO646_H
|
27
|
+
#define __ISO646_H
|
28
|
+
|
29
|
+
#ifndef __cplusplus
|
30
|
+
#define and &&
|
31
|
+
#define and_eq &=
|
32
|
+
#define bitand &
|
33
|
+
#define bitor |
|
34
|
+
#define compl ~
|
35
|
+
#define not !
|
36
|
+
#define not_eq !=
|
37
|
+
#define or ||
|
38
|
+
#define or_eq |=
|
39
|
+
#define xor ^
|
40
|
+
#define xor_eq ^=
|
41
|
+
#endif
|
42
|
+
|
43
|
+
#endif /* __ISO646_H */
|