--- openexr-3.3.2/src/lib/OpenEXR/ImfSystemSpecific.cpp.orig 2024-11-11 16:49:52.000000000 +0100 +++ openexr-3.3.2/src/lib/OpenEXR/ImfSystemSpecific.cpp 2025-02-16 09:20:47.787278110 +0100 @@ -19,14 +19,13 @@ #if defined(IMF_HAVE_SSE2) && defined(__GNUC__) && !defined(__e2k__) // Helper functions for gcc + SSE enabled + +#include <cpuid.h> + 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) && \ @@ -48,7 +47,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; } @@ -58,7 +57,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) @@ -69,7 +68,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; } @@ -112,8 +111,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)