Skip to content

Commit 33ac968

Browse files
committed
Fix
1 parent bae48fc commit 33ac968

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/libunicode/simd_detector.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
// auto max_simd_size() -> size_t;
1212

1313
void cpuid(int32_t out[4], int32_t eax, int32_t ecx);
14+
#if _WIN32
15+
__int64 xgetbv(unsigned int x)
16+
#elif defined(__GNUC__) || defined(__clang__)
1417
uint64_t xgetbv(unsigned int index);
15-
enum class Simd_Size
16-
{
17-
sse2,
18-
avx,
19-
};
18+
#endif
19+
2020
auto detect_os_avx() -> bool;
2121
auto detect_os_avx512() -> bool;
2222

@@ -65,7 +65,7 @@ auto detect_os_avx() -> bool
6565

6666
if (osUsesXSAVE_XRSTORE && cpuAVXSuport)
6767
{
68-
uint64_t const xcrFeatureMask = xgetbv(_XCR_XFEATURE_ENABLED_MASK);
68+
auto const xcrFeatureMask = xgetbv(_XCR_XFEATURE_ENABLED_MASK);
6969
avxSupported = (xcrFeatureMask & 0x6) == 0x6;
7070
}
7171

0 commit comments

Comments
 (0)