Fix compile using SunCC 5.9
parent
4ddaa9d01d
commit
cc5eb3919f
4
cpu.cpp
4
cpu.cpp
|
|
@ -315,7 +315,7 @@ void DetectX86Features()
|
|||
if ((cpuid1[2] & AVX_FLAG) == AVX_FLAG)
|
||||
{
|
||||
// GCC 4.1/Binutils 2.17 cannot consume xgetbv
|
||||
#if defined(__GNUC__) || defined(__SUNPRO_CC) || defined(__BORLANDC__)
|
||||
#if defined(__GNUC__) || (__SUNPRO_CC >= 0x5100) || defined(__BORLANDC__)
|
||||
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71659 and
|
||||
// http://www.agner.org/optimize/vectorclass/read.php?i=65
|
||||
word32 a=0, d=0;
|
||||
|
|
@ -352,6 +352,8 @@ void DetectX86Features()
|
|||
#elif defined(_MSC_VER) && defined(_M_X64)
|
||||
word64 xcr0 = ExtendedControlRegister(0);
|
||||
g_hasAVX = (xcr0 & YMM_FLAG) == YMM_FLAG;
|
||||
#elif defined(__SUNPRO_CC) // fall into
|
||||
g_hasAVX = false;
|
||||
#else
|
||||
word64 xcr0 = _xgetbv(0);
|
||||
g_hasAVX = (xcr0 & YMM_FLAG) == YMM_FLAG;
|
||||
|
|
|
|||
Loading…
Reference in New Issue