Rename XGETBV to XGETBV64
parent
6f3be56c9d
commit
f396ade93a
4
cpu.cpp
4
cpu.cpp
|
|
@ -58,7 +58,7 @@ unsigned long int getauxval(unsigned long int) { return 0; }
|
|||
|
||||
// Visual Studio 2008 and below is missing _xgetbv. See x64dll.asm for the body.
|
||||
#if defined(_MSC_VER) && _MSC_VER <= 1500 && defined(_M_X64)
|
||||
extern "C" unsigned long long __fastcall XGETBV(unsigned int);
|
||||
extern "C" unsigned long long __fastcall XGETBV64(unsigned int);
|
||||
#endif
|
||||
|
||||
ANONYMOUS_NAMESPACE_BEGIN
|
||||
|
|
@ -373,7 +373,7 @@ void DetectX86Features()
|
|||
|
||||
// Visual Studio 2008 and below lack xgetbv
|
||||
#elif defined(_MSC_VER) && _MSC_VER <= 1500 && defined(_M_X64)
|
||||
word64 xcr0 = XGETBV(0);
|
||||
word64 xcr0 = XGETBV64(0);
|
||||
g_hasAVX = (xcr0 & YMM_FLAG) == YMM_FLAG;
|
||||
|
||||
// Downlevel SunCC
|
||||
|
|
|
|||
|
|
@ -1965,7 +1965,7 @@ ret
|
|||
SHA256_HashMultipleBlocks_SSE2 ENDP
|
||||
|
||||
ALIGN 8
|
||||
XGETBV PROC
|
||||
XGETBV64 PROC
|
||||
;; First paramter is RCX, and xgetbv expects the CTRL in ECX
|
||||
;; http://www.agner.org/optimize/vectorclass/read.php?i=65
|
||||
DB 0fh, 01h, 0d0h
|
||||
|
|
@ -1974,7 +1974,7 @@ and rax, 0ffffffffh
|
|||
shl rdx, 32
|
||||
or rax, rdx
|
||||
ret
|
||||
XGETBV ENDP
|
||||
XGETBV64 ENDP
|
||||
|
||||
_TEXT ENDS
|
||||
END
|
||||
|
|
|
|||
Loading…
Reference in New Issue