@cpp-linter/clang-tidy-win32-x64 14.0.0 → 16.0.3
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/{14.0.0 → 16}/include/__clang_cuda_intrinsics.h +7 -7
- package/lib/clang/{14.0.0 → 16}/include/__clang_cuda_texture_intrinsics.h +2 -0
- package/lib/clang/{14.0.0 → 16}/include/__clang_hip_libdevice_declares.h +5 -0
- package/lib/clang/{14.0.0 → 16}/include/__clang_hip_math.h +10 -13
- package/lib/clang/{14.0.0 → 16}/include/__clang_hip_runtime_wrapper.h +1 -0
- package/lib/clang/16/include/__clang_hip_stdlib.h +43 -0
- package/lib/clang/{14.0.0 → 16}/include/__wmmintrin_pclmul.h +10 -10
- package/lib/clang/{14.0.0 → 16}/include/altivec.h +501 -262
- package/lib/clang/16/include/amxfp16intrin.h +58 -0
- package/lib/clang/{14.0.0 → 16}/include/amxintrin.h +32 -2
- package/lib/clang/{14.0.0 → 16}/include/arm_acle.h +76 -75
- package/lib/clang/{14.0.0 → 16}/include/arm_fp16.h +90 -90
- package/lib/clang/{14.0.0 → 16}/include/arm_neon.h +28468 -28638
- package/lib/clang/{14.0.0 → 16}/include/arm_neon_sve_bridge.h +0 -2
- package/lib/clang/{14.0.0 → 16}/include/arm_sve.h +7848 -7996
- package/lib/clang/{14.0.0 → 16}/include/avx2intrin.h +8 -8
- package/lib/clang/{14.0.0 → 16}/include/avx512bf16intrin.h +18 -15
- package/lib/clang/{14.0.0 → 16}/include/avx512bwintrin.h +12 -12
- package/lib/clang/{14.0.0 → 16}/include/avx512fintrin.h +78 -75
- package/lib/clang/{14.0.0 → 16}/include/avx512fp16intrin.h +6 -9
- package/lib/clang/{14.0.0 → 16}/include/avx512ifmavlintrin.h +13 -27
- package/lib/clang/{14.0.0 → 16}/include/avx512vlbf16intrin.h +31 -38
- package/lib/clang/{14.0.0 → 16}/include/avx512vlbwintrin.h +360 -8
- package/lib/clang/{14.0.0 → 16}/include/avx512vlfp16intrin.h +3 -0
- package/lib/clang/{14.0.0 → 16}/include/avx512vlintrin.h +81 -95
- package/lib/clang/{14.0.0 → 16}/include/avx512vlvnniintrin.h +16 -16
- package/lib/clang/16/include/avxifmaintrin.h +177 -0
- package/lib/clang/{14.0.0 → 16}/include/avxintrin.h +77 -32
- package/lib/clang/16/include/avxneconvertintrin.h +484 -0
- package/lib/clang/16/include/avxvnniint8intrin.h +471 -0
- package/lib/clang/{14.0.0 → 16}/include/avxvnniintrin.h +16 -16
- package/lib/clang/{14.0.0 → 16}/include/bmiintrin.h +6 -2
- package/lib/clang/{14.0.0 → 16}/include/cetintrin.h +12 -6
- package/lib/clang/16/include/cmpccxaddintrin.h +70 -0
- package/lib/clang/{14.0.0 → 16}/include/cpuid.h +12 -1
- package/lib/clang/16/include/cuda_wrappers/cmath +90 -0
- package/lib/clang/{14.0.0 → 16}/include/emmintrin.h +559 -769
- package/lib/clang/{14.0.0 → 16}/include/f16cintrin.h +3 -3
- package/lib/clang/{14.0.0 → 16}/include/float.h +17 -10
- package/lib/clang/{14.0.0 → 16}/include/gfniintrin.h +7 -5
- package/lib/clang/16/include/hlsl/hlsl_basic_types.h +67 -0
- package/lib/clang/16/include/hlsl/hlsl_intrinsics.h +223 -0
- package/lib/clang/16/include/hlsl.h +15 -0
- package/lib/clang/{14.0.0 → 16}/include/hresetintrin.h +2 -2
- package/lib/clang/{14.0.0 → 16}/include/ia32intrin.h +11 -11
- package/lib/clang/{14.0.0 → 16}/include/immintrin.h +56 -24
- package/lib/clang/{14.0.0 → 16}/include/intrin.h +12 -21
- package/lib/clang/{14.0.0 → 16}/include/keylockerintrin.h +22 -22
- package/lib/clang/16/include/larchintrin.h +234 -0
- package/lib/clang/{14.0.0 → 16}/include/limits.h +3 -2
- package/lib/clang/{14.0.0 → 16}/include/mm_malloc.h +3 -3
- package/lib/clang/{14.0.0 → 16}/include/opencl-c-base.h +29 -0
- package/lib/clang/{14.0.0 → 16}/include/opencl-c.h +6904 -7100
- package/lib/clang/{14.0.0 → 16}/include/pmmintrin.h +1 -1
- package/lib/clang/16/include/ppc_wrappers/bmi2intrin.h +134 -0
- package/lib/clang/16/include/ppc_wrappers/bmiintrin.h +165 -0
- package/lib/clang/16/include/ppc_wrappers/emmintrin.h +2268 -0
- package/lib/clang/16/include/ppc_wrappers/immintrin.h +27 -0
- package/lib/clang/{14.0.0 → 16}/include/ppc_wrappers/mm_malloc.h +12 -17
- package/lib/clang/{14.0.0 → 16}/include/ppc_wrappers/mmintrin.h +389 -387
- package/lib/clang/16/include/ppc_wrappers/pmmintrin.h +145 -0
- package/lib/clang/16/include/ppc_wrappers/smmintrin.h +663 -0
- package/lib/clang/16/include/ppc_wrappers/tmmintrin.h +453 -0
- package/lib/clang/{14.0.0/include/stdnoreturn.h → 16/include/ppc_wrappers/x86gprintrin.h} +7 -6
- package/lib/clang/16/include/ppc_wrappers/x86intrin.h +28 -0
- package/lib/clang/16/include/ppc_wrappers/xmmintrin.h +1827 -0
- package/lib/clang/16/include/prfchiintrin.h +61 -0
- package/lib/clang/16/include/raointintrin.h +203 -0
- package/lib/clang/16/include/rdpruintrin.h +57 -0
- package/lib/clang/{14.0.0 → 16}/include/rdseedintrin.h +3 -3
- package/lib/clang/16/include/riscv_vector.h +211 -0
- package/lib/clang/{14.0.0 → 16}/include/rtmintrin.h +1 -1
- package/lib/clang/{14.0.0 → 16}/include/smmintrin.h +236 -259
- package/lib/clang/{14.0.0 → 16}/include/stdarg.h +23 -7
- package/lib/clang/{14.0.0 → 16}/include/stdatomic.h +7 -7
- package/lib/clang/{14.0.0 → 16}/include/stdbool.h +10 -7
- package/lib/clang/{14.0.0 → 16}/include/stddef.h +9 -2
- package/lib/clang/{14.0.0 → 16}/include/stdint.h +158 -40
- package/lib/clang/16/include/stdnoreturn.h +29 -0
- package/lib/clang/{14.0.0 → 16}/include/uintrintrin.h +8 -8
- package/lib/clang/{14.0.0 → 16}/include/unwind.h +10 -6
- package/lib/clang/16/include/velintrin.h +71 -0
- package/lib/clang/16/include/velintrin_approx.h +120 -0
- package/lib/clang/16/include/velintrin_gen.h +1257 -0
- package/lib/clang/{14.0.0 → 16}/include/wasm_simd128.h +2 -2
- package/lib/clang/16/include/x86gprintrin.h +65 -0
- package/lib/clang/{14.0.0 → 16}/include/x86intrin.h +4 -0
- package/lib/clang/{14.0.0 → 16}/include/xmmintrin.h +10 -5
- package/package.json +6 -6
- package/lib/clang/14.0.0/include/ppc_wrappers/emmintrin.h +0 -2325
- package/lib/clang/14.0.0/include/ppc_wrappers/pmmintrin.h +0 -151
- package/lib/clang/14.0.0/include/ppc_wrappers/smmintrin.h +0 -110
- package/lib/clang/14.0.0/include/ppc_wrappers/tmmintrin.h +0 -496
- package/lib/clang/14.0.0/include/ppc_wrappers/xmmintrin.h +0 -1844
- package/lib/clang/14.0.0/include/riscv_vector.h +0 -95423
- package/lib/clang/14.0.0/include/x86gprintrin.h +0 -35
- /package/lib/clang/{14.0.0 → 16}/include/__clang_cuda_builtin_vars.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/__clang_cuda_cmath.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/__clang_cuda_complex_builtins.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/__clang_cuda_device_functions.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/__clang_cuda_libdevice_declares.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/__clang_cuda_math.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/__clang_cuda_math_forward_declares.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/__clang_cuda_runtime_wrapper.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/__clang_hip_cmath.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/__stddef_max_align_t.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/__wmmintrin_aes.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/adxintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/ammintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/arm64intr.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/arm_bf16.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/arm_cde.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/arm_cmse.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/arm_mve.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/armintr.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/avx512bitalgintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/avx512cdintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/avx512dqintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/avx512erintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/avx512ifmaintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/avx512pfintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/avx512vbmi2intrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/avx512vbmiintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/avx512vbmivlintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/avx512vlbitalgintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/avx512vlcdintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/avx512vldqintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/avx512vlvbmi2intrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/avx512vlvp2intersectintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/avx512vnniintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/avx512vp2intersectintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/avx512vpopcntdqintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/avx512vpopcntdqvlintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/bmi2intrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/builtins.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/cet.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/cldemoteintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/clflushoptintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/clwbintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/clzerointrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/crc32intrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/cuda_wrappers/algorithm +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/cuda_wrappers/complex +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/cuda_wrappers/new +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/enqcmdintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/fma4intrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/fmaintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/fxsrintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/hexagon_circ_brev_intrinsics.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/hexagon_protos.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/hexagon_types.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/htmintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/htmxlintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/hvx_hexagon_protos.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/inttypes.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/invpcidintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/iso646.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/lwpintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/lzcntintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/mm3dnow.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/mmintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/module.modulemap +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/movdirintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/msa.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/mwaitxintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/nmmintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/openmp_wrappers/__clang_openmp_device_functions.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/openmp_wrappers/cmath +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/openmp_wrappers/complex +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/openmp_wrappers/complex.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/openmp_wrappers/complex_cmath.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/openmp_wrappers/math.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/openmp_wrappers/new +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/pconfigintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/pkuintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/popcntintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/prfchwintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/ptwriteintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/s390intrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/serializeintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/sgxintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/shaintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/stdalign.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/tbmintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/tgmath.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/tmmintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/tsxldtrkintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/vadefs.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/vaesintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/varargs.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/vecintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/vpclmulqdqintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/waitpkgintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/wbnoinvdintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/wmmintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/xopintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/xsavecintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/xsaveintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/xsaveoptintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/xsavesintrin.h +0 -0
- /package/lib/clang/{14.0.0 → 16}/include/xtestintrin.h +0 -0
|
@@ -189,6 +189,11 @@
|
|
|
189
189
|
#include <avx512ifmavlintrin.h>
|
|
190
190
|
#endif
|
|
191
191
|
|
|
192
|
+
#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \
|
|
193
|
+
defined(__AVXIFMA__)
|
|
194
|
+
#include <avxifmaintrin.h>
|
|
195
|
+
#endif
|
|
196
|
+
|
|
192
197
|
#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \
|
|
193
198
|
defined(__AVX512VBMI__)
|
|
194
199
|
#include <avx512vbmiintrin.h>
|
|
@@ -214,17 +219,13 @@
|
|
|
214
219
|
#include <avx512pfintrin.h>
|
|
215
220
|
#endif
|
|
216
221
|
|
|
217
|
-
|
|
218
|
-
|
|
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__)
|
|
222
|
+
#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \
|
|
223
|
+
defined(__AVX512FP16__)
|
|
224
224
|
#include <avx512fp16intrin.h>
|
|
225
225
|
#endif
|
|
226
226
|
|
|
227
|
-
#if defined(
|
|
227
|
+
#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \
|
|
228
|
+
(defined(__AVX512VL__) && defined(__AVX512FP16__))
|
|
228
229
|
#include <avx512vlfp16intrin.h>
|
|
229
230
|
#endif
|
|
230
231
|
|
|
@@ -258,6 +259,16 @@
|
|
|
258
259
|
#include <gfniintrin.h>
|
|
259
260
|
#endif
|
|
260
261
|
|
|
262
|
+
#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \
|
|
263
|
+
defined(__AVXVNNIINT8__)
|
|
264
|
+
#include <avxvnniint8intrin.h>
|
|
265
|
+
#endif
|
|
266
|
+
|
|
267
|
+
#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \
|
|
268
|
+
defined(__AVXNECONVERT__)
|
|
269
|
+
#include <avxneconvertintrin.h>
|
|
270
|
+
#endif
|
|
271
|
+
|
|
261
272
|
#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \
|
|
262
273
|
defined(__RDPID__)
|
|
263
274
|
/// Returns the value of the IA32_TSC_AUX MSR (0xc0000103).
|
|
@@ -276,20 +287,37 @@ _rdpid_u32(void) {
|
|
|
276
287
|
static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("rdrnd")))
|
|
277
288
|
_rdrand16_step(unsigned short *__p)
|
|
278
289
|
{
|
|
279
|
-
return __builtin_ia32_rdrand16_step(__p);
|
|
290
|
+
return (int)__builtin_ia32_rdrand16_step(__p);
|
|
280
291
|
}
|
|
281
292
|
|
|
282
293
|
static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("rdrnd")))
|
|
283
294
|
_rdrand32_step(unsigned int *__p)
|
|
284
295
|
{
|
|
285
|
-
return __builtin_ia32_rdrand32_step(__p);
|
|
296
|
+
return (int)__builtin_ia32_rdrand32_step(__p);
|
|
286
297
|
}
|
|
287
298
|
|
|
288
299
|
#ifdef __x86_64__
|
|
289
300
|
static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("rdrnd")))
|
|
290
301
|
_rdrand64_step(unsigned long long *__p)
|
|
291
302
|
{
|
|
292
|
-
return __builtin_ia32_rdrand64_step(__p);
|
|
303
|
+
return (int)__builtin_ia32_rdrand64_step(__p);
|
|
304
|
+
}
|
|
305
|
+
#else
|
|
306
|
+
// We need to emulate the functionality of 64-bit rdrand with 2 32-bit
|
|
307
|
+
// rdrand instructions.
|
|
308
|
+
static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("rdrnd")))
|
|
309
|
+
_rdrand64_step(unsigned long long *__p)
|
|
310
|
+
{
|
|
311
|
+
unsigned int __lo, __hi;
|
|
312
|
+
unsigned int __res_lo = __builtin_ia32_rdrand32_step(&__lo);
|
|
313
|
+
unsigned int __res_hi = __builtin_ia32_rdrand32_step(&__hi);
|
|
314
|
+
if (__res_lo && __res_hi) {
|
|
315
|
+
*__p = ((unsigned long long)__hi << 32) | (unsigned long long)__lo;
|
|
316
|
+
return 1;
|
|
317
|
+
} else {
|
|
318
|
+
*__p = 0;
|
|
319
|
+
return 0;
|
|
320
|
+
}
|
|
293
321
|
}
|
|
294
322
|
#endif
|
|
295
323
|
#endif /* __RDRND__ */
|
|
@@ -360,50 +388,50 @@ _writegsbase_u64(unsigned long long __V)
|
|
|
360
388
|
static __inline__ short __attribute__((__always_inline__, __nodebug__, __target__("movbe")))
|
|
361
389
|
_loadbe_i16(void const * __P) {
|
|
362
390
|
struct __loadu_i16 {
|
|
363
|
-
short __v;
|
|
391
|
+
unsigned short __v;
|
|
364
392
|
} __attribute__((__packed__, __may_alias__));
|
|
365
|
-
return __builtin_bswap16(((const struct __loadu_i16*)__P)->__v);
|
|
393
|
+
return (short)__builtin_bswap16(((const struct __loadu_i16*)__P)->__v);
|
|
366
394
|
}
|
|
367
395
|
|
|
368
396
|
static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("movbe")))
|
|
369
397
|
_storebe_i16(void * __P, short __D) {
|
|
370
398
|
struct __storeu_i16 {
|
|
371
|
-
short __v;
|
|
399
|
+
unsigned short __v;
|
|
372
400
|
} __attribute__((__packed__, __may_alias__));
|
|
373
|
-
((struct __storeu_i16*)__P)->__v = __builtin_bswap16(__D);
|
|
401
|
+
((struct __storeu_i16*)__P)->__v = __builtin_bswap16((unsigned short)__D);
|
|
374
402
|
}
|
|
375
403
|
|
|
376
404
|
static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("movbe")))
|
|
377
405
|
_loadbe_i32(void const * __P) {
|
|
378
406
|
struct __loadu_i32 {
|
|
379
|
-
int __v;
|
|
407
|
+
unsigned int __v;
|
|
380
408
|
} __attribute__((__packed__, __may_alias__));
|
|
381
|
-
return __builtin_bswap32(((const struct __loadu_i32*)__P)->__v);
|
|
409
|
+
return (int)__builtin_bswap32(((const struct __loadu_i32*)__P)->__v);
|
|
382
410
|
}
|
|
383
411
|
|
|
384
412
|
static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("movbe")))
|
|
385
413
|
_storebe_i32(void * __P, int __D) {
|
|
386
414
|
struct __storeu_i32 {
|
|
387
|
-
int __v;
|
|
415
|
+
unsigned int __v;
|
|
388
416
|
} __attribute__((__packed__, __may_alias__));
|
|
389
|
-
((struct __storeu_i32*)__P)->__v = __builtin_bswap32(__D);
|
|
417
|
+
((struct __storeu_i32*)__P)->__v = __builtin_bswap32((unsigned int)__D);
|
|
390
418
|
}
|
|
391
419
|
|
|
392
420
|
#ifdef __x86_64__
|
|
393
421
|
static __inline__ long long __attribute__((__always_inline__, __nodebug__, __target__("movbe")))
|
|
394
422
|
_loadbe_i64(void const * __P) {
|
|
395
423
|
struct __loadu_i64 {
|
|
396
|
-
long long __v;
|
|
424
|
+
unsigned long long __v;
|
|
397
425
|
} __attribute__((__packed__, __may_alias__));
|
|
398
|
-
return __builtin_bswap64(((const struct __loadu_i64*)__P)->__v);
|
|
426
|
+
return (long long)__builtin_bswap64(((const struct __loadu_i64*)__P)->__v);
|
|
399
427
|
}
|
|
400
428
|
|
|
401
429
|
static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("movbe")))
|
|
402
430
|
_storebe_i64(void * __P, long long __D) {
|
|
403
431
|
struct __storeu_i64 {
|
|
404
|
-
long long __v;
|
|
432
|
+
unsigned long long __v;
|
|
405
433
|
} __attribute__((__packed__, __may_alias__));
|
|
406
|
-
((struct __storeu_i64*)__P)->__v = __builtin_bswap64(__D);
|
|
434
|
+
((struct __storeu_i64*)__P)->__v = __builtin_bswap64((unsigned long long)__D);
|
|
407
435
|
}
|
|
408
436
|
#endif
|
|
409
437
|
#endif /* __MOVBE */
|
|
@@ -495,6 +523,10 @@ _storebe_i64(void * __P, long long __D) {
|
|
|
495
523
|
defined(__INVPCID__)
|
|
496
524
|
#include <invpcidintrin.h>
|
|
497
525
|
#endif
|
|
526
|
+
#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \
|
|
527
|
+
defined(__AMX_FP16__)
|
|
528
|
+
#include <amxfp16intrin.h>
|
|
529
|
+
#endif
|
|
498
530
|
|
|
499
531
|
#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \
|
|
500
532
|
defined(__KL__) || defined(__WIDEKL__)
|
|
@@ -502,7 +534,7 @@ _storebe_i64(void * __P, long long __D) {
|
|
|
502
534
|
#endif
|
|
503
535
|
|
|
504
536
|
#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \
|
|
505
|
-
defined(
|
|
537
|
+
defined(__AMX_TILE__) || defined(__AMX_INT8__) || defined(__AMX_BF16__)
|
|
506
538
|
#include <amxintrin.h>
|
|
507
539
|
#endif
|
|
508
540
|
|
|
@@ -534,27 +534,6 @@ static __inline__ void __DEFAULT_FN_ATTRS __stosq(unsigned __int64 *__dst,
|
|
|
534
534
|
|* Misc
|
|
535
535
|
\*----------------------------------------------------------------------------*/
|
|
536
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
|
|
551
|
-
static __inline__ void __DEFAULT_FN_ATTRS __cpuid(int __info[4], int __level) {
|
|
552
|
-
__cpuid_count(__level, 0, __info[0], __info[1], __info[2], __info[3]);
|
|
553
|
-
}
|
|
554
|
-
static __inline__ void __DEFAULT_FN_ATTRS __cpuidex(int __info[4], int __level,
|
|
555
|
-
int __ecx) {
|
|
556
|
-
__cpuid_count(__level, __ecx, __info[0], __info[1], __info[2], __info[3]);
|
|
557
|
-
}
|
|
558
537
|
static __inline__ void __DEFAULT_FN_ATTRS __halt(void) {
|
|
559
538
|
__asm__ volatile("hlt");
|
|
560
539
|
}
|
|
@@ -581,6 +560,18 @@ unsigned __int64 __cdecl _byteswap_uint64(unsigned __int64 val);
|
|
|
581
560
|
|
|
582
561
|
__int64 __mulh(__int64 __a, __int64 __b);
|
|
583
562
|
unsigned __int64 __umulh(unsigned __int64 __a, unsigned __int64 __b);
|
|
563
|
+
|
|
564
|
+
void __break(int);
|
|
565
|
+
|
|
566
|
+
void __writex18byte(unsigned long offset, unsigned char data);
|
|
567
|
+
void __writex18word(unsigned long offset, unsigned short data);
|
|
568
|
+
void __writex18dword(unsigned long offset, unsigned long data);
|
|
569
|
+
void __writex18qword(unsigned long offset, unsigned __int64 data);
|
|
570
|
+
|
|
571
|
+
unsigned char __readx18byte(unsigned long offset);
|
|
572
|
+
unsigned short __readx18word(unsigned long offset);
|
|
573
|
+
unsigned long __readx18dword(unsigned long offset);
|
|
574
|
+
unsigned __int64 __readx18qword(unsigned long offset);
|
|
584
575
|
#endif
|
|
585
576
|
|
|
586
577
|
/*----------------------------------------------------------------------------*\
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
///
|
|
47
47
|
/// This intrinsic corresponds to the <c> LOADIWKEY </c> instructions.
|
|
48
48
|
///
|
|
49
|
-
/// \operation
|
|
49
|
+
/// \code{.operation}
|
|
50
50
|
/// IF CPL > 0 // LOADKWKEY only allowed at ring 0 (supervisor mode)
|
|
51
51
|
/// GP (0)
|
|
52
52
|
/// FI
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
/// AF := 0
|
|
92
92
|
/// PF := 0
|
|
93
93
|
/// CF := 0
|
|
94
|
-
/// \
|
|
94
|
+
/// \endcode
|
|
95
95
|
static __inline__ void __DEFAULT_FN_ATTRS
|
|
96
96
|
_mm_loadiwkey (unsigned int __ctl, __m128i __intkey,
|
|
97
97
|
__m128i __enkey_lo, __m128i __enkey_hi) {
|
|
@@ -106,7 +106,7 @@ _mm_loadiwkey (unsigned int __ctl, __m128i __intkey,
|
|
|
106
106
|
///
|
|
107
107
|
/// This intrinsic corresponds to the <c> ENCODEKEY128 </c> instructions.
|
|
108
108
|
///
|
|
109
|
-
/// \operation
|
|
109
|
+
/// \code{.operation}
|
|
110
110
|
/// InputKey[127:0] := __key[127:0]
|
|
111
111
|
/// KeyMetadata[2:0] := __htype[2:0]
|
|
112
112
|
/// KeyMetadata[23:3] := 0 // Reserved for future usage
|
|
@@ -126,7 +126,7 @@ _mm_loadiwkey (unsigned int __ctl, __m128i __intkey,
|
|
|
126
126
|
/// AF := 0
|
|
127
127
|
/// PF := 0
|
|
128
128
|
/// CF := 0
|
|
129
|
-
/// \
|
|
129
|
+
/// \endcode
|
|
130
130
|
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
|
131
131
|
_mm_encodekey128_u32(unsigned int __htype, __m128i __key, void *__h) {
|
|
132
132
|
return __builtin_ia32_encodekey128_u32(__htype, (__v2di)__key, __h);
|
|
@@ -141,7 +141,7 @@ _mm_encodekey128_u32(unsigned int __htype, __m128i __key, void *__h) {
|
|
|
141
141
|
///
|
|
142
142
|
/// This intrinsic corresponds to the <c> ENCODEKEY256 </c> instructions.
|
|
143
143
|
///
|
|
144
|
-
/// \operation
|
|
144
|
+
/// \code{.operation}
|
|
145
145
|
/// InputKey[127:0] := __key_lo[127:0]
|
|
146
146
|
/// InputKey[255:128] := __key_hi[255:128]
|
|
147
147
|
/// KeyMetadata[2:0] := __htype[2:0]
|
|
@@ -163,7 +163,7 @@ _mm_encodekey128_u32(unsigned int __htype, __m128i __key, void *__h) {
|
|
|
163
163
|
/// AF := 0
|
|
164
164
|
/// PF := 0
|
|
165
165
|
/// CF := 0
|
|
166
|
-
/// \
|
|
166
|
+
/// \endcode
|
|
167
167
|
static __inline__ unsigned int __DEFAULT_FN_ATTRS
|
|
168
168
|
_mm_encodekey256_u32(unsigned int __htype, __m128i __key_lo, __m128i __key_hi,
|
|
169
169
|
void *__h) {
|
|
@@ -179,7 +179,7 @@ _mm_encodekey256_u32(unsigned int __htype, __m128i __key_lo, __m128i __key_hi,
|
|
|
179
179
|
///
|
|
180
180
|
/// This intrinsic corresponds to the <c> AESENC128KL </c> instructions.
|
|
181
181
|
///
|
|
182
|
-
/// \operation
|
|
182
|
+
/// \code{.operation}
|
|
183
183
|
/// Handle[383:0] := MEM[__h+383:__h] // Load is not guaranteed to be atomic.
|
|
184
184
|
/// IllegalHandle := ( HandleReservedBitSet (Handle[383:0]) ||
|
|
185
185
|
/// (Handle[127:0] AND (CPL > 0)) ||
|
|
@@ -202,7 +202,7 @@ _mm_encodekey256_u32(unsigned int __htype, __m128i __key_lo, __m128i __key_hi,
|
|
|
202
202
|
/// AF := 0
|
|
203
203
|
/// PF := 0
|
|
204
204
|
/// CF := 0
|
|
205
|
-
/// \
|
|
205
|
+
/// \endcode
|
|
206
206
|
static __inline__ unsigned char __DEFAULT_FN_ATTRS
|
|
207
207
|
_mm_aesenc128kl_u8(__m128i* __odata, __m128i __idata, const void *__h) {
|
|
208
208
|
return __builtin_ia32_aesenc128kl_u8((__v2di *)__odata, (__v2di)__idata, __h);
|
|
@@ -216,7 +216,7 @@ _mm_aesenc128kl_u8(__m128i* __odata, __m128i __idata, const void *__h) {
|
|
|
216
216
|
///
|
|
217
217
|
/// This intrinsic corresponds to the <c> AESENC256KL </c> instructions.
|
|
218
218
|
///
|
|
219
|
-
/// \operation
|
|
219
|
+
/// \code{.operation}
|
|
220
220
|
/// Handle[511:0] := MEM[__h+511:__h] // Load is not guaranteed to be atomic.
|
|
221
221
|
/// IllegalHandle := ( HandleReservedBitSet (Handle[511:0]) ||
|
|
222
222
|
/// (Handle[127:0] AND (CPL > 0)) ||
|
|
@@ -241,7 +241,7 @@ _mm_aesenc128kl_u8(__m128i* __odata, __m128i __idata, const void *__h) {
|
|
|
241
241
|
/// AF := 0
|
|
242
242
|
/// PF := 0
|
|
243
243
|
/// CF := 0
|
|
244
|
-
/// \
|
|
244
|
+
/// \endcode
|
|
245
245
|
static __inline__ unsigned char __DEFAULT_FN_ATTRS
|
|
246
246
|
_mm_aesenc256kl_u8(__m128i* __odata, __m128i __idata, const void *__h) {
|
|
247
247
|
return __builtin_ia32_aesenc256kl_u8((__v2di *)__odata, (__v2di)__idata, __h);
|
|
@@ -255,7 +255,7 @@ _mm_aesenc256kl_u8(__m128i* __odata, __m128i __idata, const void *__h) {
|
|
|
255
255
|
///
|
|
256
256
|
/// This intrinsic corresponds to the <c> AESDEC128KL </c> instructions.
|
|
257
257
|
///
|
|
258
|
-
/// \operation
|
|
258
|
+
/// \code{.operation}
|
|
259
259
|
/// Handle[383:0] := MEM[__h+383:__h] // Load is not guaranteed to be atomic.
|
|
260
260
|
/// IllegalHandle := (HandleReservedBitSet (Handle[383:0]) ||
|
|
261
261
|
/// (Handle[127:0] AND (CPL > 0)) ||
|
|
@@ -280,7 +280,7 @@ _mm_aesenc256kl_u8(__m128i* __odata, __m128i __idata, const void *__h) {
|
|
|
280
280
|
/// AF := 0
|
|
281
281
|
/// PF := 0
|
|
282
282
|
/// CF := 0
|
|
283
|
-
/// \
|
|
283
|
+
/// \endcode
|
|
284
284
|
static __inline__ unsigned char __DEFAULT_FN_ATTRS
|
|
285
285
|
_mm_aesdec128kl_u8(__m128i* __odata, __m128i __idata, const void *__h) {
|
|
286
286
|
return __builtin_ia32_aesdec128kl_u8((__v2di *)__odata, (__v2di)__idata, __h);
|
|
@@ -294,7 +294,7 @@ _mm_aesdec128kl_u8(__m128i* __odata, __m128i __idata, const void *__h) {
|
|
|
294
294
|
///
|
|
295
295
|
/// This intrinsic corresponds to the <c> AESDEC256KL </c> instructions.
|
|
296
296
|
///
|
|
297
|
-
/// \operation
|
|
297
|
+
/// \code{.operation}
|
|
298
298
|
/// Handle[511:0] := MEM[__h+511:__h]
|
|
299
299
|
/// IllegalHandle := (HandleReservedBitSet (Handle[511:0]) ||
|
|
300
300
|
/// (Handle[127:0] AND (CPL > 0)) ||
|
|
@@ -319,7 +319,7 @@ _mm_aesdec128kl_u8(__m128i* __odata, __m128i __idata, const void *__h) {
|
|
|
319
319
|
/// AF := 0
|
|
320
320
|
/// PF := 0
|
|
321
321
|
/// CF := 0
|
|
322
|
-
/// \
|
|
322
|
+
/// \endcode
|
|
323
323
|
static __inline__ unsigned char __DEFAULT_FN_ATTRS
|
|
324
324
|
_mm_aesdec256kl_u8(__m128i* __odata, __m128i __idata, const void *__h) {
|
|
325
325
|
return __builtin_ia32_aesdec256kl_u8((__v2di *)__odata, (__v2di)__idata, __h);
|
|
@@ -346,7 +346,7 @@ _mm_aesdec256kl_u8(__m128i* __odata, __m128i __idata, const void *__h) {
|
|
|
346
346
|
///
|
|
347
347
|
/// This intrinsic corresponds to the <c> AESENCWIDE128KL </c> instructions.
|
|
348
348
|
///
|
|
349
|
-
/// \operation
|
|
349
|
+
/// \code{.operation}
|
|
350
350
|
/// Handle := MEM[__h+383:__h]
|
|
351
351
|
/// IllegalHandle := ( HandleReservedBitSet (Handle[383:0]) ||
|
|
352
352
|
/// (Handle[127:0] AND (CPL > 0)) ||
|
|
@@ -377,7 +377,7 @@ _mm_aesdec256kl_u8(__m128i* __odata, __m128i __idata, const void *__h) {
|
|
|
377
377
|
/// AF := 0
|
|
378
378
|
/// PF := 0
|
|
379
379
|
/// CF := 0
|
|
380
|
-
/// \
|
|
380
|
+
/// \endcode
|
|
381
381
|
static __inline__ unsigned char __DEFAULT_FN_ATTRS
|
|
382
382
|
_mm_aesencwide128kl_u8(__m128i __odata[8], const __m128i __idata[8], const void* __h) {
|
|
383
383
|
return __builtin_ia32_aesencwide128kl_u8((__v2di *)__odata,
|
|
@@ -392,7 +392,7 @@ _mm_aesencwide128kl_u8(__m128i __odata[8], const __m128i __idata[8], const void*
|
|
|
392
392
|
///
|
|
393
393
|
/// This intrinsic corresponds to the <c> AESENCWIDE256KL </c> instructions.
|
|
394
394
|
///
|
|
395
|
-
/// \operation
|
|
395
|
+
/// \code{.operation}
|
|
396
396
|
/// Handle[511:0] := MEM[__h+511:__h]
|
|
397
397
|
/// IllegalHandle := ( HandleReservedBitSet (Handle[511:0]) ||
|
|
398
398
|
/// (Handle[127:0] AND (CPL > 0)) ||
|
|
@@ -423,7 +423,7 @@ _mm_aesencwide128kl_u8(__m128i __odata[8], const __m128i __idata[8], const void*
|
|
|
423
423
|
/// AF := 0
|
|
424
424
|
/// PF := 0
|
|
425
425
|
/// CF := 0
|
|
426
|
-
/// \
|
|
426
|
+
/// \endcode
|
|
427
427
|
static __inline__ unsigned char __DEFAULT_FN_ATTRS
|
|
428
428
|
_mm_aesencwide256kl_u8(__m128i __odata[8], const __m128i __idata[8], const void* __h) {
|
|
429
429
|
return __builtin_ia32_aesencwide256kl_u8((__v2di *)__odata,
|
|
@@ -438,7 +438,7 @@ _mm_aesencwide256kl_u8(__m128i __odata[8], const __m128i __idata[8], const void*
|
|
|
438
438
|
///
|
|
439
439
|
/// This intrinsic corresponds to the <c> AESDECWIDE128KL </c> instructions.
|
|
440
440
|
///
|
|
441
|
-
/// \operation
|
|
441
|
+
/// \code{.operation}
|
|
442
442
|
/// Handle[383:0] := MEM[__h+383:__h]
|
|
443
443
|
/// IllegalHandle := ( HandleReservedBitSet (Handle[383:0]) ||
|
|
444
444
|
/// (Handle[127:0] AND (CPL > 0)) ||
|
|
@@ -469,7 +469,7 @@ _mm_aesencwide256kl_u8(__m128i __odata[8], const __m128i __idata[8], const void*
|
|
|
469
469
|
/// AF := 0
|
|
470
470
|
/// PF := 0
|
|
471
471
|
/// CF := 0
|
|
472
|
-
/// \
|
|
472
|
+
/// \endcode
|
|
473
473
|
static __inline__ unsigned char __DEFAULT_FN_ATTRS
|
|
474
474
|
_mm_aesdecwide128kl_u8(__m128i __odata[8], const __m128i __idata[8], const void* __h) {
|
|
475
475
|
return __builtin_ia32_aesdecwide128kl_u8((__v2di *)__odata,
|
|
@@ -484,7 +484,7 @@ _mm_aesdecwide128kl_u8(__m128i __odata[8], const __m128i __idata[8], const void*
|
|
|
484
484
|
///
|
|
485
485
|
/// This intrinsic corresponds to the <c> AESDECWIDE256KL </c> instructions.
|
|
486
486
|
///
|
|
487
|
-
/// \operation
|
|
487
|
+
/// \code{.operation}
|
|
488
488
|
/// Handle[511:0] := MEM[__h+511:__h]
|
|
489
489
|
/// IllegalHandle = ( HandleReservedBitSet (Handle[511:0]) ||
|
|
490
490
|
/// (Handle[127:0] AND (CPL > 0)) ||
|
|
@@ -515,7 +515,7 @@ _mm_aesdecwide128kl_u8(__m128i __odata[8], const __m128i __idata[8], const void*
|
|
|
515
515
|
/// AF := 0
|
|
516
516
|
/// PF := 0
|
|
517
517
|
/// CF := 0
|
|
518
|
-
/// \
|
|
518
|
+
/// \endcode
|
|
519
519
|
static __inline__ unsigned char __DEFAULT_FN_ATTRS
|
|
520
520
|
_mm_aesdecwide256kl_u8(__m128i __odata[8], const __m128i __idata[8], const void* __h) {
|
|
521
521
|
return __builtin_ia32_aesdecwide256kl_u8((__v2di *)__odata,
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
/*===------------ larchintrin.h - LoongArch 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
|
+
|
|
10
|
+
#ifndef _LOONGARCH_BASE_INTRIN_H
|
|
11
|
+
#define _LOONGARCH_BASE_INTRIN_H
|
|
12
|
+
|
|
13
|
+
#ifdef __cplusplus
|
|
14
|
+
extern "C" {
|
|
15
|
+
#endif
|
|
16
|
+
|
|
17
|
+
typedef struct rdtime {
|
|
18
|
+
unsigned int value;
|
|
19
|
+
unsigned int timeid;
|
|
20
|
+
} __rdtime_t;
|
|
21
|
+
|
|
22
|
+
#if __loongarch_grlen == 64
|
|
23
|
+
typedef struct drdtime {
|
|
24
|
+
unsigned long dvalue;
|
|
25
|
+
unsigned long dtimeid;
|
|
26
|
+
} __drdtime_t;
|
|
27
|
+
|
|
28
|
+
extern __inline __drdtime_t
|
|
29
|
+
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
|
|
30
|
+
__rdtime_d(void) {
|
|
31
|
+
__drdtime_t __drdtime;
|
|
32
|
+
__asm__ volatile(
|
|
33
|
+
"rdtime.d %[val], %[tid]\n\t"
|
|
34
|
+
: [val] "=&r"(__drdtime.dvalue), [tid] "=&r"(__drdtime.dtimeid));
|
|
35
|
+
return __drdtime;
|
|
36
|
+
}
|
|
37
|
+
#endif
|
|
38
|
+
|
|
39
|
+
extern __inline __rdtime_t
|
|
40
|
+
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
|
|
41
|
+
__rdtimeh_w(void) {
|
|
42
|
+
__rdtime_t __rdtime;
|
|
43
|
+
__asm__ volatile("rdtimeh.w %[val], %[tid]\n\t"
|
|
44
|
+
: [val] "=&r"(__rdtime.value), [tid] "=&r"(__rdtime.timeid));
|
|
45
|
+
return __rdtime;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
extern __inline __rdtime_t
|
|
49
|
+
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
|
|
50
|
+
__rdtimel_w(void) {
|
|
51
|
+
__rdtime_t __rdtime;
|
|
52
|
+
__asm__ volatile("rdtimel.w %[val], %[tid]\n\t"
|
|
53
|
+
: [val] "=&r"(__rdtime.value), [tid] "=&r"(__rdtime.timeid));
|
|
54
|
+
return __rdtime;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
#if __loongarch_grlen == 64
|
|
58
|
+
extern __inline int
|
|
59
|
+
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
|
|
60
|
+
__crc_w_b_w(char _1, int _2) {
|
|
61
|
+
return (int)__builtin_loongarch_crc_w_b_w((char)_1, (int)_2);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
extern __inline int
|
|
65
|
+
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
|
|
66
|
+
__crc_w_h_w(short _1, int _2) {
|
|
67
|
+
return (int)__builtin_loongarch_crc_w_h_w((short)_1, (int)_2);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
extern __inline int
|
|
71
|
+
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
|
|
72
|
+
__crc_w_w_w(int _1, int _2) {
|
|
73
|
+
return (int)__builtin_loongarch_crc_w_w_w((int)_1, (int)_2);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
extern __inline int
|
|
77
|
+
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
|
|
78
|
+
__crc_w_d_w(long int _1, int _2) {
|
|
79
|
+
return (int)__builtin_loongarch_crc_w_d_w((long int)_1, (int)_2);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
extern __inline int
|
|
83
|
+
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
|
|
84
|
+
__crcc_w_b_w(char _1, int _2) {
|
|
85
|
+
return (int)__builtin_loongarch_crcc_w_b_w((char)_1, (int)_2);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
extern __inline int
|
|
89
|
+
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
|
|
90
|
+
__crcc_w_h_w(short _1, int _2) {
|
|
91
|
+
return (int)__builtin_loongarch_crcc_w_h_w((short)_1, (int)_2);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
extern __inline int
|
|
95
|
+
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
|
|
96
|
+
__crcc_w_w_w(int _1, int _2) {
|
|
97
|
+
return (int)__builtin_loongarch_crcc_w_w_w((int)_1, (int)_2);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
extern __inline int
|
|
101
|
+
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
|
|
102
|
+
__crcc_w_d_w(long int _1, int _2) {
|
|
103
|
+
return (int)__builtin_loongarch_crcc_w_d_w((long int)_1, (int)_2);
|
|
104
|
+
}
|
|
105
|
+
#endif
|
|
106
|
+
|
|
107
|
+
#define __break(/*ui15*/ _1) __builtin_loongarch_break((_1))
|
|
108
|
+
|
|
109
|
+
#if __loongarch_grlen == 32
|
|
110
|
+
#define __cacop_w(/*uimm5*/ _1, /*unsigned int*/ _2, /*simm12*/ _3) \
|
|
111
|
+
((void)__builtin_loongarch_cacop_w((_1), (unsigned int)(_2), (_3)))
|
|
112
|
+
#endif
|
|
113
|
+
|
|
114
|
+
#if __loongarch_grlen == 64
|
|
115
|
+
#define __cacop_d(/*uimm5*/ _1, /*unsigned long int*/ _2, /*simm12*/ _3) \
|
|
116
|
+
((void)__builtin_loongarch_cacop_d((_1), (unsigned long int)(_2), (_3)))
|
|
117
|
+
#endif
|
|
118
|
+
|
|
119
|
+
#define __dbar(/*ui15*/ _1) __builtin_loongarch_dbar((_1))
|
|
120
|
+
|
|
121
|
+
#define __ibar(/*ui15*/ _1) __builtin_loongarch_ibar((_1))
|
|
122
|
+
|
|
123
|
+
#define __movfcsr2gr(/*ui5*/ _1) __builtin_loongarch_movfcsr2gr((_1));
|
|
124
|
+
|
|
125
|
+
#define __movgr2fcsr(/*ui5*/ _1, _2) \
|
|
126
|
+
__builtin_loongarch_movgr2fcsr((_1), (unsigned int)_2);
|
|
127
|
+
|
|
128
|
+
#define __syscall(/*ui15*/ _1) __builtin_loongarch_syscall((_1))
|
|
129
|
+
|
|
130
|
+
#define __csrrd_w(/*ui14*/ _1) ((unsigned int)__builtin_loongarch_csrrd_w((_1)))
|
|
131
|
+
|
|
132
|
+
#define __csrwr_w(/*unsigned int*/ _1, /*ui14*/ _2) \
|
|
133
|
+
((unsigned int)__builtin_loongarch_csrwr_w((unsigned int)(_1), (_2)))
|
|
134
|
+
|
|
135
|
+
#define __csrxchg_w(/*unsigned int*/ _1, /*unsigned int*/ _2, /*ui14*/ _3) \
|
|
136
|
+
((unsigned int)__builtin_loongarch_csrxchg_w((unsigned int)(_1), \
|
|
137
|
+
(unsigned int)(_2), (_3)))
|
|
138
|
+
|
|
139
|
+
#if __loongarch_grlen == 64
|
|
140
|
+
#define __csrrd_d(/*ui14*/ _1) \
|
|
141
|
+
((unsigned long int)__builtin_loongarch_csrrd_d((_1)))
|
|
142
|
+
|
|
143
|
+
#define __csrwr_d(/*unsigned long int*/ _1, /*ui14*/ _2) \
|
|
144
|
+
((unsigned long int)__builtin_loongarch_csrwr_d((unsigned long int)(_1), \
|
|
145
|
+
(_2)))
|
|
146
|
+
|
|
147
|
+
#define __csrxchg_d(/*unsigned long int*/ _1, /*unsigned long int*/ _2, \
|
|
148
|
+
/*ui14*/ _3) \
|
|
149
|
+
((unsigned long int)__builtin_loongarch_csrxchg_d( \
|
|
150
|
+
(unsigned long int)(_1), (unsigned long int)(_2), (_3)))
|
|
151
|
+
#endif
|
|
152
|
+
|
|
153
|
+
extern __inline unsigned char
|
|
154
|
+
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
|
|
155
|
+
__iocsrrd_b(unsigned int _1) {
|
|
156
|
+
return (unsigned char)__builtin_loongarch_iocsrrd_b((unsigned int)_1);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
extern __inline unsigned char
|
|
160
|
+
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
|
|
161
|
+
__iocsrrd_h(unsigned int _1) {
|
|
162
|
+
return (unsigned short)__builtin_loongarch_iocsrrd_h((unsigned int)_1);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
extern __inline unsigned int
|
|
166
|
+
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
|
|
167
|
+
__iocsrrd_w(unsigned int _1) {
|
|
168
|
+
return (unsigned int)__builtin_loongarch_iocsrrd_w((unsigned int)_1);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
#if __loongarch_grlen == 64
|
|
172
|
+
extern __inline unsigned long int
|
|
173
|
+
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
|
|
174
|
+
__iocsrrd_d(unsigned int _1) {
|
|
175
|
+
return (unsigned long int)__builtin_loongarch_iocsrrd_d((unsigned int)_1);
|
|
176
|
+
}
|
|
177
|
+
#endif
|
|
178
|
+
|
|
179
|
+
extern __inline void
|
|
180
|
+
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
|
|
181
|
+
__iocsrwr_b(unsigned char _1, unsigned int _2) {
|
|
182
|
+
__builtin_loongarch_iocsrwr_b((unsigned char)_1, (unsigned int)_2);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
extern __inline void
|
|
186
|
+
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
|
|
187
|
+
__iocsrwr_h(unsigned short _1, unsigned int _2) {
|
|
188
|
+
__builtin_loongarch_iocsrwr_h((unsigned short)_1, (unsigned int)_2);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
extern __inline void
|
|
192
|
+
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
|
|
193
|
+
__iocsrwr_w(unsigned int _1, unsigned int _2) {
|
|
194
|
+
__builtin_loongarch_iocsrwr_w((unsigned int)_1, (unsigned int)_2);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
extern __inline unsigned int
|
|
198
|
+
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
|
|
199
|
+
__cpucfg(unsigned int _1) {
|
|
200
|
+
return (unsigned int)__builtin_loongarch_cpucfg((unsigned int)_1);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
#if __loongarch_grlen == 64
|
|
204
|
+
extern __inline void
|
|
205
|
+
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
|
|
206
|
+
__iocsrwr_d(unsigned long int _1, unsigned int _2) {
|
|
207
|
+
__builtin_loongarch_iocsrwr_d((unsigned long int)_1, (unsigned int)_2);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
extern __inline void
|
|
211
|
+
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
|
|
212
|
+
__asrtgt_d(long int _1, long int _2) {
|
|
213
|
+
__builtin_loongarch_asrtgt_d((long int)_1, (long int)_2);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
extern __inline void
|
|
217
|
+
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
|
|
218
|
+
__asrtle_d(long int _1, long int _2) {
|
|
219
|
+
__builtin_loongarch_asrtle_d((long int)_1, (long int)_2);
|
|
220
|
+
}
|
|
221
|
+
#endif
|
|
222
|
+
|
|
223
|
+
#if __loongarch_grlen == 64
|
|
224
|
+
#define __lddir_d(/*long int*/ _1, /*ui5*/ _2) \
|
|
225
|
+
((long int)__builtin_loongarch_lddir_d((long int)(_1), (_2)))
|
|
226
|
+
|
|
227
|
+
#define __ldpte_d(/*long int*/ _1, /*ui5*/ _2) \
|
|
228
|
+
((void)__builtin_loongarch_ldpte_d((long int)(_1), (_2)))
|
|
229
|
+
#endif
|
|
230
|
+
|
|
231
|
+
#ifdef __cplusplus
|
|
232
|
+
}
|
|
233
|
+
#endif
|
|
234
|
+
#endif /* _LOONGARCH_BASE_INTRIN_H */
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
/* C2x 5.2.4.2.1 */
|
|
66
66
|
/* FIXME: This is using the placeholder dates Clang produces for these macros
|
|
67
67
|
in C2x mode; switch to the correct values once they've been published. */
|
|
68
|
-
#if __STDC_VERSION__ >= 202000L
|
|
68
|
+
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L
|
|
69
69
|
#define BOOL_WIDTH __BOOL_WIDTH__
|
|
70
70
|
#define CHAR_WIDTH CHAR_BIT
|
|
71
71
|
#define SCHAR_WIDTH CHAR_BIT
|
|
@@ -93,7 +93,8 @@
|
|
|
93
93
|
/* C99 5.2.4.2.1: Added long long.
|
|
94
94
|
C++11 18.3.3.2: same contents as the Standard C Library header <limits.h>.
|
|
95
95
|
*/
|
|
96
|
-
#if __STDC_VERSION__ >= 199901L ||
|
|
96
|
+
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \
|
|
97
|
+
(defined(__cplusplus) && __cplusplus >= 201103L)
|
|
97
98
|
|
|
98
99
|
#undef LLONG_MIN
|
|
99
100
|
#undef LLONG_MAX
|
|
@@ -28,9 +28,9 @@ extern "C" int posix_memalign(void **__memptr, size_t __alignment, size_t __size
|
|
|
28
28
|
|
|
29
29
|
#if !(defined(_WIN32) && defined(_mm_malloc))
|
|
30
30
|
static __inline__ void *__attribute__((__always_inline__, __nodebug__,
|
|
31
|
-
__malloc__)
|
|
32
|
-
|
|
33
|
-
{
|
|
31
|
+
__malloc__, __alloc_size__(1),
|
|
32
|
+
__alloc_align__(2)))
|
|
33
|
+
_mm_malloc(size_t __size, size_t __align) {
|
|
34
34
|
if (__align == 1) {
|
|
35
35
|
return malloc(__size);
|
|
36
36
|
}
|