dsh-remote 0.8.47 → 0.8.49
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/lib/client.js +89 -16
- package/lib/ignore.js +46 -0
- package/lib/index.js +68 -23
- package/lib/remote-shell-child.cjs +305 -0
- package/lib/remote-shell.js +518 -0
- package/lib/search.js +8 -3
- package/package.json +1 -1
- package/node_modules/buildcheck/.eslintrc.js +0 -5
- package/node_modules/buildcheck/.github/workflows/ci.yml +0 -88
- package/node_modules/buildcheck/.github/workflows/lint.yml +0 -27
- package/node_modules/buildcheck/.npmignore +0 -3
- package/node_modules/buildcheck/LICENSE +0 -19
- package/node_modules/buildcheck/README.md +0 -106
- package/node_modules/buildcheck/deps/Find-VisualStudio.cs +0 -250
- package/node_modules/buildcheck/lib/findvs.js +0 -361
- package/node_modules/buildcheck/lib/index.js +0 -738
- package/node_modules/buildcheck/package.json +0 -36
- package/node_modules/buildcheck/test/test.js +0 -8
- package/node_modules/cpu-features/.eslintrc.js +0 -5
- package/node_modules/cpu-features/.github/workflows/ci.yml +0 -74
- package/node_modules/cpu-features/.github/workflows/lint.yml +0 -27
- package/node_modules/cpu-features/LICENSE +0 -19
- package/node_modules/cpu-features/README.md +0 -59
- package/node_modules/cpu-features/binding.gyp +0 -16
- package/node_modules/cpu-features/buildcheck.js +0 -32
- package/node_modules/cpu-features/deps/cpu_features/.clang-format +0 -4
- package/node_modules/cpu-features/deps/cpu_features/.dockerignore +0 -31
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/Dockerfile +0 -5
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/aarch64_linux_cmake.yml +0 -30
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_freebsd_cmake.yml +0 -22
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_linux_bazel.yml +0 -26
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_linux_cmake.yml +0 -31
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_macos_cmake.yml +0 -43
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_windows_cmake.yml +0 -25
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/arm_linux_cmake.yml +0 -31
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/clang_format.yml +0 -24
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/mips_linux_cmake.yml +0 -30
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/power_linux_cmake.yml +0 -29
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/riscv_linux_cmake.yml +0 -28
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/s390x_linux_cmake.yml +0 -27
- package/node_modules/cpu-features/deps/cpu_features/.grenrc.yml +0 -21
- package/node_modules/cpu-features/deps/cpu_features/BUILD.bazel +0 -329
- package/node_modules/cpu-features/deps/cpu_features/CMakeLists.txt +0 -261
- package/node_modules/cpu-features/deps/cpu_features/CONTRIBUTING.md +0 -23
- package/node_modules/cpu-features/deps/cpu_features/LICENSE +0 -230
- package/node_modules/cpu-features/deps/cpu_features/README.md +0 -272
- package/node_modules/cpu-features/deps/cpu_features/WORKSPACE +0 -19
- package/node_modules/cpu-features/deps/cpu_features/bazel/ci/README.md +0 -5
- package/node_modules/cpu-features/deps/cpu_features/bazel/platforms.bzl +0 -11
- package/node_modules/cpu-features/deps/cpu_features/cmake/CpuFeaturesConfig.cmake.in +0 -3
- package/node_modules/cpu-features/deps/cpu_features/cmake/CpuFeaturesNdkCompatConfig.cmake.in +0 -3
- package/node_modules/cpu-features/deps/cpu_features/cmake/README.md +0 -30
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/Makefile +0 -252
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/README.md +0 -40
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/doc/docker.dot +0 -64
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/doc/docker.svg +0 -312
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/doc/generate_image.sh +0 -7
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/docker/amd64/Dockerfile +0 -48
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/docker/toolchain/Dockerfile +0 -34
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/sample/CMakeLists.txt +0 -22
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/sample/main.cpp +0 -11
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/vagrant/freebsd/Vagrantfile +0 -107
- package/node_modules/cpu-features/deps/cpu_features/cmake/googletest.CMakeLists.txt.in +0 -15
- package/node_modules/cpu-features/deps/cpu_features/cpu_features.gyp +0 -105
- package/node_modules/cpu-features/deps/cpu_features/include/cpu_features_cache_info.h +0 -54
- package/node_modules/cpu-features/deps/cpu_features/include/cpu_features_macros.h +0 -384
- package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_aarch64.h +0 -259
- package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_arm.h +0 -121
- package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_mips.h +0 -74
- package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_ppc.h +0 -149
- package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_riscv.h +0 -72
- package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_s390x.h +0 -108
- package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_x86.h +0 -288
- package/node_modules/cpu-features/deps/cpu_features/include/internal/bit_utils.h +0 -40
- package/node_modules/cpu-features/deps/cpu_features/include/internal/cpuid_x86.h +0 -37
- package/node_modules/cpu-features/deps/cpu_features/include/internal/filesystem.h +0 -39
- package/node_modules/cpu-features/deps/cpu_features/include/internal/hwcaps.h +0 -240
- package/node_modules/cpu-features/deps/cpu_features/include/internal/stack_line_reader.h +0 -49
- package/node_modules/cpu-features/deps/cpu_features/include/internal/string_view.h +0 -110
- package/node_modules/cpu-features/deps/cpu_features/include/internal/windows_utils.h +0 -70
- package/node_modules/cpu-features/deps/cpu_features/ndk_compat/CMakeLists.txt +0 -60
- package/node_modules/cpu-features/deps/cpu_features/ndk_compat/README.md +0 -4
- package/node_modules/cpu-features/deps/cpu_features/ndk_compat/cpu-features.c +0 -205
- package/node_modules/cpu-features/deps/cpu_features/ndk_compat/cpu-features.h +0 -320
- package/node_modules/cpu-features/deps/cpu_features/ndk_compat/ndk-compat-test.c +0 -12
- package/node_modules/cpu-features/deps/cpu_features/patches/0001-Add-Apple-Silicon-Support.patch +0 -456
- package/node_modules/cpu-features/deps/cpu_features/scripts/generate_badges.d +0 -165
- package/node_modules/cpu-features/deps/cpu_features/scripts/make_release.sh +0 -75
- package/node_modules/cpu-features/deps/cpu_features/scripts/run_integration.sh +0 -490
- package/node_modules/cpu-features/deps/cpu_features/scripts/test_integration.sh +0 -79
- package/node_modules/cpu-features/deps/cpu_features/src/copy.inl +0 -19
- package/node_modules/cpu-features/deps/cpu_features/src/define_introspection.inl +0 -86
- package/node_modules/cpu-features/deps/cpu_features/src/define_introspection_and_hwcaps.inl +0 -26
- package/node_modules/cpu-features/deps/cpu_features/src/equals.inl +0 -22
- package/node_modules/cpu-features/deps/cpu_features/src/filesystem.c +0 -62
- package/node_modules/cpu-features/deps/cpu_features/src/hwcaps.c +0 -169
- package/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64__base_implementation.inl +0 -88
- package/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64_linux_or_android.c +0 -79
- package/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64_macos_or_iphone.c +0 -82
- package/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64_windows.c +0 -138
- package/node_modules/cpu-features/deps/cpu_features/src/impl_arm_linux_or_android.c +0 -212
- package/node_modules/cpu-features/deps/cpu_features/src/impl_mips_linux_or_android.c +0 -93
- package/node_modules/cpu-features/deps/cpu_features/src/impl_ppc_linux.c +0 -163
- package/node_modules/cpu-features/deps/cpu_features/src/impl_riscv_linux.c +0 -111
- package/node_modules/cpu-features/deps/cpu_features/src/impl_s390x_linux.c +0 -120
- package/node_modules/cpu-features/deps/cpu_features/src/impl_x86__base_implementation.inl +0 -2055
- package/node_modules/cpu-features/deps/cpu_features/src/impl_x86_freebsd.c +0 -68
- package/node_modules/cpu-features/deps/cpu_features/src/impl_x86_linux_or_android.c +0 -58
- package/node_modules/cpu-features/deps/cpu_features/src/impl_x86_macos.c +0 -57
- package/node_modules/cpu-features/deps/cpu_features/src/impl_x86_windows.c +0 -58
- package/node_modules/cpu-features/deps/cpu_features/src/stack_line_reader.c +0 -132
- package/node_modules/cpu-features/deps/cpu_features/src/string_view.c +0 -192
- package/node_modules/cpu-features/deps/cpu_features/src/utils/list_cpu_features.c +0 -461
- package/node_modules/cpu-features/deps/cpu_features/test/CMakeLists.txt +0 -114
- package/node_modules/cpu-features/deps/cpu_features/test/bit_utils_test.cc +0 -53
- package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_aarch64_test.cc +0 -396
- package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_arm_test.cc +0 -384
- package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_mips_test.cc +0 -176
- package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_ppc_test.cc +0 -131
- package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_riscv_test.cc +0 -180
- package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_s390x_test.cc +0 -82
- package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_x86_test.cc +0 -1729
- package/node_modules/cpu-features/deps/cpu_features/test/filesystem_for_testing.cc +0 -103
- package/node_modules/cpu-features/deps/cpu_features/test/filesystem_for_testing.h +0 -61
- package/node_modules/cpu-features/deps/cpu_features/test/hwcaps_for_testing.cc +0 -52
- package/node_modules/cpu-features/deps/cpu_features/test/hwcaps_for_testing.h +0 -31
- package/node_modules/cpu-features/deps/cpu_features/test/stack_line_reader_test.cc +0 -132
- package/node_modules/cpu-features/deps/cpu_features/test/string_view_test.cc +0 -202
- package/node_modules/cpu-features/lib/index.js +0 -5
- package/node_modules/cpu-features/package.json +0 -40
- package/node_modules/cpu-features/src/binding.cc +0 -151
- package/node_modules/cpu-features/test/test.js +0 -12
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
// Copyright 2022 IBM
|
|
2
|
-
//
|
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
// you may not use this file except in compliance with the License.
|
|
5
|
-
// You may obtain a copy of the License at
|
|
6
|
-
//
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
//
|
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
// See the License for the specific language governing permissions and
|
|
13
|
-
// limitations under the License.
|
|
14
|
-
|
|
15
|
-
#ifndef CPU_FEATURES_INCLUDE_CPUINFO_S390X_H_
|
|
16
|
-
#define CPU_FEATURES_INCLUDE_CPUINFO_S390X_H_
|
|
17
|
-
|
|
18
|
-
#include "cpu_features_cache_info.h"
|
|
19
|
-
#include "cpu_features_macros.h"
|
|
20
|
-
|
|
21
|
-
CPU_FEATURES_START_CPP_NAMESPACE
|
|
22
|
-
|
|
23
|
-
typedef struct {
|
|
24
|
-
int esan3: 1; // instructions named N3, "backported" to esa-mode
|
|
25
|
-
int zarch: 1; // z/Architecture mode active
|
|
26
|
-
int stfle: 1; // store-facility-list-extended
|
|
27
|
-
int msa: 1; // message-security assist
|
|
28
|
-
int ldisp: 1; // long-displacement
|
|
29
|
-
int eimm: 1; // extended-immediate
|
|
30
|
-
int dfp: 1; // decimal floating point & perform floating point operation
|
|
31
|
-
int edat: 1; // huge page support
|
|
32
|
-
int etf3eh: 1; // extended-translation facility 3 enhancement
|
|
33
|
-
int highgprs: 1; // 64-bit register support for 31-bit processes
|
|
34
|
-
int te: 1; // transactional execution
|
|
35
|
-
int vx: 1; // vector extension facility
|
|
36
|
-
int vxd: 1; // vector-packed-decimal facility
|
|
37
|
-
int vxe: 1; // vector-enhancement facility 1
|
|
38
|
-
int gs: 1; // guarded-storage facility
|
|
39
|
-
int vxe2: 1; // vector-enhancements facility 2
|
|
40
|
-
int vxp: 1; // vector-packed-decimal-enhancement facility
|
|
41
|
-
int sort: 1; // enhanced-sort facility
|
|
42
|
-
int dflt: 1; // deflate-conversion facility
|
|
43
|
-
int vxp2: 1; // vector-packed-decimal-enhancement facility 2
|
|
44
|
-
int nnpa: 1; // neural network processing assist facility
|
|
45
|
-
int pcimio: 1; // PCI mio facility
|
|
46
|
-
int sie: 1; // virtualization support
|
|
47
|
-
|
|
48
|
-
// Make sure to update S390XFeaturesEnum below if you add a field here.
|
|
49
|
-
} S390XFeatures;
|
|
50
|
-
|
|
51
|
-
typedef struct {
|
|
52
|
-
S390XFeatures features;
|
|
53
|
-
} S390XInfo;
|
|
54
|
-
|
|
55
|
-
S390XInfo GetS390XInfo(void);
|
|
56
|
-
|
|
57
|
-
typedef struct {
|
|
58
|
-
char platform[64]; // 0 terminated string
|
|
59
|
-
} S390XPlatformTypeStrings;
|
|
60
|
-
|
|
61
|
-
typedef struct {
|
|
62
|
-
int num_processors; // -1 if N/A
|
|
63
|
-
S390XPlatformTypeStrings type;
|
|
64
|
-
} S390XPlatformStrings;
|
|
65
|
-
|
|
66
|
-
S390XPlatformStrings GetS390XPlatformStrings(void);
|
|
67
|
-
|
|
68
|
-
////////////////////////////////////////////////////////////////////////////////
|
|
69
|
-
// Introspection functions
|
|
70
|
-
|
|
71
|
-
typedef enum {
|
|
72
|
-
S390_ESAN3,
|
|
73
|
-
S390_ZARCH,
|
|
74
|
-
S390_STFLE,
|
|
75
|
-
S390_MSA,
|
|
76
|
-
S390_LDISP,
|
|
77
|
-
S390_EIMM,
|
|
78
|
-
S390_DFP,
|
|
79
|
-
S390_EDAT,
|
|
80
|
-
S390_ETF3EH,
|
|
81
|
-
S390_HIGHGPRS,
|
|
82
|
-
S390_TE,
|
|
83
|
-
S390_VX,
|
|
84
|
-
S390_VXD,
|
|
85
|
-
S390_VXE,
|
|
86
|
-
S390_GS,
|
|
87
|
-
S390_VXE2,
|
|
88
|
-
S390_VXP,
|
|
89
|
-
S390_SORT,
|
|
90
|
-
S390_DFLT,
|
|
91
|
-
S390_VXP2,
|
|
92
|
-
S390_NNPA,
|
|
93
|
-
S390_PCIMIO,
|
|
94
|
-
S390_SIE,
|
|
95
|
-
S390X_LAST_,
|
|
96
|
-
} S390XFeaturesEnum;
|
|
97
|
-
|
|
98
|
-
int GetS390XFeaturesEnumValue(const S390XFeatures* features, S390XFeaturesEnum value);
|
|
99
|
-
|
|
100
|
-
const char* GetS390XFeaturesEnumName(S390XFeaturesEnum);
|
|
101
|
-
|
|
102
|
-
CPU_FEATURES_END_CPP_NAMESPACE
|
|
103
|
-
|
|
104
|
-
#if !defined(CPU_FEATURES_ARCH_S390X)
|
|
105
|
-
#error "Including cpuinfo_s390x.h from a non-s390x target."
|
|
106
|
-
#endif
|
|
107
|
-
|
|
108
|
-
#endif // CPU_FEATURES_INCLUDE_CPUINFO_S390X_H_
|
|
@@ -1,288 +0,0 @@
|
|
|
1
|
-
// Copyright 2017 Google LLC
|
|
2
|
-
// Copyright 2020 Intel Corporation
|
|
3
|
-
//
|
|
4
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
// you may not use this file except in compliance with the License.
|
|
6
|
-
// You may obtain a copy of the License at
|
|
7
|
-
//
|
|
8
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
//
|
|
10
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
// See the License for the specific language governing permissions and
|
|
14
|
-
// limitations under the License.
|
|
15
|
-
|
|
16
|
-
#ifndef CPU_FEATURES_INCLUDE_CPUINFO_X86_H_
|
|
17
|
-
#define CPU_FEATURES_INCLUDE_CPUINFO_X86_H_
|
|
18
|
-
|
|
19
|
-
#include "cpu_features_cache_info.h"
|
|
20
|
-
#include "cpu_features_macros.h"
|
|
21
|
-
|
|
22
|
-
CPU_FEATURES_START_CPP_NAMESPACE
|
|
23
|
-
|
|
24
|
-
// CPUID Vendors
|
|
25
|
-
#define CPU_FEATURES_VENDOR_GENUINE_INTEL "GenuineIntel"
|
|
26
|
-
#define CPU_FEATURES_VENDOR_AUTHENTIC_AMD "AuthenticAMD"
|
|
27
|
-
#define CPU_FEATURES_VENDOR_HYGON_GENUINE "HygonGenuine"
|
|
28
|
-
#define CPU_FEATURES_VENDOR_CENTAUR_HAULS "CentaurHauls"
|
|
29
|
-
#define CPU_FEATURES_VENDOR_SHANGHAI " Shanghai "
|
|
30
|
-
|
|
31
|
-
// See https://en.wikipedia.org/wiki/CPUID for a list of x86 cpu features.
|
|
32
|
-
// The field names are based on the short name provided in the wikipedia tables.
|
|
33
|
-
typedef struct {
|
|
34
|
-
int fpu : 1;
|
|
35
|
-
int tsc : 1;
|
|
36
|
-
int cx8 : 1;
|
|
37
|
-
int clfsh : 1;
|
|
38
|
-
int mmx : 1;
|
|
39
|
-
int aes : 1;
|
|
40
|
-
int erms : 1;
|
|
41
|
-
int f16c : 1;
|
|
42
|
-
int fma4 : 1;
|
|
43
|
-
int fma3 : 1;
|
|
44
|
-
int vaes : 1;
|
|
45
|
-
int vpclmulqdq : 1;
|
|
46
|
-
int bmi1 : 1;
|
|
47
|
-
int hle : 1;
|
|
48
|
-
int bmi2 : 1;
|
|
49
|
-
int rtm : 1;
|
|
50
|
-
int rdseed : 1;
|
|
51
|
-
int clflushopt : 1;
|
|
52
|
-
int clwb : 1;
|
|
53
|
-
|
|
54
|
-
int sse : 1;
|
|
55
|
-
int sse2 : 1;
|
|
56
|
-
int sse3 : 1;
|
|
57
|
-
int ssse3 : 1;
|
|
58
|
-
int sse4_1 : 1;
|
|
59
|
-
int sse4_2 : 1;
|
|
60
|
-
int sse4a : 1;
|
|
61
|
-
|
|
62
|
-
int avx : 1;
|
|
63
|
-
int avx_vnni : 1;
|
|
64
|
-
int avx2 : 1;
|
|
65
|
-
|
|
66
|
-
int avx512f : 1;
|
|
67
|
-
int avx512cd : 1;
|
|
68
|
-
int avx512er : 1;
|
|
69
|
-
int avx512pf : 1;
|
|
70
|
-
int avx512bw : 1;
|
|
71
|
-
int avx512dq : 1;
|
|
72
|
-
int avx512vl : 1;
|
|
73
|
-
int avx512ifma : 1;
|
|
74
|
-
int avx512vbmi : 1;
|
|
75
|
-
int avx512vbmi2 : 1;
|
|
76
|
-
int avx512vnni : 1;
|
|
77
|
-
int avx512bitalg : 1;
|
|
78
|
-
int avx512vpopcntdq : 1;
|
|
79
|
-
int avx512_4vnniw : 1;
|
|
80
|
-
int avx512_4vbmi2 : 1; // Note: this is an alias to avx512_4fmaps.
|
|
81
|
-
int avx512_second_fma : 1;
|
|
82
|
-
int avx512_4fmaps : 1;
|
|
83
|
-
int avx512_bf16 : 1;
|
|
84
|
-
int avx512_vp2intersect : 1;
|
|
85
|
-
int avx512_fp16 : 1;
|
|
86
|
-
int amx_bf16 : 1;
|
|
87
|
-
int amx_tile : 1;
|
|
88
|
-
int amx_int8 : 1;
|
|
89
|
-
|
|
90
|
-
int pclmulqdq : 1;
|
|
91
|
-
int smx : 1;
|
|
92
|
-
int sgx : 1;
|
|
93
|
-
int cx16 : 1; // aka. CMPXCHG16B
|
|
94
|
-
int sha : 1;
|
|
95
|
-
int popcnt : 1;
|
|
96
|
-
int movbe : 1;
|
|
97
|
-
int rdrnd : 1;
|
|
98
|
-
|
|
99
|
-
int dca : 1;
|
|
100
|
-
int ss : 1;
|
|
101
|
-
int adx : 1;
|
|
102
|
-
int lzcnt : 1; // Note: this flag is called ABM for AMD, LZCNT for Intel.
|
|
103
|
-
int gfni : 1;
|
|
104
|
-
int movdiri : 1;
|
|
105
|
-
int movdir64b : 1;
|
|
106
|
-
int fs_rep_mov : 1; // Fast short REP MOV
|
|
107
|
-
int fz_rep_movsb : 1; // Fast zero-length REP MOVSB
|
|
108
|
-
int fs_rep_stosb : 1; // Fast short REP STOSB
|
|
109
|
-
int fs_rep_cmpsb_scasb : 1; // Fast short REP CMPSB/SCASB
|
|
110
|
-
// Make sure to update X86FeaturesEnum below if you add a field here.
|
|
111
|
-
} X86Features;
|
|
112
|
-
|
|
113
|
-
typedef struct {
|
|
114
|
-
X86Features features;
|
|
115
|
-
int family;
|
|
116
|
-
int model;
|
|
117
|
-
int stepping;
|
|
118
|
-
char vendor[13]; // 0 terminated string
|
|
119
|
-
char brand_string[49]; // 0 terminated string
|
|
120
|
-
} X86Info;
|
|
121
|
-
|
|
122
|
-
// Calls cpuid and returns an initialized X86info.
|
|
123
|
-
X86Info GetX86Info(void);
|
|
124
|
-
|
|
125
|
-
// Returns cache hierarchy informations.
|
|
126
|
-
// Can call cpuid multiple times.
|
|
127
|
-
CacheInfo GetX86CacheInfo(void);
|
|
128
|
-
|
|
129
|
-
typedef enum {
|
|
130
|
-
X86_UNKNOWN,
|
|
131
|
-
ZHAOXIN_ZHANGJIANG, // ZhangJiang
|
|
132
|
-
ZHAOXIN_WUDAOKOU, // WuDaoKou
|
|
133
|
-
ZHAOXIN_LUJIAZUI, // LuJiaZui
|
|
134
|
-
ZHAOXIN_YONGFENG, // YongFeng
|
|
135
|
-
INTEL_80486, // 80486
|
|
136
|
-
INTEL_P5, // P5
|
|
137
|
-
INTEL_LAKEMONT, // LAKEMONT
|
|
138
|
-
INTEL_CORE, // CORE
|
|
139
|
-
INTEL_PNR, // PENRYN
|
|
140
|
-
INTEL_NHM, // NEHALEM
|
|
141
|
-
INTEL_ATOM_BNL, // BONNELL
|
|
142
|
-
INTEL_WSM, // WESTMERE
|
|
143
|
-
INTEL_SNB, // SANDYBRIDGE
|
|
144
|
-
INTEL_IVB, // IVYBRIDGE
|
|
145
|
-
INTEL_ATOM_SMT, // SILVERMONT
|
|
146
|
-
INTEL_HSW, // HASWELL
|
|
147
|
-
INTEL_BDW, // BROADWELL
|
|
148
|
-
INTEL_SKL, // SKYLAKE
|
|
149
|
-
INTEL_CCL, // CASCADELAKE
|
|
150
|
-
INTEL_ATOM_GMT, // GOLDMONT
|
|
151
|
-
INTEL_ATOM_GMT_PLUS, // GOLDMONT+
|
|
152
|
-
INTEL_ATOM_TMT, // TREMONT
|
|
153
|
-
INTEL_KBL, // KABY LAKE
|
|
154
|
-
INTEL_CFL, // COFFEE LAKE
|
|
155
|
-
INTEL_WHL, // WHISKEY LAKE
|
|
156
|
-
INTEL_CML, // COMET LAKE
|
|
157
|
-
INTEL_CNL, // CANNON LAKE
|
|
158
|
-
INTEL_ICL, // ICE LAKE
|
|
159
|
-
INTEL_TGL, // TIGER LAKE
|
|
160
|
-
INTEL_SPR, // SAPPHIRE RAPIDS
|
|
161
|
-
INTEL_ADL, // ALDER LAKE
|
|
162
|
-
INTEL_RCL, // ROCKET LAKE
|
|
163
|
-
INTEL_RPL, // RAPTOR LAKE
|
|
164
|
-
INTEL_KNIGHTS_M, // KNIGHTS MILL
|
|
165
|
-
INTEL_KNIGHTS_L, // KNIGHTS LANDING
|
|
166
|
-
INTEL_KNIGHTS_F, // KNIGHTS FERRY
|
|
167
|
-
INTEL_KNIGHTS_C, // KNIGHTS CORNER
|
|
168
|
-
INTEL_NETBURST, // NETBURST
|
|
169
|
-
AMD_HAMMER, // K8 HAMMER
|
|
170
|
-
AMD_K10, // K10
|
|
171
|
-
AMD_K11, // K11
|
|
172
|
-
AMD_K12, // K12 LLANO
|
|
173
|
-
AMD_BOBCAT, // K14 BOBCAT
|
|
174
|
-
AMD_PILEDRIVER, // K15 PILEDRIVER
|
|
175
|
-
AMD_STREAMROLLER, // K15 STREAMROLLER
|
|
176
|
-
AMD_EXCAVATOR, // K15 EXCAVATOR
|
|
177
|
-
AMD_BULLDOZER, // K15 BULLDOZER
|
|
178
|
-
AMD_JAGUAR, // K16 JAGUAR
|
|
179
|
-
AMD_PUMA, // K16 PUMA
|
|
180
|
-
AMD_ZEN, // K17 ZEN
|
|
181
|
-
AMD_ZEN_PLUS, // K17 ZEN+
|
|
182
|
-
AMD_ZEN2, // K17 ZEN 2
|
|
183
|
-
AMD_ZEN3, // K19 ZEN 3
|
|
184
|
-
AMD_ZEN4, // K19 ZEN 4
|
|
185
|
-
X86_MICROARCHITECTURE_LAST_,
|
|
186
|
-
} X86Microarchitecture;
|
|
187
|
-
|
|
188
|
-
// Returns the underlying microarchitecture by looking at X86Info's vendor,
|
|
189
|
-
// family and model.
|
|
190
|
-
X86Microarchitecture GetX86Microarchitecture(const X86Info* info);
|
|
191
|
-
|
|
192
|
-
// Calls cpuid and fills the brand_string.
|
|
193
|
-
// - brand_string *must* be of size 49 (beware of array decaying).
|
|
194
|
-
// - brand_string will be zero terminated.
|
|
195
|
-
CPU_FEATURES_DEPRECATED("brand_string is now embedded in X86Info by default")
|
|
196
|
-
void FillX86BrandString(char brand_string[49]);
|
|
197
|
-
|
|
198
|
-
////////////////////////////////////////////////////////////////////////////////
|
|
199
|
-
// Introspection functions
|
|
200
|
-
|
|
201
|
-
typedef enum {
|
|
202
|
-
X86_FPU,
|
|
203
|
-
X86_TSC,
|
|
204
|
-
X86_CX8,
|
|
205
|
-
X86_CLFSH,
|
|
206
|
-
X86_MMX,
|
|
207
|
-
X86_AES,
|
|
208
|
-
X86_ERMS,
|
|
209
|
-
X86_F16C,
|
|
210
|
-
X86_FMA4,
|
|
211
|
-
X86_FMA3,
|
|
212
|
-
X86_VAES,
|
|
213
|
-
X86_VPCLMULQDQ,
|
|
214
|
-
X86_BMI1,
|
|
215
|
-
X86_HLE,
|
|
216
|
-
X86_BMI2,
|
|
217
|
-
X86_RTM,
|
|
218
|
-
X86_RDSEED,
|
|
219
|
-
X86_CLFLUSHOPT,
|
|
220
|
-
X86_CLWB,
|
|
221
|
-
X86_SSE,
|
|
222
|
-
X86_SSE2,
|
|
223
|
-
X86_SSE3,
|
|
224
|
-
X86_SSSE3,
|
|
225
|
-
X86_SSE4_1,
|
|
226
|
-
X86_SSE4_2,
|
|
227
|
-
X86_SSE4A,
|
|
228
|
-
X86_AVX,
|
|
229
|
-
X86_AVX_VNNI,
|
|
230
|
-
X86_AVX2,
|
|
231
|
-
X86_AVX512F,
|
|
232
|
-
X86_AVX512CD,
|
|
233
|
-
X86_AVX512ER,
|
|
234
|
-
X86_AVX512PF,
|
|
235
|
-
X86_AVX512BW,
|
|
236
|
-
X86_AVX512DQ,
|
|
237
|
-
X86_AVX512VL,
|
|
238
|
-
X86_AVX512IFMA,
|
|
239
|
-
X86_AVX512VBMI,
|
|
240
|
-
X86_AVX512VBMI2,
|
|
241
|
-
X86_AVX512VNNI,
|
|
242
|
-
X86_AVX512BITALG,
|
|
243
|
-
X86_AVX512VPOPCNTDQ,
|
|
244
|
-
X86_AVX512_4VNNIW,
|
|
245
|
-
X86_AVX512_4VBMI2, // Note: this is an alias to X86_AVX512_4FMAPS.
|
|
246
|
-
X86_AVX512_SECOND_FMA,
|
|
247
|
-
X86_AVX512_4FMAPS,
|
|
248
|
-
X86_AVX512_BF16,
|
|
249
|
-
X86_AVX512_VP2INTERSECT,
|
|
250
|
-
X86_AVX512_FP16,
|
|
251
|
-
X86_AMX_BF16,
|
|
252
|
-
X86_AMX_TILE,
|
|
253
|
-
X86_AMX_INT8,
|
|
254
|
-
X86_PCLMULQDQ,
|
|
255
|
-
X86_SMX,
|
|
256
|
-
X86_SGX,
|
|
257
|
-
X86_CX16,
|
|
258
|
-
X86_SHA,
|
|
259
|
-
X86_POPCNT,
|
|
260
|
-
X86_MOVBE,
|
|
261
|
-
X86_RDRND,
|
|
262
|
-
X86_DCA,
|
|
263
|
-
X86_SS,
|
|
264
|
-
X86_ADX,
|
|
265
|
-
X86_LZCNT,
|
|
266
|
-
X86_GFNI,
|
|
267
|
-
X86_MOVDIRI,
|
|
268
|
-
X86_MOVDIR64B,
|
|
269
|
-
X86_FS_REP_MOV,
|
|
270
|
-
X86_FZ_REP_MOVSB,
|
|
271
|
-
X86_FS_REP_STOSB,
|
|
272
|
-
X86_FS_REP_CMPSB_SCASB,
|
|
273
|
-
X86_LAST_,
|
|
274
|
-
} X86FeaturesEnum;
|
|
275
|
-
|
|
276
|
-
int GetX86FeaturesEnumValue(const X86Features* features, X86FeaturesEnum value);
|
|
277
|
-
|
|
278
|
-
const char* GetX86FeaturesEnumName(X86FeaturesEnum);
|
|
279
|
-
|
|
280
|
-
const char* GetX86MicroarchitectureName(X86Microarchitecture);
|
|
281
|
-
|
|
282
|
-
CPU_FEATURES_END_CPP_NAMESPACE
|
|
283
|
-
|
|
284
|
-
#if !defined(CPU_FEATURES_ARCH_X86)
|
|
285
|
-
#error "Including cpuinfo_x86.h from a non-x86 target."
|
|
286
|
-
#endif
|
|
287
|
-
|
|
288
|
-
#endif // CPU_FEATURES_INCLUDE_CPUINFO_X86_H_
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
// Copyright 2017 Google LLC
|
|
2
|
-
//
|
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
// you may not use this file except in compliance with the License.
|
|
5
|
-
// You may obtain a copy of the License at
|
|
6
|
-
//
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
//
|
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
// See the License for the specific language governing permissions and
|
|
13
|
-
// limitations under the License.
|
|
14
|
-
|
|
15
|
-
#ifndef CPU_FEATURES_INCLUDE_INTERNAL_BIT_UTILS_H_
|
|
16
|
-
#define CPU_FEATURES_INCLUDE_INTERNAL_BIT_UTILS_H_
|
|
17
|
-
|
|
18
|
-
#include <assert.h>
|
|
19
|
-
#include <stdbool.h>
|
|
20
|
-
#include <stdint.h>
|
|
21
|
-
|
|
22
|
-
#include "cpu_features_macros.h"
|
|
23
|
-
|
|
24
|
-
CPU_FEATURES_START_CPP_NAMESPACE
|
|
25
|
-
|
|
26
|
-
inline static bool IsBitSet(uint32_t reg, uint32_t bit) {
|
|
27
|
-
return (reg >> bit) & 0x1;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
inline static uint32_t ExtractBitRange(uint32_t reg, uint32_t msb,
|
|
31
|
-
uint32_t lsb) {
|
|
32
|
-
const uint64_t bits = msb - lsb + 1ULL;
|
|
33
|
-
const uint64_t mask = (1ULL << bits) - 1ULL;
|
|
34
|
-
assert(msb >= lsb);
|
|
35
|
-
return (reg >> lsb) & mask;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
CPU_FEATURES_END_CPP_NAMESPACE
|
|
39
|
-
|
|
40
|
-
#endif // CPU_FEATURES_INCLUDE_INTERNAL_BIT_UTILS_H_
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// Copyright 2017 Google LLC
|
|
2
|
-
//
|
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
// you may not use this file except in compliance with the License.
|
|
5
|
-
// You may obtain a copy of the License at
|
|
6
|
-
//
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
//
|
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
// See the License for the specific language governing permissions and
|
|
13
|
-
// limitations under the License.
|
|
14
|
-
|
|
15
|
-
#ifndef CPU_FEATURES_INCLUDE_INTERNAL_CPUID_X86_H_
|
|
16
|
-
#define CPU_FEATURES_INCLUDE_INTERNAL_CPUID_X86_H_
|
|
17
|
-
|
|
18
|
-
#include <stdint.h>
|
|
19
|
-
|
|
20
|
-
#include "cpu_features_macros.h"
|
|
21
|
-
|
|
22
|
-
CPU_FEATURES_START_CPP_NAMESPACE
|
|
23
|
-
|
|
24
|
-
// A struct to hold the result of a call to cpuid.
|
|
25
|
-
typedef struct {
|
|
26
|
-
uint32_t eax, ebx, ecx, edx;
|
|
27
|
-
} Leaf;
|
|
28
|
-
|
|
29
|
-
// Returns the result of a call to the cpuid instruction.
|
|
30
|
-
Leaf GetCpuidLeaf(uint32_t leaf_id, int ecx);
|
|
31
|
-
|
|
32
|
-
// Returns the eax value of the XCR0 register.
|
|
33
|
-
uint32_t GetXCR0Eax(void);
|
|
34
|
-
|
|
35
|
-
CPU_FEATURES_END_CPP_NAMESPACE
|
|
36
|
-
|
|
37
|
-
#endif // CPU_FEATURES_INCLUDE_INTERNAL_CPUID_X86_H_
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// Copyright 2017 Google LLC
|
|
2
|
-
//
|
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
// you may not use this file except in compliance with the License.
|
|
5
|
-
// You may obtain a copy of the License at
|
|
6
|
-
//
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
//
|
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
// See the License for the specific language governing permissions and
|
|
13
|
-
// limitations under the License.
|
|
14
|
-
|
|
15
|
-
// An interface for the filesystem that allows mocking the filesystem in
|
|
16
|
-
// unittests.
|
|
17
|
-
#ifndef CPU_FEATURES_INCLUDE_INTERNAL_FILESYSTEM_H_
|
|
18
|
-
#define CPU_FEATURES_INCLUDE_INTERNAL_FILESYSTEM_H_
|
|
19
|
-
|
|
20
|
-
#include <stddef.h>
|
|
21
|
-
#include <stdint.h>
|
|
22
|
-
|
|
23
|
-
#include "cpu_features_macros.h"
|
|
24
|
-
|
|
25
|
-
CPU_FEATURES_START_CPP_NAMESPACE
|
|
26
|
-
|
|
27
|
-
// Same as linux "open(filename, O_RDONLY)", retries automatically on EINTR.
|
|
28
|
-
int CpuFeatures_OpenFile(const char* filename);
|
|
29
|
-
|
|
30
|
-
// Same as linux "read(file_descriptor, buffer, buffer_size)", retries
|
|
31
|
-
// automatically on EINTR.
|
|
32
|
-
int CpuFeatures_ReadFile(int file_descriptor, void* buffer, size_t buffer_size);
|
|
33
|
-
|
|
34
|
-
// Same as linux "close(file_descriptor)".
|
|
35
|
-
void CpuFeatures_CloseFile(int file_descriptor);
|
|
36
|
-
|
|
37
|
-
CPU_FEATURES_END_CPP_NAMESPACE
|
|
38
|
-
|
|
39
|
-
#endif // CPU_FEATURES_INCLUDE_INTERNAL_FILESYSTEM_H_
|