Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 585846 | Differences between
and this patch

Collapse All | Expand All

(-)a/IlmImf/ImfSystemSpecific.cpp (-11 / +8 lines)
Lines 35-40 Link Here
35
#include "ImfSystemSpecific.h"
35
#include "ImfSystemSpecific.h"
36
#include "ImfNamespace.h"
36
#include "ImfNamespace.h"
37
#include "OpenEXRConfig.h"
37
#include "OpenEXRConfig.h"
38
#include <cpuid.h>
38
39
39
OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER
40
OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER
40
41
Lines 42-60 Link Here
42
#if defined(IMF_HAVE_SSE2) &&  defined(__GNUC__)
43
#if defined(IMF_HAVE_SSE2) &&  defined(__GNUC__)
43
44
44
    // Helper functions for gcc + SSE enabled
45
    // Helper functions for gcc + SSE enabled
45
    void cpuid(int n, int &eax, int &ebx, int &ecx, int &edx)
46
    void cpuid(unsigned int n, unsigned int &eax, unsigned int &ebx, unsigned int &ecx, unsigned int &edx)
46
    {
47
    {
47
        __asm__ __volatile__ (
48
	__get_cpuid(n, &eax, &ebx, &ecx, &edx );
48
            "cpuid"
49
            : /* Output  */ "=a"(eax), "=b"(ebx), "=c"(ecx), "=d"(edx) 
50
            : /* Input   */ "a"(n)
51
            : /* Clobber */);
52
    }
49
    }
53
50
54
#else // IMF_HAVE_SSE2 && __GNUC__
51
#else // IMF_HAVE_SSE2 && __GNUC__
55
52
56
    // Helper functions for generic compiler - all disabled
53
    // Helper functions for generic compiler - all disabled
57
    void cpuid(int n, int &eax, int &ebx, int &ecx, int &edx)
54
    void cpuid(unsigned int n, unsigned int &eax, unsigned int &ebx, unsigned int &ecx, unsigned int &edx)
58
    {
55
    {
59
        eax = ebx = ecx = edx = 0;
56
        eax = ebx = ecx = edx = 0;
60
    }
57
    }
Lines 64-70 Link Here
64
61
65
#ifdef OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX
62
#ifdef OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX
66
63
67
    void xgetbv(int n, int &eax, int &edx)
64
    void xgetbv(unsigned int n, unsigned int &eax, unsigned int &edx)
68
    {
65
    {
69
        __asm__ __volatile__ (
66
        __asm__ __volatile__ (
70
            "xgetbv"
67
            "xgetbv"
Lines 75-81 Link Here
75
72
76
#else //  OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX
73
#else //  OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX
77
74
78
    void xgetbv(int n, int &eax, int &edx)
75
    void xgetbv(unsigned int n, unsigned int &eax, unsigned int &edx)
79
    {
76
    {
80
        eax = edx = 0;
77
        eax = edx = 0;
81
    }
78
    }
Lines 94-101 Link Here
94
    f16c(false)
91
    f16c(false)
95
{
92
{
96
    bool osxsave = false;
93
    bool osxsave = false;
97
    int  max     = 0;
94
    unsigned int  max     = 0;
98
    int  eax, ebx, ecx, edx;
95
    unsigned int  eax, ebx, ecx, edx;
99
96
100
    cpuid(0, max, ebx, ecx, edx);
97
    cpuid(0, max, ebx, ecx, edx);
101
    if (max > 0)
98
    if (max > 0)

Return to bug 585846