Skip to content

Commit

Permalink
[FIX] Fix compilation error for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
rlagneau committed Jun 6, 2024
1 parent 883785c commit cf97506
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/core/src/tools/cpu-features/x86/cpu_x86_Windows.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
// Dependencies
#include <Windows.h>
#include <intrin.h>
#include <memory.h>
#include "cpu_x86.h"
namespace FeatureDetector
{
Expand Down Expand Up @@ -78,7 +79,13 @@ void __cpuidex(uint CPUInfo[4], uint function_id, uint subfunction_id)
#endif
void cpu_x86::cpuid(uint32_t out[4], uint32_t x)
{
#if defined(__MINGW32__)
__cpuidex(out, x, 0U);
#else
int32_t out_as_int[4];
__cpuidex(out_as_int, x, 0U);
memcpy(out, out_as_int, sizeof(int32_t) * 4);
#endif
}
__int64 xgetbv(unsigned int x)
{
Expand Down

0 comments on commit cf97506

Please sign in to comment.