diff options
Diffstat (limited to 'graphics/openexr/files/patch-IlmImf_ImfSystemSpecific.cpp')
-rw-r--r-- | graphics/openexr/files/patch-IlmImf_ImfSystemSpecific.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/graphics/openexr/files/patch-IlmImf_ImfSystemSpecific.cpp b/graphics/openexr/files/patch-IlmImf_ImfSystemSpecific.cpp new file mode 100644 index 000000000000..fb41a812614b --- /dev/null +++ b/graphics/openexr/files/patch-IlmImf_ImfSystemSpecific.cpp @@ -0,0 +1,29 @@ +--- IlmImf/ImfSystemSpecific.cpp.orig 2018-08-10 01:34:58 UTC ++++ IlmImf/ImfSystemSpecific.cpp +@@ -44,11 +44,23 @@ namespace { + // Helper functions for gcc + SSE enabled + void cpuid(int n, int &eax, int &ebx, int &ecx, int &edx) + { ++#if __i386__ + __asm__ __volatile__ ( +- "cpuid" +- : /* Output */ "=a"(eax), "=b"(ebx), "=c"(ecx), "=d"(edx) +- : /* Input */ "a"(n) ++ "xchgl %%ebx,%k1\n" ++ "cpuid\n" ++ "xchgl %%ebx,%k1" \ ++ : /* Output */ "=a"(eax), "=&r"(ebx), "=c"(ecx), "=d"(edx) ++ : /* Input */ "0"(n) + : /* Clobber */); ++#else ++ __asm__ __volatile__ ( ++ "xchgq %%rbx,%q1\n" ++ "cpuid\n" ++ "xchgq %%rbx,%q1" \ ++ : /* Output */ "=a"(eax), "=&r"(ebx), "=c"(ecx), "=d"(edx) ++ : /* Input */ "0"(n) ++ : /* Clobber */); ++#endif + } + + #else // IMF_HAVE_SSE2 && __GNUC__ |