Annotation of /trunk/openexr/patches/openexr-2.2.0-build-pic.patch
Parent Directory | Revision Log
Revision 2507 -
(hide annotations)
(download)
Tue Oct 21 09:39:43 2014 UTC (9 years, 11 months ago) by niro
File size: 1833 byte(s)
Tue Oct 21 09:39:43 2014 UTC (9 years, 11 months ago) by niro
File size: 1833 byte(s)
-fixes pic issues
1 | niro | 2507 | --- IlmImf/ImfSystemSpecific.cpp.orig 2014-08-10 04:23:57.000000000 +0000 |
2 | +++ IlmImf/ImfSystemSpecific.cpp | ||
3 | @@ -40,21 +40,19 @@ OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EN | ||
4 | |||
5 | namespace { | ||
6 | #if defined(IMF_HAVE_SSE2) && defined(__GNUC__) | ||
7 | - | ||
8 | +#include <cpuid.h> | ||
9 | // Helper functions for gcc + SSE enabled | ||
10 | - void cpuid(int n, int &eax, int &ebx, int &ecx, int &edx) | ||
11 | + void cpuid(unsigned int n, unsigned int &eax, unsigned int &ebx, | ||
12 | + unsigned int &ecx, unsigned int &edx) | ||
13 | { | ||
14 | - __asm__ __volatile__ ( | ||
15 | - "cpuid" | ||
16 | - : /* Output */ "=a"(eax), "=b"(ebx), "=c"(ecx), "=d"(edx) | ||
17 | - : /* Input */ "a"(n) | ||
18 | - : /* Clobber */); | ||
19 | + __get_cpuid(n, &eax, &ebx, &ecx, &edx); | ||
20 | } | ||
21 | |||
22 | #else // IMF_HAVE_SSE2 && __GNUC__ | ||
23 | |||
24 | // Helper functions for generic compiler - all disabled | ||
25 | - void cpuid(int n, int &eax, int &ebx, int &ecx, int &edx) | ||
26 | + void cpuid(unsigned int n, unsigned int &eax, unsigned int &ebx, | ||
27 | + unsigned int &ecx, unsigned int &edx) | ||
28 | { | ||
29 | eax = ebx = ecx = edx = 0; | ||
30 | } | ||
31 | @@ -64,7 +62,7 @@ namespace { | ||
32 | |||
33 | #ifdef OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX | ||
34 | |||
35 | - void xgetbv(int n, int &eax, int &edx) | ||
36 | + void xgetbv(unsigned int n, unsigned int &eax, unsigned int &edx) | ||
37 | { | ||
38 | __asm__ __volatile__ ( | ||
39 | "xgetbv" | ||
40 | @@ -75,7 +73,7 @@ namespace { | ||
41 | |||
42 | #else // OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX | ||
43 | |||
44 | - void xgetbv(int n, int &eax, int &edx) | ||
45 | + void xgetbv(unsigned int n, unsigned int &eax, unsigned int &edx) | ||
46 | { | ||
47 | eax = edx = 0; | ||
48 | } | ||
49 | @@ -94,8 +92,8 @@ CpuId::CpuId(): | ||
50 | f16c(false) | ||
51 | { | ||
52 | bool osxsave = false; | ||
53 | - int max = 0; | ||
54 | - int eax, ebx, ecx, edx; | ||
55 | + unsigned int max = 0; | ||
56 | + unsigned int eax, ebx, ecx, edx; | ||
57 | |||
58 | cpuid(0, max, ebx, ecx, edx); | ||
59 | if (max > 0) | ||
60 |