--- openexr-3.2.0/src/lib/OpenEXR/ImfSystemSpecific.cpp.orig 2023-08-28 19:56:26.000000000 +0200 +++ openexr-3.2.0/src/lib/OpenEXR/ImfSystemSpecific.cpp 2023-09-02 09:30:06.458371741 +0200 @@ -19,23 +19,22 @@ #if defined(IMF_HAVE_SSE2) && defined(__GNUC__) && !defined(__e2k__) // Helper functions for gcc + SSE enabled + +#include + void -cpuid (int n, int& eax, int& ebx, int& ecx, int& edx) +cpuid (unsigned int n, unsigned int& eax, unsigned int& ebx, unsigned int& ecx, unsigned int& edx) { - __asm__ __volatile__( - "cpuid" - : /* Output */ "=a"(eax), "=b"(ebx), "=c"(ecx), "=d"(edx) - : /* Input */ "a"(n) - : /* Clobber */); + __get_cpuid(n, &eax, &ebx, &ecx, &edx); } #elif defined(_MSC_VER) && ( defined(_M_IX86) || ( defined(_M_AMD64) && !defined(_M_ARM64EC) ) ) // Helper functions for MSVC void -cpuid (int n, int& eax, int& ebx, int& ecx, int& edx) +cpuid (unsigned int n, unsigned int& eax, unsigned int& ebx, unsigned int& ecx, unsigned int& edx) { - int cpuInfo[4] = { -1 }; + unsigned int cpuInfo[4] = { -1 }; __cpuid (cpuInfo, n); eax = cpuInfo[0]; ebx = cpuInfo[1]; @@ -47,7 +46,7 @@ // Helper functions for generic compiler - all disabled void -cpuid (int n, int& eax, int& ebx, int& ecx, int& edx) +cpuid (unsigned int n, unsigned int& eax, unsigned int& ebx, unsigned int& ecx, unsigned int& edx) { eax = ebx = ecx = edx = 0; } @@ -57,7 +56,7 @@ #ifdef IMF_HAVE_GCC_INLINEASM_X86 void -xgetbv (int n, int& eax, int& edx) +xgetbv (unsigned int n, unsigned int& eax, unsigned int& edx) { __asm__ __volatile__("xgetbv" : /* Output */ "=a"(eax), "=d"(edx) @@ -68,7 +67,7 @@ #else // IMF_HAVE_GCC_INLINEASM_X86 void -xgetbv (int n, int& eax, int& edx) +xgetbv (unsigned int n, unsigned int& eax, unsigned int& edx) { eax = edx = 0; } @@ -111,8 +110,8 @@ # endif #else // x86/x86_64 bool osxsave = false; - int max = 0; - int eax, ebx, ecx, edx; + unsigned int max = 0; + unsigned int eax, ebx, ecx, edx; cpuid (0, max, ebx, ecx, edx); if (max > 0)