Skip to content

Commit a450fa7

Browse files
committed
Fix missing var
1 parent 01af4b3 commit a450fa7

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

include/xsimd/xsimd_cpu_features_x86.hpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ namespace xsimd
7878

7979
constexpr bool avx512_state_os_enabled() const noexcept
8080
{
81-
// Check all SSE, AVX, and AVX52 bits even though AVX512 must
81+
// Check all SSE, AVX, and AVX512 bits even though AVX512 must
8282
// imply AVX and SSE
8383
return utils::bit_is_set<1, 2, 6>(m_low);
8484
}
@@ -247,16 +247,18 @@ namespace xsimd
247247
{
248248
inline cpuid_reg_t get_cpuid(int level, int count) noexcept
249249
{
250+
cpuid_reg_t reg = {};
251+
250252
#if !XSIMD_TARGET_X86
251253
(void)level;
252254
(void)count;
253255
return {}; // All bits to zero
254256

255257
#elif defined(_MSC_VER)
256-
__cpuidex(reg, level, count);
258+
__cpuidex(reg.data(), level, count);
257259

258260
#elif defined(__INTEL_COMPILER)
259-
__cpuid(reg, level);
261+
__cpuid(reg.data(), level);
260262

261263
#elif defined(__GNUC__) || defined(__clang__)
262264

@@ -274,6 +276,7 @@ namespace xsimd
274276
: "0"(level), "2"(count));
275277
#endif
276278
#endif
279+
return reg;
277280
}
278281

279282
inline xcr0_reg_t get_xcr0_low() noexcept

0 commit comments

Comments
 (0)