For 64-bit compilation, MSVC no longer supports inline assembly
This commit is contained in:
parent
381ebeab13
commit
ef7a5e1b00
@ -267,10 +267,20 @@ FPU::FPU ()
|
|||||||
|
|
||||||
#ifdef COMPILER_MSVC
|
#ifdef COMPILER_MSVC
|
||||||
char* buf = *fxbuf;
|
char* buf = *fxbuf;
|
||||||
|
#ifdef _WIN64
|
||||||
|
/* For 64-bit compilation, MSVC doesn't support inline assembly !!
|
||||||
|
( https://docs.microsoft.com/en-us/cpp/assembler/inline/inline-assembler?view=msvc-160 ) */
|
||||||
|
|
||||||
|
/* but instead, it uses something called 'x64 intrinsics'
|
||||||
|
1: ( https://docs.microsoft.com/en-us/cpp/intrinsics/x64-amd64-intrinsics-list?view=msvc-160 )
|
||||||
|
2: ( https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_fxsave ) */
|
||||||
|
_fxsave (buf);
|
||||||
|
#else
|
||||||
__asm {
|
__asm {
|
||||||
mov eax, buf
|
mov eax, buf
|
||||||
fxsave [eax]
|
fxsave [eax]
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
asm volatile (
|
asm volatile (
|
||||||
"fxsave (%0)"
|
"fxsave (%0)"
|
||||||
|
Loading…
Reference in New Issue
Block a user