Reorganized some CPU structures a bit and fixed inappropriate behavior of some mem.c functions on 64-bit binaries (and made mem.c aware of ARM64 as well), fixes both 64-bit recompilers, closes #1215.

This commit is contained in:
OBattler
2021-08-27 13:31:47 +02:00
parent eb827a6629
commit ddc7c5b78a
20 changed files with 181 additions and 176 deletions

View File

@@ -304,20 +304,12 @@ 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;
}