@cpp-linter/clang-tidy-win32-x64 12.0.1 → 14.0.0
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/README.md +2 -2
- package/bin/clang-tidy.exe +2 -2
- package/lib/clang/{12.0.1 → 14.0.0}/include/__clang_cuda_complex_builtins.h +3 -3
- package/lib/clang/{12.0.1 → 14.0.0}/include/__clang_cuda_device_functions.h +174 -102
- package/lib/clang/{12.0.1 → 14.0.0}/include/__clang_cuda_intrinsics.h +32 -0
- package/lib/clang/{12.0.1 → 14.0.0}/include/__clang_cuda_libdevice_declares.h +6 -0
- package/lib/clang/{12.0.1 → 14.0.0}/include/__clang_cuda_math.h +3 -3
- package/lib/clang/{12.0.1 → 14.0.0}/include/__clang_cuda_runtime_wrapper.h +68 -8
- package/lib/clang/14.0.0/include/__clang_cuda_texture_intrinsics.h +740 -0
- package/lib/clang/{12.0.1 → 14.0.0}/include/__clang_hip_cmath.h +272 -94
- package/lib/clang/{12.0.1 → 14.0.0}/include/__clang_hip_libdevice_declares.h +24 -12
- package/lib/clang/{12.0.1 → 14.0.0}/include/__clang_hip_math.h +48 -2
- package/lib/clang/14.0.0/include/__clang_hip_runtime_wrapper.h +137 -0
- package/lib/clang/{12.0.1 → 14.0.0}/include/__wmmintrin_aes.h +1 -1
- package/lib/clang/{12.0.1 → 14.0.0}/include/altivec.h +1348 -496
- package/lib/clang/{12.0.1 → 14.0.0}/include/ammintrin.h +4 -0
- package/lib/clang/14.0.0/include/amxintrin.h +494 -0
- package/lib/clang/{12.0.1 → 14.0.0}/include/arm_acle.h +61 -0
- package/lib/clang/{12.0.1 → 14.0.0}/include/arm_neon.h +5544 -4634
- package/lib/clang/14.0.0/include/arm_neon_sve_bridge.h +184 -0
- package/lib/clang/{12.0.1 → 14.0.0}/include/arm_sve.h +11791 -5896
- package/lib/clang/{12.0.1 → 14.0.0}/include/avx2intrin.h +181 -181
- package/lib/clang/{12.0.1 → 14.0.0}/include/avx512bf16intrin.h +3 -3
- package/lib/clang/{12.0.1 → 14.0.0}/include/avx512bwintrin.h +71 -71
- package/lib/clang/{12.0.1 → 14.0.0}/include/avx512dqintrin.h +365 -365
- package/lib/clang/{12.0.1 → 14.0.0}/include/avx512erintrin.h +102 -102
- package/lib/clang/{12.0.1 → 14.0.0}/include/avx512fintrin.h +1750 -1606
- package/lib/clang/14.0.0/include/avx512fp16intrin.h +3349 -0
- package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vbmi2intrin.h +48 -48
- package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vlbf16intrin.h +51 -3
- package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vlbwintrin.h +94 -94
- package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vldqintrin.h +134 -134
- package/lib/clang/14.0.0/include/avx512vlfp16intrin.h +2068 -0
- package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vlintrin.h +563 -563
- package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vlvbmi2intrin.h +96 -96
- package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vlvnniintrin.h +8 -8
- package/lib/clang/{12.0.1 → 14.0.0}/include/avxintrin.h +189 -192
- package/lib/clang/14.0.0/include/builtins.h +16 -0
- package/lib/clang/{12.0.1 → 14.0.0}/include/cetintrin.h +10 -0
- package/lib/clang/{12.0.1 → 14.0.0}/include/cpuid.h +2 -1
- package/lib/clang/14.0.0/include/crc32intrin.h +100 -0
- package/lib/clang/{12.0.1 → 14.0.0}/include/cuda_wrappers/complex +8 -0
- package/lib/clang/{12.0.1 → 14.0.0}/include/emmintrin.h +21 -17
- package/lib/clang/{12.0.1 → 14.0.0}/include/f16cintrin.h +4 -4
- package/lib/clang/{12.0.1 → 14.0.0}/include/float.h +15 -6
- package/lib/clang/{12.0.1 → 14.0.0}/include/gfniintrin.h +47 -48
- package/lib/clang/14.0.0/include/hexagon_circ_brev_intrinsics.h +298 -0
- package/lib/clang/14.0.0/include/hexagon_protos.h +8439 -0
- package/lib/clang/14.0.0/include/hexagon_types.h +2621 -0
- package/lib/clang/14.0.0/include/hvx_hexagon_protos.h +5183 -0
- package/lib/clang/{12.0.1 → 14.0.0}/include/ia32intrin.h +6 -6
- package/lib/clang/{12.0.1 → 14.0.0}/include/immintrin.h +31 -13
- package/lib/clang/{12.0.1 → 14.0.0}/include/intrin.h +63 -19
- package/lib/clang/{12.0.1 → 14.0.0}/include/keylockerintrin.h +32 -8
- package/lib/clang/{12.0.1 → 14.0.0}/include/limits.h +20 -0
- package/lib/clang/{12.0.1 → 14.0.0}/include/mmintrin.h +4 -0
- package/lib/clang/{12.0.1 → 14.0.0}/include/nmmintrin.h +4 -0
- package/lib/clang/{12.0.1 → 14.0.0}/include/opencl-c-base.h +206 -7
- package/lib/clang/{12.0.1 → 14.0.0}/include/opencl-c.h +2187 -797
- package/lib/clang/14.0.0/include/openmp_wrappers/__clang_openmp_device_functions.h +106 -0
- package/lib/clang/{12.0.1 → 14.0.0}/include/openmp_wrappers/cmath +54 -0
- package/lib/clang/{12.0.1 → 14.0.0}/include/openmp_wrappers/complex +11 -8
- package/lib/clang/{12.0.1 → 14.0.0}/include/openmp_wrappers/complex.h +9 -1
- package/lib/clang/{12.0.1 → 14.0.0}/include/openmp_wrappers/math.h +10 -0
- package/lib/clang/{12.0.1 → 14.0.0}/include/openmp_wrappers/new +2 -24
- package/lib/clang/{12.0.1 → 14.0.0}/include/pmmintrin.h +4 -0
- package/lib/clang/{12.0.1 → 14.0.0}/include/ppc_wrappers/emmintrin.h +3 -2
- package/lib/clang/{12.0.1 → 14.0.0}/include/ppc_wrappers/mm_malloc.h +2 -2
- package/lib/clang/{12.0.1 → 14.0.0}/include/ppc_wrappers/mmintrin.h +3 -2
- package/lib/clang/{12.0.1 → 14.0.0}/include/ppc_wrappers/pmmintrin.h +3 -2
- package/lib/clang/{12.0.1 → 14.0.0}/include/ppc_wrappers/smmintrin.h +4 -3
- package/lib/clang/{12.0.1 → 14.0.0}/include/ppc_wrappers/tmmintrin.h +3 -2
- package/lib/clang/{12.0.1 → 14.0.0}/include/ppc_wrappers/xmmintrin.h +3 -2
- package/lib/clang/{12.0.1 → 14.0.0}/include/prfchwintrin.h +5 -2
- package/lib/clang/14.0.0/include/riscv_vector.h +95423 -0
- package/lib/clang/{12.0.1 → 14.0.0}/include/smmintrin.h +80 -159
- package/lib/clang/{12.0.1 → 14.0.0}/include/stdatomic.h +14 -1
- package/lib/clang/{12.0.1 → 14.0.0}/include/stdint.h +168 -0
- package/lib/clang/{12.0.1 → 14.0.0}/include/tmmintrin.h +10 -6
- package/lib/clang/{12.0.1 → 14.0.0}/include/uintrintrin.h +7 -0
- package/lib/clang/{12.0.1 → 14.0.0}/include/unwind.h +2 -1
- package/lib/clang/{12.0.1 → 14.0.0}/include/vaesintrin.h +22 -21
- package/lib/clang/{12.0.1 → 14.0.0}/include/vecintrin.h +206 -77
- package/lib/clang/{12.0.1 → 14.0.0}/include/vpclmulqdqintrin.h +8 -6
- package/lib/clang/14.0.0/include/wasm_simd128.h +1877 -0
- package/lib/clang/{12.0.1 → 14.0.0}/include/wmmintrin.h +4 -0
- package/lib/clang/{12.0.1 → 14.0.0}/include/x86gprintrin.h +12 -0
- package/lib/clang/{12.0.1 → 14.0.0}/include/xmmintrin.h +9 -5
- package/lib/clang/{12.0.1 → 14.0.0}/include/xopintrin.h +31 -31
- package/package.json +6 -6
- package/lib/clang/12.0.1/include/__clang_hip_runtime_wrapper.h +0 -69
- package/lib/clang/12.0.1/include/amxintrin.h +0 -278
- package/lib/clang/12.0.1/include/openmp_wrappers/__clang_openmp_device_functions.h +0 -42
- package/lib/clang/12.0.1/include/wasm_simd128.h +0 -1167
- /package/lib/clang/{12.0.1 → 14.0.0}/include/__clang_cuda_builtin_vars.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/__clang_cuda_cmath.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/__clang_cuda_math_forward_declares.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/__stddef_max_align_t.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/__wmmintrin_pclmul.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/adxintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/arm64intr.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/arm_bf16.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/arm_cde.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/arm_cmse.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/arm_fp16.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/arm_mve.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/armintr.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/avx512bitalgintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/avx512cdintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/avx512ifmaintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/avx512ifmavlintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/avx512pfintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vbmiintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vbmivlintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vlbitalgintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vlcdintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vlvp2intersectintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vnniintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vp2intersectintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vpopcntdqintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/avx512vpopcntdqvlintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/avxvnniintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/bmi2intrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/bmiintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/cet.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/cldemoteintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/clflushoptintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/clwbintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/clzerointrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/cuda_wrappers/algorithm +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/cuda_wrappers/new +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/enqcmdintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/fma4intrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/fmaintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/fxsrintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/hresetintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/htmintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/htmxlintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/inttypes.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/invpcidintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/iso646.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/lwpintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/lzcntintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/mm3dnow.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/mm_malloc.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/module.modulemap +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/movdirintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/msa.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/mwaitxintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/openmp_wrappers/complex_cmath.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/pconfigintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/pkuintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/popcntintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/ptwriteintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/rdseedintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/rtmintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/s390intrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/serializeintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/sgxintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/shaintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/stdalign.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/stdarg.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/stdbool.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/stddef.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/stdnoreturn.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/tbmintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/tgmath.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/tsxldtrkintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/vadefs.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/varargs.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/waitpkgintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/wbnoinvdintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/x86intrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/xsavecintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/xsaveintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/xsaveoptintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/xsavesintrin.h +0 -0
- /package/lib/clang/{12.0.1 → 14.0.0}/include/xtestintrin.h +0 -0
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
/* Define the default attributes for the functions in this file. */
|
|
18
18
|
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__))
|
|
19
|
-
#define
|
|
19
|
+
#define __DEFAULT_FN_ATTRS_CRC32 __attribute__((__always_inline__, __nodebug__, __target__("crc32")))
|
|
20
20
|
|
|
21
21
|
#if defined(__cplusplus) && (__cplusplus >= 201103L)
|
|
22
22
|
#define __DEFAULT_FN_ATTRS_CAST __attribute__((__always_inline__)) constexpr
|
|
@@ -282,7 +282,7 @@ _castu64_f64(unsigned long long __A) {
|
|
|
282
282
|
* \returns The result of adding operand \a __C to the CRC-32C checksum of
|
|
283
283
|
* operand \a __D.
|
|
284
284
|
*/
|
|
285
|
-
static __inline__ unsigned int
|
|
285
|
+
static __inline__ unsigned int __DEFAULT_FN_ATTRS_CRC32
|
|
286
286
|
__crc32b(unsigned int __C, unsigned char __D)
|
|
287
287
|
{
|
|
288
288
|
return __builtin_ia32_crc32qi(__C, __D);
|
|
@@ -303,7 +303,7 @@ __crc32b(unsigned int __C, unsigned char __D)
|
|
|
303
303
|
* \returns The result of adding operand \a __C to the CRC-32C checksum of
|
|
304
304
|
* operand \a __D.
|
|
305
305
|
*/
|
|
306
|
-
static __inline__ unsigned int
|
|
306
|
+
static __inline__ unsigned int __DEFAULT_FN_ATTRS_CRC32
|
|
307
307
|
__crc32w(unsigned int __C, unsigned short __D)
|
|
308
308
|
{
|
|
309
309
|
return __builtin_ia32_crc32hi(__C, __D);
|
|
@@ -324,7 +324,7 @@ __crc32w(unsigned int __C, unsigned short __D)
|
|
|
324
324
|
* \returns The result of adding operand \a __C to the CRC-32C checksum of
|
|
325
325
|
* operand \a __D.
|
|
326
326
|
*/
|
|
327
|
-
static __inline__ unsigned int
|
|
327
|
+
static __inline__ unsigned int __DEFAULT_FN_ATTRS_CRC32
|
|
328
328
|
__crc32d(unsigned int __C, unsigned int __D)
|
|
329
329
|
{
|
|
330
330
|
return __builtin_ia32_crc32si(__C, __D);
|
|
@@ -346,7 +346,7 @@ __crc32d(unsigned int __C, unsigned int __D)
|
|
|
346
346
|
* \returns The result of adding operand \a __C to the CRC-32C checksum of
|
|
347
347
|
* operand \a __D.
|
|
348
348
|
*/
|
|
349
|
-
static __inline__ unsigned long long
|
|
349
|
+
static __inline__ unsigned long long __DEFAULT_FN_ATTRS_CRC32
|
|
350
350
|
__crc32q(unsigned long long __C, unsigned long long __D)
|
|
351
351
|
{
|
|
352
352
|
return __builtin_ia32_crc32di(__C, __D);
|
|
@@ -435,7 +435,7 @@ __rorq(unsigned long long __X, int __C) {
|
|
|
435
435
|
|
|
436
436
|
#undef __DEFAULT_FN_ATTRS
|
|
437
437
|
#undef __DEFAULT_FN_ATTRS_CAST
|
|
438
|
-
#undef
|
|
438
|
+
#undef __DEFAULT_FN_ATTRS_CRC32
|
|
439
439
|
#undef __DEFAULT_FN_ATTRS_CONSTEXPR
|
|
440
440
|
|
|
441
441
|
#endif /* __IA32INTRIN_H */
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
#ifndef __IMMINTRIN_H
|
|
11
11
|
#define __IMMINTRIN_H
|
|
12
12
|
|
|
13
|
+
#if !defined(__i386__) && !defined(__x86_64__)
|
|
14
|
+
#error "This header is only meant to be used on x86 and x64 architecture"
|
|
15
|
+
#endif
|
|
16
|
+
|
|
13
17
|
#include <x86gprintrin.h>
|
|
14
18
|
|
|
15
19
|
#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \
|
|
@@ -72,11 +76,6 @@
|
|
|
72
76
|
#include <f16cintrin.h>
|
|
73
77
|
#endif
|
|
74
78
|
|
|
75
|
-
#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \
|
|
76
|
-
defined(__VPCLMULQDQ__)
|
|
77
|
-
#include <vpclmulqdqintrin.h>
|
|
78
|
-
#endif
|
|
79
|
-
|
|
80
79
|
/* No feature check desired due to internal checks */
|
|
81
80
|
#include <bmiintrin.h>
|
|
82
81
|
|
|
@@ -215,6 +214,20 @@
|
|
|
215
214
|
#include <avx512pfintrin.h>
|
|
216
215
|
#endif
|
|
217
216
|
|
|
217
|
+
/*
|
|
218
|
+
* FIXME: _Float16 type is legal only when HW support float16 operation.
|
|
219
|
+
* We use __AVX512FP16__ to identify if float16 is supported or not, so
|
|
220
|
+
* when float16 is not supported, the related header is not included.
|
|
221
|
+
*
|
|
222
|
+
*/
|
|
223
|
+
#if defined(__AVX512FP16__)
|
|
224
|
+
#include <avx512fp16intrin.h>
|
|
225
|
+
#endif
|
|
226
|
+
|
|
227
|
+
#if defined(__AVX512FP16__) && defined(__AVX512VL__)
|
|
228
|
+
#include <avx512vlfp16intrin.h>
|
|
229
|
+
#endif
|
|
230
|
+
|
|
218
231
|
#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \
|
|
219
232
|
defined(__AVX512BF16__)
|
|
220
233
|
#include <avx512bf16intrin.h>
|
|
@@ -230,6 +243,11 @@
|
|
|
230
243
|
#include <pkuintrin.h>
|
|
231
244
|
#endif
|
|
232
245
|
|
|
246
|
+
#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \
|
|
247
|
+
defined(__VPCLMULQDQ__)
|
|
248
|
+
#include <vpclmulqdqintrin.h>
|
|
249
|
+
#endif
|
|
250
|
+
|
|
233
251
|
#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \
|
|
234
252
|
defined(__VAES__)
|
|
235
253
|
#include <vaesintrin.h>
|
|
@@ -525,13 +543,13 @@ extern "C" {
|
|
|
525
543
|
#if defined(__i386__) || defined(__x86_64__)
|
|
526
544
|
static __inline__ long __DEFAULT_FN_ATTRS
|
|
527
545
|
_InterlockedExchange_HLEAcquire(long volatile *_Target, long _Value) {
|
|
528
|
-
__asm__ __volatile__(".byte 0xf2 ; lock ; xchg %0, %1"
|
|
546
|
+
__asm__ __volatile__(".byte 0xf2 ; lock ; xchg {%0, %1|%1, %0}"
|
|
529
547
|
: "+r" (_Value), "+m" (*_Target) :: "memory");
|
|
530
548
|
return _Value;
|
|
531
549
|
}
|
|
532
550
|
static __inline__ long __DEFAULT_FN_ATTRS
|
|
533
551
|
_InterlockedExchange_HLERelease(long volatile *_Target, long _Value) {
|
|
534
|
-
__asm__ __volatile__(".byte 0xf3 ; lock ; xchg %0, %1"
|
|
552
|
+
__asm__ __volatile__(".byte 0xf3 ; lock ; xchg {%0, %1|%1, %0}"
|
|
535
553
|
: "+r" (_Value), "+m" (*_Target) :: "memory");
|
|
536
554
|
return _Value;
|
|
537
555
|
}
|
|
@@ -539,13 +557,13 @@ _InterlockedExchange_HLERelease(long volatile *_Target, long _Value) {
|
|
|
539
557
|
#if defined(__x86_64__)
|
|
540
558
|
static __inline__ __int64 __DEFAULT_FN_ATTRS
|
|
541
559
|
_InterlockedExchange64_HLEAcquire(__int64 volatile *_Target, __int64 _Value) {
|
|
542
|
-
__asm__ __volatile__(".byte 0xf2 ; lock ; xchg %0, %1"
|
|
560
|
+
__asm__ __volatile__(".byte 0xf2 ; lock ; xchg {%0, %1|%1, %0}"
|
|
543
561
|
: "+r" (_Value), "+m" (*_Target) :: "memory");
|
|
544
562
|
return _Value;
|
|
545
563
|
}
|
|
546
564
|
static __inline__ __int64 __DEFAULT_FN_ATTRS
|
|
547
565
|
_InterlockedExchange64_HLERelease(__int64 volatile *_Target, __int64 _Value) {
|
|
548
|
-
__asm__ __volatile__(".byte 0xf3 ; lock ; xchg %0, %1"
|
|
566
|
+
__asm__ __volatile__(".byte 0xf3 ; lock ; xchg {%0, %1|%1, %0}"
|
|
549
567
|
: "+r" (_Value), "+m" (*_Target) :: "memory");
|
|
550
568
|
return _Value;
|
|
551
569
|
}
|
|
@@ -557,7 +575,7 @@ _InterlockedExchange64_HLERelease(__int64 volatile *_Target, __int64 _Value) {
|
|
|
557
575
|
static __inline__ long __DEFAULT_FN_ATTRS
|
|
558
576
|
_InterlockedCompareExchange_HLEAcquire(long volatile *_Destination,
|
|
559
577
|
long _Exchange, long _Comparand) {
|
|
560
|
-
__asm__ __volatile__(".byte 0xf2 ; lock ; cmpxchg %2, %1"
|
|
578
|
+
__asm__ __volatile__(".byte 0xf2 ; lock ; cmpxchg {%2, %1|%1, %2}"
|
|
561
579
|
: "+a" (_Comparand), "+m" (*_Destination)
|
|
562
580
|
: "r" (_Exchange) : "memory");
|
|
563
581
|
return _Comparand;
|
|
@@ -565,7 +583,7 @@ _InterlockedCompareExchange_HLEAcquire(long volatile *_Destination,
|
|
|
565
583
|
static __inline__ long __DEFAULT_FN_ATTRS
|
|
566
584
|
_InterlockedCompareExchange_HLERelease(long volatile *_Destination,
|
|
567
585
|
long _Exchange, long _Comparand) {
|
|
568
|
-
__asm__ __volatile__(".byte 0xf3 ; lock ; cmpxchg %2, %1"
|
|
586
|
+
__asm__ __volatile__(".byte 0xf3 ; lock ; cmpxchg {%2, %1|%1, %2}"
|
|
569
587
|
: "+a" (_Comparand), "+m" (*_Destination)
|
|
570
588
|
: "r" (_Exchange) : "memory");
|
|
571
589
|
return _Comparand;
|
|
@@ -575,7 +593,7 @@ _InterlockedCompareExchange_HLERelease(long volatile *_Destination,
|
|
|
575
593
|
static __inline__ __int64 __DEFAULT_FN_ATTRS
|
|
576
594
|
_InterlockedCompareExchange64_HLEAcquire(__int64 volatile *_Destination,
|
|
577
595
|
__int64 _Exchange, __int64 _Comparand) {
|
|
578
|
-
__asm__ __volatile__(".byte 0xf2 ; lock ; cmpxchg %2, %1"
|
|
596
|
+
__asm__ __volatile__(".byte 0xf2 ; lock ; cmpxchg {%2, %1|%1, %2}"
|
|
579
597
|
: "+a" (_Comparand), "+m" (*_Destination)
|
|
580
598
|
: "r" (_Exchange) : "memory");
|
|
581
599
|
return _Comparand;
|
|
@@ -583,7 +601,7 @@ _InterlockedCompareExchange64_HLEAcquire(__int64 volatile *_Destination,
|
|
|
583
601
|
static __inline__ __int64 __DEFAULT_FN_ATTRS
|
|
584
602
|
_InterlockedCompareExchange64_HLERelease(__int64 volatile *_Destination,
|
|
585
603
|
__int64 _Exchange, __int64 _Comparand) {
|
|
586
|
-
__asm__ __volatile__(".byte 0xf3 ; lock ; cmpxchg %2, %1"
|
|
604
|
+
__asm__ __volatile__(".byte 0xf3 ; lock ; cmpxchg {%2, %1|%1, %2}"
|
|
587
605
|
: "+a" (_Comparand), "+m" (*_Destination)
|
|
588
606
|
: "r" (_Exchange) : "memory");
|
|
589
607
|
return _Comparand;
|
|
@@ -97,8 +97,9 @@ unsigned long __readcr8(void);
|
|
|
97
97
|
unsigned int __readdr(unsigned int);
|
|
98
98
|
#ifdef __i386__
|
|
99
99
|
unsigned char __readfsbyte(unsigned long);
|
|
100
|
-
unsigned __int64 __readfsqword(unsigned long);
|
|
101
100
|
unsigned short __readfsword(unsigned long);
|
|
101
|
+
unsigned long __readfsdword(unsigned long);
|
|
102
|
+
unsigned __int64 __readfsqword(unsigned long);
|
|
102
103
|
#endif
|
|
103
104
|
unsigned __int64 __readmsr(unsigned long);
|
|
104
105
|
unsigned __int64 __readpmc(unsigned long);
|
|
@@ -149,10 +150,8 @@ long _InterlockedExchangeAdd_HLEAcquire(long volatile *, long);
|
|
|
149
150
|
long _InterlockedExchangeAdd_HLERelease(long volatile *, long);
|
|
150
151
|
__int64 _InterlockedExchangeAdd64_HLEAcquire(__int64 volatile *, __int64);
|
|
151
152
|
__int64 _InterlockedExchangeAdd64_HLERelease(__int64 volatile *, __int64);
|
|
152
|
-
void
|
|
153
|
-
|
|
154
|
-
void __attribute__((__deprecated__(
|
|
155
|
-
"use other intrinsics or C++11 atomics instead"))) _ReadWriteBarrier(void);
|
|
153
|
+
void _ReadBarrier(void);
|
|
154
|
+
void _ReadWriteBarrier(void);
|
|
156
155
|
unsigned int _rorx_u32(unsigned int, const unsigned int);
|
|
157
156
|
int _sarx_i32(int, unsigned int);
|
|
158
157
|
#if __STDC_HOSTED__
|
|
@@ -163,8 +162,7 @@ unsigned int _shrx_u32(unsigned int, unsigned int);
|
|
|
163
162
|
void _Store_HLERelease(long volatile *, long);
|
|
164
163
|
void _Store64_HLERelease(__int64 volatile *, __int64);
|
|
165
164
|
void _StorePointer_HLERelease(void *volatile *, void *);
|
|
166
|
-
void
|
|
167
|
-
"use other intrinsics or C++11 atomics instead"))) _WriteBarrier(void);
|
|
165
|
+
void _WriteBarrier(void);
|
|
168
166
|
unsigned __int32 xbegin(void);
|
|
169
167
|
void _xend(void);
|
|
170
168
|
|
|
@@ -451,29 +449,58 @@ unsigned char _InterlockedCompareExchange128_rel(__int64 volatile *_Destination,
|
|
|
451
449
|
static __inline__ void __DEFAULT_FN_ATTRS __movsb(unsigned char *__dst,
|
|
452
450
|
unsigned char const *__src,
|
|
453
451
|
size_t __n) {
|
|
454
|
-
|
|
455
|
-
|
|
452
|
+
#if defined(__x86_64__)
|
|
453
|
+
__asm__ __volatile__("rep movsb"
|
|
454
|
+
: "+D"(__dst), "+S"(__src), "+c"(__n)
|
|
455
|
+
:
|
|
456
|
+
: "memory");
|
|
457
|
+
#else
|
|
458
|
+
__asm__ __volatile__("xchg {%%esi, %1|%1, esi}\n"
|
|
459
|
+
"rep movsb\n"
|
|
460
|
+
"xchg {%%esi, %1|%1, esi}"
|
|
461
|
+
: "+D"(__dst), "+r"(__src), "+c"(__n)
|
|
462
|
+
:
|
|
463
|
+
: "memory");
|
|
464
|
+
#endif
|
|
456
465
|
}
|
|
457
466
|
static __inline__ void __DEFAULT_FN_ATTRS __movsd(unsigned long *__dst,
|
|
458
467
|
unsigned long const *__src,
|
|
459
468
|
size_t __n) {
|
|
460
|
-
|
|
469
|
+
#if defined(__x86_64__)
|
|
470
|
+
__asm__ __volatile__("rep movs{l|d}"
|
|
461
471
|
: "+D"(__dst), "+S"(__src), "+c"(__n)
|
|
462
472
|
:
|
|
463
473
|
: "memory");
|
|
474
|
+
#else
|
|
475
|
+
__asm__ __volatile__("xchg {%%esi, %1|%1, esi}\n"
|
|
476
|
+
"rep movs{l|d}\n"
|
|
477
|
+
"xchg {%%esi, %1|%1, esi}"
|
|
478
|
+
: "+D"(__dst), "+r"(__src), "+c"(__n)
|
|
479
|
+
:
|
|
480
|
+
: "memory");
|
|
481
|
+
#endif
|
|
464
482
|
}
|
|
465
483
|
static __inline__ void __DEFAULT_FN_ATTRS __movsw(unsigned short *__dst,
|
|
466
484
|
unsigned short const *__src,
|
|
467
485
|
size_t __n) {
|
|
486
|
+
#if defined(__x86_64__)
|
|
468
487
|
__asm__ __volatile__("rep movsw"
|
|
469
488
|
: "+D"(__dst), "+S"(__src), "+c"(__n)
|
|
470
489
|
:
|
|
471
490
|
: "memory");
|
|
491
|
+
#else
|
|
492
|
+
__asm__ __volatile__("xchg {%%esi, %1|%1, esi}\n"
|
|
493
|
+
"rep movsw\n"
|
|
494
|
+
"xchg {%%esi, %1|%1, esi}"
|
|
495
|
+
: "+D"(__dst), "+r"(__src), "+c"(__n)
|
|
496
|
+
:
|
|
497
|
+
: "memory");
|
|
498
|
+
#endif
|
|
472
499
|
}
|
|
473
500
|
static __inline__ void __DEFAULT_FN_ATTRS __stosd(unsigned long *__dst,
|
|
474
501
|
unsigned long __x,
|
|
475
502
|
size_t __n) {
|
|
476
|
-
__asm__ __volatile__("rep
|
|
503
|
+
__asm__ __volatile__("rep stos{l|d}"
|
|
477
504
|
: "+D"(__dst), "+c"(__n)
|
|
478
505
|
: "a"(__x)
|
|
479
506
|
: "memory");
|
|
@@ -507,16 +534,26 @@ static __inline__ void __DEFAULT_FN_ATTRS __stosq(unsigned __int64 *__dst,
|
|
|
507
534
|
|* Misc
|
|
508
535
|
\*----------------------------------------------------------------------------*/
|
|
509
536
|
#if defined(__i386__) || defined(__x86_64__)
|
|
537
|
+
#if defined(__i386__)
|
|
538
|
+
#define __cpuid_count(__leaf, __count, __eax, __ebx, __ecx, __edx) \
|
|
539
|
+
__asm("cpuid" \
|
|
540
|
+
: "=a"(__eax), "=b"(__ebx), "=c"(__ecx), "=d"(__edx) \
|
|
541
|
+
: "0"(__leaf), "2"(__count))
|
|
542
|
+
#else
|
|
543
|
+
/* x86-64 uses %rbx as the base register, so preserve it. */
|
|
544
|
+
#define __cpuid_count(__leaf, __count, __eax, __ebx, __ecx, __edx) \
|
|
545
|
+
__asm("xchg{q} {%%rbx, %q1|%q1, rbx}\n" \
|
|
546
|
+
"cpuid\n" \
|
|
547
|
+
"xchg{q} {%%rbx, %q1|%q1, rbx}" \
|
|
548
|
+
: "=a"(__eax), "=r"(__ebx), "=c"(__ecx), "=d"(__edx) \
|
|
549
|
+
: "0"(__leaf), "2"(__count))
|
|
550
|
+
#endif
|
|
510
551
|
static __inline__ void __DEFAULT_FN_ATTRS __cpuid(int __info[4], int __level) {
|
|
511
|
-
|
|
512
|
-
: "=a"(__info[0]), "=b"(__info[1]), "=c"(__info[2]), "=d"(__info[3])
|
|
513
|
-
: "a"(__level), "c"(0));
|
|
552
|
+
__cpuid_count(__level, 0, __info[0], __info[1], __info[2], __info[3]);
|
|
514
553
|
}
|
|
515
554
|
static __inline__ void __DEFAULT_FN_ATTRS __cpuidex(int __info[4], int __level,
|
|
516
555
|
int __ecx) {
|
|
517
|
-
|
|
518
|
-
: "=a"(__info[0]), "=b"(__info[1]), "=c"(__info[2]), "=d"(__info[3])
|
|
519
|
-
: "a"(__level), "c"(__ecx));
|
|
556
|
+
__cpuid_count(__level, __ecx, __info[0], __info[1], __info[2], __info[3]);
|
|
520
557
|
}
|
|
521
558
|
static __inline__ void __DEFAULT_FN_ATTRS __halt(void) {
|
|
522
559
|
__asm__ volatile("hlt");
|
|
@@ -541,6 +578,9 @@ void _WriteStatusReg(int, __int64);
|
|
|
541
578
|
unsigned short __cdecl _byteswap_ushort(unsigned short val);
|
|
542
579
|
unsigned long __cdecl _byteswap_ulong (unsigned long val);
|
|
543
580
|
unsigned __int64 __cdecl _byteswap_uint64(unsigned __int64 val);
|
|
581
|
+
|
|
582
|
+
__int64 __mulh(__int64 __a, __int64 __b);
|
|
583
|
+
unsigned __int64 __umulh(unsigned __int64 __a, unsigned __int64 __b);
|
|
544
584
|
#endif
|
|
545
585
|
|
|
546
586
|
/*----------------------------------------------------------------------------*\
|
|
@@ -564,13 +604,17 @@ __readmsr(unsigned long __register) {
|
|
|
564
604
|
|
|
565
605
|
static __inline__ unsigned __LPTRINT_TYPE__ __DEFAULT_FN_ATTRS __readcr3(void) {
|
|
566
606
|
unsigned __LPTRINT_TYPE__ __cr3_val;
|
|
567
|
-
__asm__ __volatile__
|
|
607
|
+
__asm__ __volatile__(
|
|
608
|
+
"mov {%%cr3, %0|%0, cr3}"
|
|
609
|
+
: "=r"(__cr3_val)
|
|
610
|
+
:
|
|
611
|
+
: "memory");
|
|
568
612
|
return __cr3_val;
|
|
569
613
|
}
|
|
570
614
|
|
|
571
615
|
static __inline__ void __DEFAULT_FN_ATTRS
|
|
572
616
|
__writecr3(unsigned __INTPTR_TYPE__ __cr3_val) {
|
|
573
|
-
__asm__ ("mov %0, %%cr3" : : "r"(__cr3_val) : "memory");
|
|
617
|
+
__asm__ ("mov {%0, %%cr3|cr3, %0}" : : "r"(__cr3_val) : "memory");
|
|
574
618
|
}
|
|
575
619
|
|
|
576
620
|
#ifdef __cplusplus
|
|
@@ -99,7 +99,7 @@ _mm_loadiwkey (unsigned int __ctl, __m128i __intkey,
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
/// Wrap a 128-bit AES key from __key into a key handle and output in
|
|
102
|
-
/// ((__m128i*)__h) to ((__m128i*)__h) +
|
|
102
|
+
/// ((__m128i*)__h) to ((__m128i*)__h) + 2 and a 32-bit value as return.
|
|
103
103
|
/// The explicit source operand __htype specifies handle restrictions.
|
|
104
104
|
///
|
|
105
105
|
/// \headerfile <x86intrin.h>
|
|
@@ -120,9 +120,6 @@ _mm_loadiwkey (unsigned int __ctl, __m128i __intkey,
|
|
|
120
120
|
/// MEM[__h+127:__h] := Handle[127:0] // AAD
|
|
121
121
|
/// MEM[__h+255:__h+128] := Handle[255:128] // Integrity Tag
|
|
122
122
|
/// MEM[__h+383:__h+256] := Handle[383:256] // CipherText
|
|
123
|
-
/// MEM[__h+511:__h+384] := 0 // Reserved for future usage
|
|
124
|
-
/// MEM[__h+639:__h+512] := 0 // Reserved for future usage
|
|
125
|
-
/// MEM[__h+767:__h+640] := 0 // Reserved for future usage
|
|
126
123
|
/// OF := 0
|
|
127
124
|
/// SF := 0
|
|
128
125
|
/// ZF := 0
|
|
@@ -136,7 +133,7 @@ _mm_encodekey128_u32(unsigned int __htype, __m128i __key, void *__h) {
|
|
|
136
133
|
}
|
|
137
134
|
|
|
138
135
|
/// Wrap a 256-bit AES key from __key_hi:__key_lo into a key handle, then
|
|
139
|
-
/// output handle in ((__m128i*)__h) to ((__m128i*)__h) +
|
|
136
|
+
/// output handle in ((__m128i*)__h) to ((__m128i*)__h) + 3 and
|
|
140
137
|
/// a 32-bit value as return.
|
|
141
138
|
/// The explicit source operand __htype specifies handle restrictions.
|
|
142
139
|
///
|
|
@@ -160,9 +157,6 @@ _mm_encodekey128_u32(unsigned int __htype, __m128i __key, void *__h) {
|
|
|
160
157
|
/// MEM[__h+255:__h+128] := Handle[255:128] // Tag
|
|
161
158
|
/// MEM[__h+383:__h+256] := Handle[383:256] // CipherText[127:0]
|
|
162
159
|
/// MEM[__h+511:__h+384] := Handle[511:384] // CipherText[255:128]
|
|
163
|
-
/// MEM[__h+639:__h+512] := 0 // Reserved for future usage
|
|
164
|
-
/// MEM[__h+767:__h+640] := 0 // Reserved for future usage
|
|
165
|
-
/// MEM[__h+895:__h+768] := 0 Integrity// Reserved for future usage
|
|
166
160
|
/// OF := 0
|
|
167
161
|
/// SF := 0
|
|
168
162
|
/// ZF := 0
|
|
@@ -230,10 +224,12 @@ _mm_aesenc128kl_u8(__m128i* __odata, __m128i __idata, const void *__h) {
|
|
|
230
224
|
/// HandleKeyType (Handle[511:0]) != HANDLE_KEY_TYPE_AES256 )
|
|
231
225
|
/// IF (IllegalHandle)
|
|
232
226
|
/// ZF := 1
|
|
227
|
+
/// MEM[__odata+127:__odata] := 0
|
|
233
228
|
/// ELSE
|
|
234
229
|
/// (UnwrappedKey, Authentic) := UnwrapKeyAndAuthenticate512 (Handle[511:0], IWKey)
|
|
235
230
|
/// IF (Authentic == 0)
|
|
236
231
|
/// ZF := 1
|
|
232
|
+
/// MEM[__odata+127:__odata] := 0
|
|
237
233
|
/// ELSE
|
|
238
234
|
/// MEM[__odata+127:__odata] := AES256Encrypt (__idata[127:0], UnwrappedKey)
|
|
239
235
|
/// ZF := 0
|
|
@@ -267,10 +263,12 @@ _mm_aesenc256kl_u8(__m128i* __odata, __m128i __idata, const void *__h) {
|
|
|
267
263
|
/// HandleKeyType (Handle[383:0]) != HANDLE_KEY_TYPE_AES128)
|
|
268
264
|
/// IF (IllegalHandle)
|
|
269
265
|
/// ZF := 1
|
|
266
|
+
/// MEM[__odata+127:__odata] := 0
|
|
270
267
|
/// ELSE
|
|
271
268
|
/// (UnwrappedKey, Authentic) := UnwrapKeyAndAuthenticate384 (Handle[383:0], IWKey)
|
|
272
269
|
/// IF (Authentic == 0)
|
|
273
270
|
/// ZF := 1
|
|
271
|
+
/// MEM[__odata+127:__odata] := 0
|
|
274
272
|
/// ELSE
|
|
275
273
|
/// MEM[__odata+127:__odata] := AES128Decrypt (__idata[127:0], UnwrappedKey)
|
|
276
274
|
/// ZF := 0
|
|
@@ -304,10 +302,12 @@ _mm_aesdec128kl_u8(__m128i* __odata, __m128i __idata, const void *__h) {
|
|
|
304
302
|
/// HandleKeyType (Handle[511:0]) != HANDLE_KEY_TYPE_AES256)
|
|
305
303
|
/// IF (IllegalHandle)
|
|
306
304
|
/// ZF := 1
|
|
305
|
+
/// MEM[__odata+127:__odata] := 0
|
|
307
306
|
/// ELSE
|
|
308
307
|
/// (UnwrappedKey, Authentic) := UnwrapKeyAndAuthenticate512 (Handle[511:0], IWKey)
|
|
309
308
|
/// IF (Authentic == 0)
|
|
310
309
|
/// ZF := 1
|
|
310
|
+
/// MEM[__odata+127:__odata] := 0
|
|
311
311
|
/// ELSE
|
|
312
312
|
/// MEM[__odata+127:__odata] := AES256Decrypt (__idata[127:0], UnwrappedKey)
|
|
313
313
|
/// ZF := 0
|
|
@@ -354,10 +354,16 @@ _mm_aesdec256kl_u8(__m128i* __odata, __m128i __idata, const void *__h) {
|
|
|
354
354
|
/// HandleKeyType (Handle[383:0]) != HANDLE_KEY_TYPE_AES128 )
|
|
355
355
|
/// IF (IllegalHandle)
|
|
356
356
|
/// ZF := 1
|
|
357
|
+
/// FOR i := 0 to 7
|
|
358
|
+
/// __odata[i] := 0
|
|
359
|
+
/// ENDFOR
|
|
357
360
|
/// ELSE
|
|
358
361
|
/// (UnwrappedKey, Authentic) := UnwrapKeyAndAuthenticate384 (Handle[383:0], IWKey)
|
|
359
362
|
/// IF Authentic == 0
|
|
360
363
|
/// ZF := 1
|
|
364
|
+
/// FOR i := 0 to 7
|
|
365
|
+
/// __odata[i] := 0
|
|
366
|
+
/// ENDFOR
|
|
361
367
|
/// ELSE
|
|
362
368
|
/// FOR i := 0 to 7
|
|
363
369
|
/// __odata[i] := AES128Encrypt (__idata[i], UnwrappedKey)
|
|
@@ -394,10 +400,16 @@ _mm_aesencwide128kl_u8(__m128i __odata[8], const __m128i __idata[8], const void*
|
|
|
394
400
|
/// HandleKeyType (Handle[511:0]) != HANDLE_KEY_TYPE_AES512 )
|
|
395
401
|
/// IF (IllegalHandle)
|
|
396
402
|
/// ZF := 1
|
|
403
|
+
/// FOR i := 0 to 7
|
|
404
|
+
/// __odata[i] := 0
|
|
405
|
+
/// ENDFOR
|
|
397
406
|
/// ELSE
|
|
398
407
|
/// (UnwrappedKey, Authentic) := UnwrapKeyAndAuthenticate512 (Handle[511:0], IWKey)
|
|
399
408
|
/// IF Authentic == 0
|
|
400
409
|
/// ZF := 1
|
|
410
|
+
/// FOR i := 0 to 7
|
|
411
|
+
/// __odata[i] := 0
|
|
412
|
+
/// ENDFOR
|
|
401
413
|
/// ELSE
|
|
402
414
|
/// FOR i := 0 to 7
|
|
403
415
|
/// __odata[i] := AES256Encrypt (__idata[i], UnwrappedKey)
|
|
@@ -434,10 +446,16 @@ _mm_aesencwide256kl_u8(__m128i __odata[8], const __m128i __idata[8], const void*
|
|
|
434
446
|
/// HandleKeyType (Handle) != HANDLE_KEY_TYPE_AES128 )
|
|
435
447
|
/// IF (IllegalHandle)
|
|
436
448
|
/// ZF := 1
|
|
449
|
+
/// FOR i := 0 to 7
|
|
450
|
+
/// __odata[i] := 0
|
|
451
|
+
/// ENDFOR
|
|
437
452
|
/// ELSE
|
|
438
453
|
/// (UnwrappedKey, Authentic) := UnwrapKeyAndAuthenticate384 (Handle[383:0], IWKey)
|
|
439
454
|
/// IF Authentic == 0
|
|
440
455
|
/// ZF := 1
|
|
456
|
+
/// FOR i := 0 to 7
|
|
457
|
+
/// __odata[i] := 0
|
|
458
|
+
/// ENDFOR
|
|
441
459
|
/// ELSE
|
|
442
460
|
/// FOR i := 0 to 7
|
|
443
461
|
/// __odata[i] := AES128Decrypt (__idata[i], UnwrappedKey)
|
|
@@ -474,10 +492,16 @@ _mm_aesdecwide128kl_u8(__m128i __odata[8], const __m128i __idata[8], const void*
|
|
|
474
492
|
/// HandleKeyType (Handle) != HANDLE_KEY_TYPE_AES512 )
|
|
475
493
|
/// If (IllegalHandle)
|
|
476
494
|
/// ZF := 1
|
|
495
|
+
/// FOR i := 0 to 7
|
|
496
|
+
/// __odata[i] := 0
|
|
497
|
+
/// ENDFOR
|
|
477
498
|
/// ELSE
|
|
478
499
|
/// (UnwrappedKey, Authentic) := UnwrapKeyAndAuthenticate512 (Handle[511:0], IWKey)
|
|
479
500
|
/// IF Authentic == 0
|
|
480
501
|
/// ZF := 1
|
|
502
|
+
/// FOR i := 0 to 7
|
|
503
|
+
/// __odata[i] := 0
|
|
504
|
+
/// ENDFOR
|
|
481
505
|
/// ELSE
|
|
482
506
|
/// FOR i := 0 to 7
|
|
483
507
|
/// __odata[i] := AES256Decrypt (__idata[i], UnwrappedKey)
|
|
@@ -62,6 +62,26 @@
|
|
|
62
62
|
|
|
63
63
|
#define CHAR_BIT __CHAR_BIT__
|
|
64
64
|
|
|
65
|
+
/* C2x 5.2.4.2.1 */
|
|
66
|
+
/* FIXME: This is using the placeholder dates Clang produces for these macros
|
|
67
|
+
in C2x mode; switch to the correct values once they've been published. */
|
|
68
|
+
#if __STDC_VERSION__ >= 202000L
|
|
69
|
+
#define BOOL_WIDTH __BOOL_WIDTH__
|
|
70
|
+
#define CHAR_WIDTH CHAR_BIT
|
|
71
|
+
#define SCHAR_WIDTH CHAR_BIT
|
|
72
|
+
#define UCHAR_WIDTH CHAR_BIT
|
|
73
|
+
#define USHRT_WIDTH __SHRT_WIDTH__
|
|
74
|
+
#define SHRT_WIDTH __SHRT_WIDTH__
|
|
75
|
+
#define UINT_WIDTH __INT_WIDTH__
|
|
76
|
+
#define INT_WIDTH __INT_WIDTH__
|
|
77
|
+
#define ULONG_WIDTH __LONG_WIDTH__
|
|
78
|
+
#define LONG_WIDTH __LONG_WIDTH__
|
|
79
|
+
#define ULLONG_WIDTH __LLONG_WIDTH__
|
|
80
|
+
#define LLONG_WIDTH __LLONG_WIDTH__
|
|
81
|
+
|
|
82
|
+
#define BITINT_MAXWIDTH __BITINT_MAXWIDTH__
|
|
83
|
+
#endif
|
|
84
|
+
|
|
65
85
|
#ifdef __CHAR_UNSIGNED__ /* -funsigned-char */
|
|
66
86
|
#define CHAR_MIN 0
|
|
67
87
|
#define CHAR_MAX UCHAR_MAX
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
#ifndef __MMINTRIN_H
|
|
11
11
|
#define __MMINTRIN_H
|
|
12
12
|
|
|
13
|
+
#if !defined(__i386__) && !defined(__x86_64__)
|
|
14
|
+
#error "This header is only meant to be used on x86 and x64 architecture"
|
|
15
|
+
#endif
|
|
16
|
+
|
|
13
17
|
typedef long long __m64 __attribute__((__vector_size__(8), __aligned__(8)));
|
|
14
18
|
|
|
15
19
|
typedef long long __v1di __attribute__((__vector_size__(8)));
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
#ifndef __NMMINTRIN_H
|
|
11
11
|
#define __NMMINTRIN_H
|
|
12
12
|
|
|
13
|
+
#if !defined(__i386__) && !defined(__x86_64__)
|
|
14
|
+
#error "This header is only meant to be used on x86 and x64 architecture"
|
|
15
|
+
#endif
|
|
16
|
+
|
|
13
17
|
/* To match expectations of gcc we put the sse4.2 definitions into smmintrin.h,
|
|
14
18
|
just include it now then. */
|
|
15
19
|
#include <smmintrin.h>
|