diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 000000000..3a15916d4 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,2 @@ +patreon: 86box +custom: ["https://paypal.me/86Box"] diff --git a/src/codegen_new/codegen_backend_x86.c b/src/codegen_new/codegen_backend_x86.c index 1e22caa2e..036e8a621 100644 --- a/src/codegen_new/codegen_backend_x86.c +++ b/src/codegen_new/codegen_backend_x86.c @@ -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; } diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c index 7cdd36ed4..b60ea5b21 100644 --- a/src/cpu/cpu.c +++ b/src/cpu/cpu.c @@ -399,10 +399,10 @@ cpu_set(void) hasfpu = (fpu_type != FPU_NONE); hascache = (cpu_s->cpu_type >= CPU_486SLC) || (cpu_s->cpu_type == CPU_IBM386SLC || cpu_s->cpu_type == CPU_IBM486SLC || cpu_s->cpu_type == CPU_IBM486BL); #if defined(DEV_BRANCH) && defined(USE_CYRIX_6X86) - cpu_iscyrix = (cpu_s->cpu_type == CPU_486SLC || cpu_s->cpu_type == CPU_486DLC || cpu_s->cpu_type == CPU_Cx486S || cpu_s->cpu_type == CPU_Cx486DX || cpu_s->cpu_type == CPU_Cx5x86 || cpu_s->cpu_type == CPU_Cx6x86 || cpu_s->cpu_type == CPU_Cx6x86MX || cpu_s->cpu_type == CPU_Cx6x86L || cpu_s->cpu_type == CPU_CxGX1); -#else - cpu_iscyrix = (cpu_s->cpu_type == CPU_486SLC || cpu_s->cpu_type == CPU_486DLC || cpu_s->cpu_type == CPU_Cx486S || cpu_s->cpu_type == CPU_Cx486DX || cpu_s->cpu_type == CPU_Cx5x86); -#endif + cpu_iscyrix = (cpu_s->cpu_type == CPU_486SLC || cpu_s->cpu_type == CPU_486DLC || cpu_s->cpu_type == CPU_Cx486S || cpu_s->cpu_type == CPU_Cx486DX || cpu_s->cpu_type == CPU_Cx486DX2 || cpu_s->cpu_type == CPU_Cx486DX4 || cpu_s->cpu_type == CPU_Cx5x86 || cpu_s->cpu_type == CPU_Cx6x86 || cpu_s->cpu_type == CPU_Cx6x86MX || cpu_s->cpu_type == CPU_Cx6x86L || cpu_s->cpu_type == CPU_CxGX1); +#else + cpu_iscyrix = (cpu_s->cpu_type == CPU_486SLC || cpu_s->cpu_type == CPU_486DLC || cpu_s->cpu_type == CPU_Cx486S || cpu_s->cpu_type == CPU_Cx486DX || cpu_s->cpu_type == CPU_Cx486DX2 || cpu_s->cpu_type == CPU_Cx486DX4 || cpu_s->cpu_type == CPU_Cx5x86); +#endif cpu_16bitbus = (cpu_s->cpu_type == CPU_286 || cpu_s->cpu_type == CPU_386SX || cpu_s->cpu_type == CPU_486SLC || cpu_s->cpu_type == CPU_IBM386SLC || cpu_s->cpu_type == CPU_IBM486SLC ); cpu_64bitbus = (cpu_s->cpu_type >= CPU_WINCHIP); @@ -935,6 +935,7 @@ cpu_set(void) case CPU_Cx486S: case CPU_Cx486DX: case CPU_Cx486DX2: + case CPU_Cx486DX4: #ifdef USE_DYNAREC x86_setopcodes(ops_386, ops_486_0f, dynarec_ops_386, dynarec_ops_486_0f); #else diff --git a/src/cpu/cpu.h b/src/cpu/cpu.h index cf99c0ae1..ca88d72d3 100644 --- a/src/cpu/cpu.h +++ b/src/cpu/cpu.h @@ -156,10 +156,8 @@ extern CPU cpus_K56_SS7[]; #if defined(DEV_BRANCH) && defined(USE_CYRIX_6X86) extern CPU cpus_6x863V[]; extern CPU cpus_6x86[]; -#ifdef USE_NEW_DYNAREC extern CPU cpus_6x86SS7[]; #endif -#endif extern CPU cpus_Cyrix3[]; extern CPU cpus_PentiumPro[]; extern CPU cpus_PentiumII66[]; @@ -293,10 +291,10 @@ typedef struct { #ifdef USE_NEW_DYNAREC uint32_t old_fp_control, new_fp_control; -#if defined i386 || defined __i386 || defined __i386__ || defined _X86_ +#if defined i386 || defined __i386 || defined __i386__ || defined _X86_ || defined _M_IX86 uint16_t old_fp_control2, new_fp_control2; #endif -#if defined i386 || defined __i386 || defined __i386__ || defined _X86_ || defined __amd64__ +#if defined i386 || defined __i386 || defined __i386__ || defined _X86_ || defined _M_IX86 || defined __amd64__ || defined _M_X64 uint32_t trunc_fp_control; #endif #endif diff --git a/src/win/Makefile.mingw b/src/win/Makefile.mingw index 2743019eb..3ec647ae3 100644 --- a/src/win/Makefile.mingw +++ b/src/win/Makefile.mingw @@ -42,6 +42,9 @@ ifeq ($(DEV_BUILD), y) ifndef CL5422 CL5422 := y endif + ifndef CYRIX_6X86 + CYRIX_6X86 := y + endif ifndef LASERXT LASERXT := y endif @@ -106,6 +109,9 @@ else ifndef CL5422 CL5422 := n endif + ifndef CYRIX_6X86 + CYRIX_6X86 := n + endif ifndef LASERXT LASERXT := n endif @@ -473,6 +479,10 @@ ifeq ($(CL5422), y) OPTS += -DUSE_CL5422 endif +ifeq ($(CYRIX_6X86), y) +OPTS += -DUSE_CYRIX_6X86 +endif + ifeq ($(LASERXT), y) OPTS += -DUSE_LASERXT DEVBROBJ += m_xt_laserxt.o