More MSVC build fixes

Ported an inline assembler snippet in x86 new dynarec to MSVC "__asm" syntax.
This commit is contained in:
David Hrdlička
2020-07-06 21:03:55 +02:00
committed by GitHub
parent 254c8024f8
commit 82f2b203c5

View File

@@ -304,12 +304,20 @@ void codegen_backend_init()
block_write_data = NULL;
cpu_state.old_fp_control = 0;
#ifndef _MSC_VER
asm(
"fstcw %0\n"
"stmxcsr %1\n"
: "=m" (cpu_state.old_fp_control2),
"=m" (cpu_state.old_fp_control)
);
#else
__asm
{
fstcw cpu_state.old_fp_control2
stmxcsr cpu_state.old_fp_control
}
#endif
cpu_state.trunc_fp_control = cpu_state.old_fp_control | 0x6000;
}