@cpp-linter/clang-tidy-win32-x64 12.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.TXT +279 -0
- package/README.md +7 -0
- package/bin/clang-tidy.exe +4 -0
- package/lib/clang/12.0.1/include/__clang_cuda_builtin_vars.h +121 -0
- package/lib/clang/12.0.1/include/__clang_cuda_cmath.h +512 -0
- package/lib/clang/12.0.1/include/__clang_cuda_complex_builtins.h +285 -0
- package/lib/clang/12.0.1/include/__clang_cuda_device_functions.h +1486 -0
- package/lib/clang/12.0.1/include/__clang_cuda_intrinsics.h +486 -0
- package/lib/clang/12.0.1/include/__clang_cuda_libdevice_declares.h +462 -0
- package/lib/clang/12.0.1/include/__clang_cuda_math.h +348 -0
- package/lib/clang/12.0.1/include/__clang_cuda_math_forward_declares.h +284 -0
- package/lib/clang/12.0.1/include/__clang_cuda_runtime_wrapper.h +443 -0
- package/lib/clang/12.0.1/include/__clang_hip_cmath.h +664 -0
- package/lib/clang/12.0.1/include/__clang_hip_libdevice_declares.h +334 -0
- package/lib/clang/12.0.1/include/__clang_hip_math.h +1275 -0
- package/lib/clang/12.0.1/include/__clang_hip_runtime_wrapper.h +69 -0
- package/lib/clang/12.0.1/include/__stddef_max_align_t.h +27 -0
- package/lib/clang/12.0.1/include/__wmmintrin_aes.h +140 -0
- package/lib/clang/12.0.1/include/__wmmintrin_pclmul.h +48 -0
- package/lib/clang/12.0.1/include/adxintrin.h +72 -0
- package/lib/clang/12.0.1/include/altivec.h +18239 -0
- package/lib/clang/12.0.1/include/ammintrin.h +179 -0
- package/lib/clang/12.0.1/include/amxintrin.h +278 -0
- package/lib/clang/12.0.1/include/arm64intr.h +35 -0
- package/lib/clang/12.0.1/include/arm_acle.h +716 -0
- package/lib/clang/12.0.1/include/arm_bf16.h +20 -0
- package/lib/clang/12.0.1/include/arm_cde.h +410 -0
- package/lib/clang/12.0.1/include/arm_cmse.h +217 -0
- package/lib/clang/12.0.1/include/arm_fp16.h +596 -0
- package/lib/clang/12.0.1/include/arm_mve.h +19187 -0
- package/lib/clang/12.0.1/include/arm_neon.h +68982 -0
- package/lib/clang/12.0.1/include/arm_sve.h +18148 -0
- package/lib/clang/12.0.1/include/armintr.h +31 -0
- package/lib/clang/12.0.1/include/avx2intrin.h +1148 -0
- package/lib/clang/12.0.1/include/avx512bf16intrin.h +279 -0
- package/lib/clang/12.0.1/include/avx512bitalgintrin.h +83 -0
- package/lib/clang/12.0.1/include/avx512bwintrin.h +2024 -0
- package/lib/clang/12.0.1/include/avx512cdintrin.h +123 -0
- package/lib/clang/12.0.1/include/avx512dqintrin.h +1377 -0
- package/lib/clang/12.0.1/include/avx512erintrin.h +271 -0
- package/lib/clang/12.0.1/include/avx512fintrin.h +9618 -0
- package/lib/clang/12.0.1/include/avx512ifmaintrin.h +68 -0
- package/lib/clang/12.0.1/include/avx512ifmavlintrin.h +119 -0
- package/lib/clang/12.0.1/include/avx512pfintrin.h +97 -0
- package/lib/clang/12.0.1/include/avx512vbmi2intrin.h +357 -0
- package/lib/clang/12.0.1/include/avx512vbmiintrin.h +105 -0
- package/lib/clang/12.0.1/include/avx512vbmivlintrin.h +188 -0
- package/lib/clang/12.0.1/include/avx512vlbf16intrin.h +474 -0
- package/lib/clang/12.0.1/include/avx512vlbitalgintrin.h +145 -0
- package/lib/clang/12.0.1/include/avx512vlbwintrin.h +2809 -0
- package/lib/clang/12.0.1/include/avx512vlcdintrin.h +225 -0
- package/lib/clang/12.0.1/include/avx512vldqintrin.h +1167 -0
- package/lib/clang/12.0.1/include/avx512vlintrin.h +8445 -0
- package/lib/clang/12.0.1/include/avx512vlvbmi2intrin.h +689 -0
- package/lib/clang/12.0.1/include/avx512vlvnniintrin.h +304 -0
- package/lib/clang/12.0.1/include/avx512vlvp2intersectintrin.h +121 -0
- package/lib/clang/12.0.1/include/avx512vnniintrin.h +115 -0
- package/lib/clang/12.0.1/include/avx512vp2intersectintrin.h +77 -0
- package/lib/clang/12.0.1/include/avx512vpopcntdqintrin.h +54 -0
- package/lib/clang/12.0.1/include/avx512vpopcntdqvlintrin.h +91 -0
- package/lib/clang/12.0.1/include/avxintrin.h +5053 -0
- package/lib/clang/12.0.1/include/avxvnniintrin.h +225 -0
- package/lib/clang/12.0.1/include/bmi2intrin.h +81 -0
- package/lib/clang/12.0.1/include/bmiintrin.h +427 -0
- package/lib/clang/12.0.1/include/cet.h +66 -0
- package/lib/clang/12.0.1/include/cetintrin.h +99 -0
- package/lib/clang/12.0.1/include/cldemoteintrin.h +36 -0
- package/lib/clang/12.0.1/include/clflushoptintrin.h +27 -0
- package/lib/clang/12.0.1/include/clwbintrin.h +38 -0
- package/lib/clang/12.0.1/include/clzerointrin.h +36 -0
- package/lib/clang/12.0.1/include/cpuid.h +319 -0
- package/lib/clang/12.0.1/include/cuda_wrappers/algorithm +116 -0
- package/lib/clang/12.0.1/include/cuda_wrappers/complex +82 -0
- package/lib/clang/12.0.1/include/cuda_wrappers/new +106 -0
- package/lib/clang/12.0.1/include/emmintrin.h +4981 -0
- package/lib/clang/12.0.1/include/enqcmdintrin.h +63 -0
- package/lib/clang/12.0.1/include/f16cintrin.h +162 -0
- package/lib/clang/12.0.1/include/float.h +152 -0
- package/lib/clang/12.0.1/include/fma4intrin.h +218 -0
- package/lib/clang/12.0.1/include/fmaintrin.h +216 -0
- package/lib/clang/12.0.1/include/fxsrintrin.h +91 -0
- package/lib/clang/12.0.1/include/gfniintrin.h +193 -0
- package/lib/clang/12.0.1/include/hresetintrin.h +49 -0
- package/lib/clang/12.0.1/include/htmintrin.h +212 -0
- package/lib/clang/12.0.1/include/htmxlintrin.h +345 -0
- package/lib/clang/12.0.1/include/ia32intrin.h +441 -0
- package/lib/clang/12.0.1/include/immintrin.h +600 -0
- package/lib/clang/12.0.1/include/intrin.h +585 -0
- package/lib/clang/12.0.1/include/inttypes.h +97 -0
- package/lib/clang/12.0.1/include/invpcidintrin.h +23 -0
- package/lib/clang/12.0.1/include/iso646.h +27 -0
- package/lib/clang/12.0.1/include/keylockerintrin.h +506 -0
- package/lib/clang/12.0.1/include/limits.h +102 -0
- package/lib/clang/12.0.1/include/lwpintrin.h +136 -0
- package/lib/clang/12.0.1/include/lzcntintrin.h +104 -0
- package/lib/clang/12.0.1/include/mm3dnow.h +157 -0
- package/lib/clang/12.0.1/include/mm_malloc.h +67 -0
- package/lib/clang/12.0.1/include/mmintrin.h +1558 -0
- package/lib/clang/12.0.1/include/module.modulemap +164 -0
- package/lib/clang/12.0.1/include/movdirintrin.h +49 -0
- package/lib/clang/12.0.1/include/msa.h +573 -0
- package/lib/clang/12.0.1/include/mwaitxintrin.h +33 -0
- package/lib/clang/12.0.1/include/nmmintrin.h +16 -0
- package/lib/clang/12.0.1/include/opencl-c-base.h +589 -0
- package/lib/clang/12.0.1/include/opencl-c.h +17162 -0
- package/lib/clang/12.0.1/include/openmp_wrappers/__clang_openmp_device_functions.h +42 -0
- package/lib/clang/12.0.1/include/openmp_wrappers/cmath +78 -0
- package/lib/clang/12.0.1/include/openmp_wrappers/complex +52 -0
- package/lib/clang/12.0.1/include/openmp_wrappers/complex.h +27 -0
- package/lib/clang/12.0.1/include/openmp_wrappers/complex_cmath.h +388 -0
- package/lib/clang/12.0.1/include/openmp_wrappers/math.h +51 -0
- package/lib/clang/12.0.1/include/openmp_wrappers/new +70 -0
- package/lib/clang/12.0.1/include/pconfigintrin.h +40 -0
- package/lib/clang/12.0.1/include/pkuintrin.h +34 -0
- package/lib/clang/12.0.1/include/pmmintrin.h +290 -0
- package/lib/clang/12.0.1/include/popcntintrin.h +59 -0
- package/lib/clang/12.0.1/include/ppc_wrappers/emmintrin.h +2324 -0
- package/lib/clang/12.0.1/include/ppc_wrappers/mm_malloc.h +50 -0
- package/lib/clang/12.0.1/include/ppc_wrappers/mmintrin.h +1450 -0
- package/lib/clang/12.0.1/include/ppc_wrappers/pmmintrin.h +150 -0
- package/lib/clang/12.0.1/include/ppc_wrappers/smmintrin.h +109 -0
- package/lib/clang/12.0.1/include/ppc_wrappers/tmmintrin.h +495 -0
- package/lib/clang/12.0.1/include/ppc_wrappers/xmmintrin.h +1843 -0
- package/lib/clang/12.0.1/include/prfchwintrin.h +55 -0
- package/lib/clang/12.0.1/include/ptwriteintrin.h +37 -0
- package/lib/clang/12.0.1/include/rdseedintrin.h +42 -0
- package/lib/clang/12.0.1/include/rtmintrin.h +45 -0
- package/lib/clang/12.0.1/include/s390intrin.h +25 -0
- package/lib/clang/12.0.1/include/serializeintrin.h +30 -0
- package/lib/clang/12.0.1/include/sgxintrin.h +60 -0
- package/lib/clang/12.0.1/include/shaintrin.h +61 -0
- package/lib/clang/12.0.1/include/smmintrin.h +2430 -0
- package/lib/clang/12.0.1/include/stdalign.h +21 -0
- package/lib/clang/12.0.1/include/stdarg.h +35 -0
- package/lib/clang/12.0.1/include/stdatomic.h +176 -0
- package/lib/clang/12.0.1/include/stdbool.h +31 -0
- package/lib/clang/12.0.1/include/stddef.h +121 -0
- package/lib/clang/12.0.1/include/stdint.h +693 -0
- package/lib/clang/12.0.1/include/stdnoreturn.h +16 -0
- package/lib/clang/12.0.1/include/tbmintrin.h +140 -0
- package/lib/clang/12.0.1/include/tgmath.h +1368 -0
- package/lib/clang/12.0.1/include/tmmintrin.h +771 -0
- package/lib/clang/12.0.1/include/tsxldtrkintrin.h +56 -0
- package/lib/clang/12.0.1/include/uintrintrin.h +150 -0
- package/lib/clang/12.0.1/include/unwind.h +327 -0
- package/lib/clang/12.0.1/include/vadefs.h +51 -0
- package/lib/clang/12.0.1/include/vaesintrin.h +84 -0
- package/lib/clang/12.0.1/include/varargs.h +12 -0
- package/lib/clang/12.0.1/include/vecintrin.h +10998 -0
- package/lib/clang/12.0.1/include/vpclmulqdqintrin.h +28 -0
- package/lib/clang/12.0.1/include/waitpkgintrin.h +42 -0
- package/lib/clang/12.0.1/include/wasm_simd128.h +1167 -0
- package/lib/clang/12.0.1/include/wbnoinvdintrin.h +24 -0
- package/lib/clang/12.0.1/include/wmmintrin.h +19 -0
- package/lib/clang/12.0.1/include/x86gprintrin.h +23 -0
- package/lib/clang/12.0.1/include/x86intrin.h +63 -0
- package/lib/clang/12.0.1/include/xmmintrin.h +3008 -0
- package/lib/clang/12.0.1/include/xopintrin.h +770 -0
- package/lib/clang/12.0.1/include/xsavecintrin.h +34 -0
- package/lib/clang/12.0.1/include/xsaveintrin.h +63 -0
- package/lib/clang/12.0.1/include/xsaveoptintrin.h +34 -0
- package/lib/clang/12.0.1/include/xsavesintrin.h +44 -0
- package/lib/clang/12.0.1/include/xtestintrin.h +27 -0
- package/package.json +32 -0
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/*===---- htmintrin.h - Standard header for PowerPC HTM ---------------===*\
|
|
2
|
+
*
|
|
3
|
+
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
4
|
+
* See https://llvm.org/LICENSE.txt for license information.
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
6
|
+
*
|
|
7
|
+
\*===----------------------------------------------------------------------===*/
|
|
8
|
+
|
|
9
|
+
#ifndef __HTMINTRIN_H
|
|
10
|
+
#define __HTMINTRIN_H
|
|
11
|
+
|
|
12
|
+
#ifndef __HTM__
|
|
13
|
+
#error "HTM instruction set not enabled"
|
|
14
|
+
#endif
|
|
15
|
+
|
|
16
|
+
#ifdef __powerpc__
|
|
17
|
+
|
|
18
|
+
#include <stdint.h>
|
|
19
|
+
|
|
20
|
+
typedef uint64_t texasr_t;
|
|
21
|
+
typedef uint32_t texasru_t;
|
|
22
|
+
typedef uint32_t texasrl_t;
|
|
23
|
+
typedef uintptr_t tfiar_t;
|
|
24
|
+
typedef uintptr_t tfhar_t;
|
|
25
|
+
|
|
26
|
+
#define _HTM_STATE(CR0) ((CR0 >> 1) & 0x3)
|
|
27
|
+
#define _HTM_NONTRANSACTIONAL 0x0
|
|
28
|
+
#define _HTM_SUSPENDED 0x1
|
|
29
|
+
#define _HTM_TRANSACTIONAL 0x2
|
|
30
|
+
|
|
31
|
+
#define _TEXASR_EXTRACT_BITS(TEXASR,BITNUM,SIZE) \
|
|
32
|
+
(((TEXASR) >> (63-(BITNUM))) & ((1<<(SIZE))-1))
|
|
33
|
+
#define _TEXASRU_EXTRACT_BITS(TEXASR,BITNUM,SIZE) \
|
|
34
|
+
(((TEXASR) >> (31-(BITNUM))) & ((1<<(SIZE))-1))
|
|
35
|
+
|
|
36
|
+
#define _TEXASR_FAILURE_CODE(TEXASR) \
|
|
37
|
+
_TEXASR_EXTRACT_BITS(TEXASR, 7, 8)
|
|
38
|
+
#define _TEXASRU_FAILURE_CODE(TEXASRU) \
|
|
39
|
+
_TEXASRU_EXTRACT_BITS(TEXASRU, 7, 8)
|
|
40
|
+
|
|
41
|
+
#define _TEXASR_FAILURE_PERSISTENT(TEXASR) \
|
|
42
|
+
_TEXASR_EXTRACT_BITS(TEXASR, 7, 1)
|
|
43
|
+
#define _TEXASRU_FAILURE_PERSISTENT(TEXASRU) \
|
|
44
|
+
_TEXASRU_EXTRACT_BITS(TEXASRU, 7, 1)
|
|
45
|
+
|
|
46
|
+
#define _TEXASR_DISALLOWED(TEXASR) \
|
|
47
|
+
_TEXASR_EXTRACT_BITS(TEXASR, 8, 1)
|
|
48
|
+
#define _TEXASRU_DISALLOWED(TEXASRU) \
|
|
49
|
+
_TEXASRU_EXTRACT_BITS(TEXASRU, 8, 1)
|
|
50
|
+
|
|
51
|
+
#define _TEXASR_NESTING_OVERFLOW(TEXASR) \
|
|
52
|
+
_TEXASR_EXTRACT_BITS(TEXASR, 9, 1)
|
|
53
|
+
#define _TEXASRU_NESTING_OVERFLOW(TEXASRU) \
|
|
54
|
+
_TEXASRU_EXTRACT_BITS(TEXASRU, 9, 1)
|
|
55
|
+
|
|
56
|
+
#define _TEXASR_FOOTPRINT_OVERFLOW(TEXASR) \
|
|
57
|
+
_TEXASR_EXTRACT_BITS(TEXASR, 10, 1)
|
|
58
|
+
#define _TEXASRU_FOOTPRINT_OVERFLOW(TEXASRU) \
|
|
59
|
+
_TEXASRU_EXTRACT_BITS(TEXASRU, 10, 1)
|
|
60
|
+
|
|
61
|
+
#define _TEXASR_SELF_INDUCED_CONFLICT(TEXASR) \
|
|
62
|
+
_TEXASR_EXTRACT_BITS(TEXASR, 11, 1)
|
|
63
|
+
#define _TEXASRU_SELF_INDUCED_CONFLICT(TEXASRU) \
|
|
64
|
+
_TEXASRU_EXTRACT_BITS(TEXASRU, 11, 1)
|
|
65
|
+
|
|
66
|
+
#define _TEXASR_NON_TRANSACTIONAL_CONFLICT(TEXASR) \
|
|
67
|
+
_TEXASR_EXTRACT_BITS(TEXASR, 12, 1)
|
|
68
|
+
#define _TEXASRU_NON_TRANSACTIONAL_CONFLICT(TEXASRU) \
|
|
69
|
+
_TEXASRU_EXTRACT_BITS(TEXASRU, 12, 1)
|
|
70
|
+
|
|
71
|
+
#define _TEXASR_TRANSACTION_CONFLICT(TEXASR) \
|
|
72
|
+
_TEXASR_EXTRACT_BITS(TEXASR, 13, 1)
|
|
73
|
+
#define _TEXASRU_TRANSACTION_CONFLICT(TEXASRU) \
|
|
74
|
+
_TEXASRU_EXTRACT_BITS(TEXASRU, 13, 1)
|
|
75
|
+
|
|
76
|
+
#define _TEXASR_TRANSLATION_INVALIDATION_CONFLICT(TEXASR) \
|
|
77
|
+
_TEXASR_EXTRACT_BITS(TEXASR, 14, 1)
|
|
78
|
+
#define _TEXASRU_TRANSLATION_INVALIDATION_CONFLICT(TEXASRU) \
|
|
79
|
+
_TEXASRU_EXTRACT_BITS(TEXASRU, 14, 1)
|
|
80
|
+
|
|
81
|
+
#define _TEXASR_IMPLEMENTAION_SPECIFIC(TEXASR) \
|
|
82
|
+
_TEXASR_EXTRACT_BITS(TEXASR, 15, 1)
|
|
83
|
+
#define _TEXASRU_IMPLEMENTAION_SPECIFIC(TEXASRU) \
|
|
84
|
+
_TEXASRU_EXTRACT_BITS(TEXASRU, 15, 1)
|
|
85
|
+
|
|
86
|
+
#define _TEXASR_INSTRUCTION_FETCH_CONFLICT(TEXASR) \
|
|
87
|
+
_TEXASR_EXTRACT_BITS(TEXASR, 16, 1)
|
|
88
|
+
#define _TEXASRU_INSTRUCTION_FETCH_CONFLICT(TEXASRU) \
|
|
89
|
+
_TEXASRU_EXTRACT_BITS(TEXASRU, 16, 1)
|
|
90
|
+
|
|
91
|
+
#define _TEXASR_ABORT(TEXASR) \
|
|
92
|
+
_TEXASR_EXTRACT_BITS(TEXASR, 31, 1)
|
|
93
|
+
#define _TEXASRU_ABORT(TEXASRU) \
|
|
94
|
+
_TEXASRU_EXTRACT_BITS(TEXASRU, 31, 1)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
#define _TEXASR_SUSPENDED(TEXASR) \
|
|
98
|
+
_TEXASR_EXTRACT_BITS(TEXASR, 32, 1)
|
|
99
|
+
|
|
100
|
+
#define _TEXASR_PRIVILEGE(TEXASR) \
|
|
101
|
+
_TEXASR_EXTRACT_BITS(TEXASR, 35, 2)
|
|
102
|
+
|
|
103
|
+
#define _TEXASR_FAILURE_SUMMARY(TEXASR) \
|
|
104
|
+
_TEXASR_EXTRACT_BITS(TEXASR, 36, 1)
|
|
105
|
+
|
|
106
|
+
#define _TEXASR_TFIAR_EXACT(TEXASR) \
|
|
107
|
+
_TEXASR_EXTRACT_BITS(TEXASR, 37, 1)
|
|
108
|
+
|
|
109
|
+
#define _TEXASR_ROT(TEXASR) \
|
|
110
|
+
_TEXASR_EXTRACT_BITS(TEXASR, 38, 1)
|
|
111
|
+
|
|
112
|
+
#define _TEXASR_TRANSACTION_LEVEL(TEXASR) \
|
|
113
|
+
_TEXASR_EXTRACT_BITS(TEXASR, 63, 12)
|
|
114
|
+
|
|
115
|
+
#endif /* __powerpc */
|
|
116
|
+
|
|
117
|
+
#ifdef __s390__
|
|
118
|
+
|
|
119
|
+
/* Condition codes generated by tbegin */
|
|
120
|
+
#define _HTM_TBEGIN_STARTED 0
|
|
121
|
+
#define _HTM_TBEGIN_INDETERMINATE 1
|
|
122
|
+
#define _HTM_TBEGIN_TRANSIENT 2
|
|
123
|
+
#define _HTM_TBEGIN_PERSISTENT 3
|
|
124
|
+
|
|
125
|
+
/* The abort codes below this threshold are reserved for machine use. */
|
|
126
|
+
#define _HTM_FIRST_USER_ABORT_CODE 256
|
|
127
|
+
|
|
128
|
+
/* The transaction diagnostic block is it is defined in the Principles
|
|
129
|
+
of Operation chapter 5-91. */
|
|
130
|
+
|
|
131
|
+
struct __htm_tdb {
|
|
132
|
+
unsigned char format; /* 0 */
|
|
133
|
+
unsigned char flags;
|
|
134
|
+
unsigned char reserved1[4];
|
|
135
|
+
unsigned short nesting_depth;
|
|
136
|
+
unsigned long long abort_code; /* 8 */
|
|
137
|
+
unsigned long long conflict_token; /* 16 */
|
|
138
|
+
unsigned long long atia; /* 24 */
|
|
139
|
+
unsigned char eaid; /* 32 */
|
|
140
|
+
unsigned char dxc;
|
|
141
|
+
unsigned char reserved2[2];
|
|
142
|
+
unsigned int program_int_id;
|
|
143
|
+
unsigned long long exception_id; /* 40 */
|
|
144
|
+
unsigned long long bea; /* 48 */
|
|
145
|
+
unsigned char reserved3[72]; /* 56 */
|
|
146
|
+
unsigned long long gprs[16]; /* 128 */
|
|
147
|
+
} __attribute__((__packed__, __aligned__ (8)));
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
/* Helper intrinsics to retry tbegin in case of transient failure. */
|
|
151
|
+
|
|
152
|
+
static __inline int __attribute__((__always_inline__, __nodebug__))
|
|
153
|
+
__builtin_tbegin_retry_null (int __retry)
|
|
154
|
+
{
|
|
155
|
+
int cc, i = 0;
|
|
156
|
+
|
|
157
|
+
while ((cc = __builtin_tbegin(0)) == _HTM_TBEGIN_TRANSIENT
|
|
158
|
+
&& i++ < __retry)
|
|
159
|
+
__builtin_tx_assist(i);
|
|
160
|
+
|
|
161
|
+
return cc;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
static __inline int __attribute__((__always_inline__, __nodebug__))
|
|
165
|
+
__builtin_tbegin_retry_tdb (void *__tdb, int __retry)
|
|
166
|
+
{
|
|
167
|
+
int cc, i = 0;
|
|
168
|
+
|
|
169
|
+
while ((cc = __builtin_tbegin(__tdb)) == _HTM_TBEGIN_TRANSIENT
|
|
170
|
+
&& i++ < __retry)
|
|
171
|
+
__builtin_tx_assist(i);
|
|
172
|
+
|
|
173
|
+
return cc;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
#define __builtin_tbegin_retry(tdb, retry) \
|
|
177
|
+
(__builtin_constant_p(tdb == 0) && tdb == 0 ? \
|
|
178
|
+
__builtin_tbegin_retry_null(retry) : \
|
|
179
|
+
__builtin_tbegin_retry_tdb(tdb, retry))
|
|
180
|
+
|
|
181
|
+
static __inline int __attribute__((__always_inline__, __nodebug__))
|
|
182
|
+
__builtin_tbegin_retry_nofloat_null (int __retry)
|
|
183
|
+
{
|
|
184
|
+
int cc, i = 0;
|
|
185
|
+
|
|
186
|
+
while ((cc = __builtin_tbegin_nofloat(0)) == _HTM_TBEGIN_TRANSIENT
|
|
187
|
+
&& i++ < __retry)
|
|
188
|
+
__builtin_tx_assist(i);
|
|
189
|
+
|
|
190
|
+
return cc;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
static __inline int __attribute__((__always_inline__, __nodebug__))
|
|
194
|
+
__builtin_tbegin_retry_nofloat_tdb (void *__tdb, int __retry)
|
|
195
|
+
{
|
|
196
|
+
int cc, i = 0;
|
|
197
|
+
|
|
198
|
+
while ((cc = __builtin_tbegin_nofloat(__tdb)) == _HTM_TBEGIN_TRANSIENT
|
|
199
|
+
&& i++ < __retry)
|
|
200
|
+
__builtin_tx_assist(i);
|
|
201
|
+
|
|
202
|
+
return cc;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
#define __builtin_tbegin_retry_nofloat(tdb, retry) \
|
|
206
|
+
(__builtin_constant_p(tdb == 0) && tdb == 0 ? \
|
|
207
|
+
__builtin_tbegin_retry_nofloat_null(retry) : \
|
|
208
|
+
__builtin_tbegin_retry_nofloat_tdb(tdb, retry))
|
|
209
|
+
|
|
210
|
+
#endif /* __s390__ */
|
|
211
|
+
|
|
212
|
+
#endif /* __HTMINTRIN_H */
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
/*===---- htmxlintrin.h - XL compiler HTM execution intrinsics-------------===*\
|
|
2
|
+
*
|
|
3
|
+
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
4
|
+
* See https://llvm.org/LICENSE.txt for license information.
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
6
|
+
*
|
|
7
|
+
\*===----------------------------------------------------------------------===*/
|
|
8
|
+
|
|
9
|
+
#ifndef __HTMXLINTRIN_H
|
|
10
|
+
#define __HTMXLINTRIN_H
|
|
11
|
+
|
|
12
|
+
#ifndef __HTM__
|
|
13
|
+
#error "HTM instruction set not enabled"
|
|
14
|
+
#endif
|
|
15
|
+
|
|
16
|
+
#include <htmintrin.h>
|
|
17
|
+
|
|
18
|
+
#ifdef __powerpc__
|
|
19
|
+
|
|
20
|
+
#ifdef __cplusplus
|
|
21
|
+
extern "C" {
|
|
22
|
+
#endif
|
|
23
|
+
|
|
24
|
+
#define _TEXASR_PTR(TM_BUF) ((texasr_t *)((char *)(TM_BUF) + 0))
|
|
25
|
+
#define _TEXASRU_PTR(TM_BUF) ((texasru_t *)((char *)(TM_BUF) + 0))
|
|
26
|
+
#define _TEXASRL_PTR(TM_BUF) ((texasrl_t *)((char *)(TM_BUF) + 4))
|
|
27
|
+
#define _TFIAR_PTR(TM_BUF) ((tfiar_t *)((char *)(TM_BUF) + 8))
|
|
28
|
+
|
|
29
|
+
typedef char TM_buff_type[16];
|
|
30
|
+
|
|
31
|
+
/* This macro can be used to determine whether a transaction was successfully
|
|
32
|
+
started from the __TM_begin() and __TM_simple_begin() intrinsic functions
|
|
33
|
+
below. */
|
|
34
|
+
#define _HTM_TBEGIN_STARTED 1
|
|
35
|
+
|
|
36
|
+
extern __inline long
|
|
37
|
+
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
|
38
|
+
__TM_simple_begin (void)
|
|
39
|
+
{
|
|
40
|
+
if (__builtin_expect (__builtin_tbegin (0), 1))
|
|
41
|
+
return _HTM_TBEGIN_STARTED;
|
|
42
|
+
return 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
extern __inline long
|
|
46
|
+
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
|
47
|
+
__TM_begin (void* const __TM_buff)
|
|
48
|
+
{
|
|
49
|
+
*_TEXASRL_PTR (__TM_buff) = 0;
|
|
50
|
+
if (__builtin_expect (__builtin_tbegin (0), 1))
|
|
51
|
+
return _HTM_TBEGIN_STARTED;
|
|
52
|
+
#ifdef __powerpc64__
|
|
53
|
+
*_TEXASR_PTR (__TM_buff) = __builtin_get_texasr ();
|
|
54
|
+
#else
|
|
55
|
+
*_TEXASRU_PTR (__TM_buff) = __builtin_get_texasru ();
|
|
56
|
+
*_TEXASRL_PTR (__TM_buff) = __builtin_get_texasr ();
|
|
57
|
+
#endif
|
|
58
|
+
*_TFIAR_PTR (__TM_buff) = __builtin_get_tfiar ();
|
|
59
|
+
return 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
extern __inline long
|
|
63
|
+
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
|
64
|
+
__TM_end (void)
|
|
65
|
+
{
|
|
66
|
+
if (__builtin_expect (__builtin_tend (0), 1))
|
|
67
|
+
return 1;
|
|
68
|
+
return 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
extern __inline void
|
|
72
|
+
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
|
73
|
+
__TM_abort (void)
|
|
74
|
+
{
|
|
75
|
+
__builtin_tabort (0);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
extern __inline void
|
|
79
|
+
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
|
80
|
+
__TM_named_abort (unsigned char const __code)
|
|
81
|
+
{
|
|
82
|
+
__builtin_tabort (__code);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
extern __inline void
|
|
86
|
+
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
|
87
|
+
__TM_resume (void)
|
|
88
|
+
{
|
|
89
|
+
__builtin_tresume ();
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
extern __inline void
|
|
93
|
+
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
|
94
|
+
__TM_suspend (void)
|
|
95
|
+
{
|
|
96
|
+
__builtin_tsuspend ();
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
extern __inline long
|
|
100
|
+
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
|
101
|
+
__TM_is_user_abort (void* const __TM_buff)
|
|
102
|
+
{
|
|
103
|
+
texasru_t texasru = *_TEXASRU_PTR (__TM_buff);
|
|
104
|
+
return _TEXASRU_ABORT (texasru);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
extern __inline long
|
|
108
|
+
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
|
109
|
+
__TM_is_named_user_abort (void* const __TM_buff, unsigned char *__code)
|
|
110
|
+
{
|
|
111
|
+
texasru_t texasru = *_TEXASRU_PTR (__TM_buff);
|
|
112
|
+
|
|
113
|
+
*__code = _TEXASRU_FAILURE_CODE (texasru);
|
|
114
|
+
return _TEXASRU_ABORT (texasru);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
extern __inline long
|
|
118
|
+
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
|
119
|
+
__TM_is_illegal (void* const __TM_buff)
|
|
120
|
+
{
|
|
121
|
+
texasru_t texasru = *_TEXASRU_PTR (__TM_buff);
|
|
122
|
+
return _TEXASRU_DISALLOWED (texasru);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
extern __inline long
|
|
126
|
+
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
|
127
|
+
__TM_is_footprint_exceeded (void* const __TM_buff)
|
|
128
|
+
{
|
|
129
|
+
texasru_t texasru = *_TEXASRU_PTR (__TM_buff);
|
|
130
|
+
return _TEXASRU_FOOTPRINT_OVERFLOW (texasru);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
extern __inline long
|
|
134
|
+
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
|
135
|
+
__TM_nesting_depth (void* const __TM_buff)
|
|
136
|
+
{
|
|
137
|
+
texasrl_t texasrl;
|
|
138
|
+
|
|
139
|
+
if (_HTM_STATE (__builtin_ttest ()) == _HTM_NONTRANSACTIONAL)
|
|
140
|
+
{
|
|
141
|
+
texasrl = *_TEXASRL_PTR (__TM_buff);
|
|
142
|
+
if (!_TEXASR_FAILURE_SUMMARY (texasrl))
|
|
143
|
+
texasrl = 0;
|
|
144
|
+
}
|
|
145
|
+
else
|
|
146
|
+
texasrl = (texasrl_t) __builtin_get_texasr ();
|
|
147
|
+
|
|
148
|
+
return _TEXASR_TRANSACTION_LEVEL (texasrl);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
extern __inline long
|
|
152
|
+
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
|
153
|
+
__TM_is_nested_too_deep(void* const __TM_buff)
|
|
154
|
+
{
|
|
155
|
+
texasru_t texasru = *_TEXASRU_PTR (__TM_buff);
|
|
156
|
+
return _TEXASRU_NESTING_OVERFLOW (texasru);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
extern __inline long
|
|
160
|
+
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
|
161
|
+
__TM_is_conflict(void* const __TM_buff)
|
|
162
|
+
{
|
|
163
|
+
texasru_t texasru = *_TEXASRU_PTR (__TM_buff);
|
|
164
|
+
/* Return TEXASR bits 11 (Self-Induced Conflict) through
|
|
165
|
+
14 (Translation Invalidation Conflict). */
|
|
166
|
+
return (_TEXASRU_EXTRACT_BITS (texasru, 14, 4)) ? 1 : 0;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
extern __inline long
|
|
170
|
+
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
|
171
|
+
__TM_is_failure_persistent(void* const __TM_buff)
|
|
172
|
+
{
|
|
173
|
+
texasru_t texasru = *_TEXASRU_PTR (__TM_buff);
|
|
174
|
+
return _TEXASRU_FAILURE_PERSISTENT (texasru);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
extern __inline long
|
|
178
|
+
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
|
179
|
+
__TM_failure_address(void* const __TM_buff)
|
|
180
|
+
{
|
|
181
|
+
return *_TFIAR_PTR (__TM_buff);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
extern __inline long long
|
|
185
|
+
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
|
186
|
+
__TM_failure_code(void* const __TM_buff)
|
|
187
|
+
{
|
|
188
|
+
return *_TEXASR_PTR (__TM_buff);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
#ifdef __cplusplus
|
|
192
|
+
}
|
|
193
|
+
#endif
|
|
194
|
+
|
|
195
|
+
#endif /* __powerpc__ */
|
|
196
|
+
|
|
197
|
+
#ifdef __s390__
|
|
198
|
+
|
|
199
|
+
#include <stdint.h>
|
|
200
|
+
|
|
201
|
+
/* These intrinsics are being made available for compatibility with
|
|
202
|
+
the IBM XL compiler. For documentation please see the "z/OS XL
|
|
203
|
+
C/C++ Programming Guide" publicly available on the web. */
|
|
204
|
+
|
|
205
|
+
static __inline long __attribute__((__always_inline__, __nodebug__))
|
|
206
|
+
__TM_simple_begin ()
|
|
207
|
+
{
|
|
208
|
+
return __builtin_tbegin_nofloat (0);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
static __inline long __attribute__((__always_inline__, __nodebug__))
|
|
212
|
+
__TM_begin (void* const __tdb)
|
|
213
|
+
{
|
|
214
|
+
return __builtin_tbegin_nofloat (__tdb);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
static __inline long __attribute__((__always_inline__, __nodebug__))
|
|
218
|
+
__TM_end ()
|
|
219
|
+
{
|
|
220
|
+
return __builtin_tend ();
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
static __inline void __attribute__((__always_inline__))
|
|
224
|
+
__TM_abort ()
|
|
225
|
+
{
|
|
226
|
+
return __builtin_tabort (_HTM_FIRST_USER_ABORT_CODE);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
static __inline void __attribute__((__always_inline__, __nodebug__))
|
|
230
|
+
__TM_named_abort (unsigned char const __code)
|
|
231
|
+
{
|
|
232
|
+
return __builtin_tabort ((int)_HTM_FIRST_USER_ABORT_CODE + __code);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
static __inline void __attribute__((__always_inline__, __nodebug__))
|
|
236
|
+
__TM_non_transactional_store (void* const __addr, long long const __value)
|
|
237
|
+
{
|
|
238
|
+
__builtin_non_tx_store ((uint64_t*)__addr, (uint64_t)__value);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
static __inline long __attribute__((__always_inline__, __nodebug__))
|
|
242
|
+
__TM_nesting_depth (void* const __tdb_ptr)
|
|
243
|
+
{
|
|
244
|
+
int depth = __builtin_tx_nesting_depth ();
|
|
245
|
+
struct __htm_tdb *tdb = (struct __htm_tdb*)__tdb_ptr;
|
|
246
|
+
|
|
247
|
+
if (depth != 0)
|
|
248
|
+
return depth;
|
|
249
|
+
|
|
250
|
+
if (tdb->format != 1)
|
|
251
|
+
return 0;
|
|
252
|
+
return tdb->nesting_depth;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/* Transaction failure diagnostics */
|
|
256
|
+
|
|
257
|
+
static __inline long __attribute__((__always_inline__, __nodebug__))
|
|
258
|
+
__TM_is_user_abort (void* const __tdb_ptr)
|
|
259
|
+
{
|
|
260
|
+
struct __htm_tdb *tdb = (struct __htm_tdb*)__tdb_ptr;
|
|
261
|
+
|
|
262
|
+
if (tdb->format != 1)
|
|
263
|
+
return 0;
|
|
264
|
+
|
|
265
|
+
return !!(tdb->abort_code >= _HTM_FIRST_USER_ABORT_CODE);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
static __inline long __attribute__((__always_inline__, __nodebug__))
|
|
269
|
+
__TM_is_named_user_abort (void* const __tdb_ptr, unsigned char* __code)
|
|
270
|
+
{
|
|
271
|
+
struct __htm_tdb *tdb = (struct __htm_tdb*)__tdb_ptr;
|
|
272
|
+
|
|
273
|
+
if (tdb->format != 1)
|
|
274
|
+
return 0;
|
|
275
|
+
|
|
276
|
+
if (tdb->abort_code >= _HTM_FIRST_USER_ABORT_CODE)
|
|
277
|
+
{
|
|
278
|
+
*__code = tdb->abort_code - _HTM_FIRST_USER_ABORT_CODE;
|
|
279
|
+
return 1;
|
|
280
|
+
}
|
|
281
|
+
return 0;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
static __inline long __attribute__((__always_inline__, __nodebug__))
|
|
285
|
+
__TM_is_illegal (void* const __tdb_ptr)
|
|
286
|
+
{
|
|
287
|
+
struct __htm_tdb *tdb = (struct __htm_tdb*)__tdb_ptr;
|
|
288
|
+
|
|
289
|
+
return (tdb->format == 1
|
|
290
|
+
&& (tdb->abort_code == 4 /* unfiltered program interruption */
|
|
291
|
+
|| tdb->abort_code == 11 /* restricted instruction */));
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
static __inline long __attribute__((__always_inline__, __nodebug__))
|
|
295
|
+
__TM_is_footprint_exceeded (void* const __tdb_ptr)
|
|
296
|
+
{
|
|
297
|
+
struct __htm_tdb *tdb = (struct __htm_tdb*)__tdb_ptr;
|
|
298
|
+
|
|
299
|
+
return (tdb->format == 1
|
|
300
|
+
&& (tdb->abort_code == 7 /* fetch overflow */
|
|
301
|
+
|| tdb->abort_code == 8 /* store overflow */));
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
static __inline long __attribute__((__always_inline__, __nodebug__))
|
|
305
|
+
__TM_is_nested_too_deep (void* const __tdb_ptr)
|
|
306
|
+
{
|
|
307
|
+
struct __htm_tdb *tdb = (struct __htm_tdb*)__tdb_ptr;
|
|
308
|
+
|
|
309
|
+
return tdb->format == 1 && tdb->abort_code == 13; /* depth exceeded */
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
static __inline long __attribute__((__always_inline__, __nodebug__))
|
|
313
|
+
__TM_is_conflict (void* const __tdb_ptr)
|
|
314
|
+
{
|
|
315
|
+
struct __htm_tdb *tdb = (struct __htm_tdb*)__tdb_ptr;
|
|
316
|
+
|
|
317
|
+
return (tdb->format == 1
|
|
318
|
+
&& (tdb->abort_code == 9 /* fetch conflict */
|
|
319
|
+
|| tdb->abort_code == 10 /* store conflict */));
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
static __inline long __attribute__((__always_inline__, __nodebug__))
|
|
323
|
+
__TM_is_failure_persistent (long const __result)
|
|
324
|
+
{
|
|
325
|
+
return __result == _HTM_TBEGIN_PERSISTENT;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
static __inline long __attribute__((__always_inline__, __nodebug__))
|
|
329
|
+
__TM_failure_address (void* const __tdb_ptr)
|
|
330
|
+
{
|
|
331
|
+
struct __htm_tdb *tdb = (struct __htm_tdb*)__tdb_ptr;
|
|
332
|
+
return tdb->atia;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
static __inline long __attribute__((__always_inline__, __nodebug__))
|
|
336
|
+
__TM_failure_code (void* const __tdb_ptr)
|
|
337
|
+
{
|
|
338
|
+
struct __htm_tdb *tdb = (struct __htm_tdb*)__tdb_ptr;
|
|
339
|
+
|
|
340
|
+
return tdb->abort_code;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
#endif /* __s390__ */
|
|
344
|
+
|
|
345
|
+
#endif /* __HTMXLINTRIN_H */
|