From 7c372ca78968a813b7d5e37bd6cc47923a376849 Mon Sep 17 00:00:00 2001 From: TC1995 Date: Sun, 30 Apr 2023 18:18:12 +0200 Subject: [PATCH] Moved the softfloat-enabled ops back to the cpu directory. Made softfloat always enabled, thus dynarec disabled, only for the IBM PS/2 model 70 type 4, in preparation for its comeback to main use. --- src/config.c | 7 +++++++ src/cpu/x87_ops.h | 15 ++++++++------- .../{softfloat/x87_ops_other.h => x87_ops_sf.h} | 0 .../x87_ops_arith.h => x87_ops_sf_arith.h} | 0 .../x87_ops_compare.h => x87_ops_sf_compare.h} | 0 .../x87_ops_const.h => x87_ops_sf_const.h} | 0 ...7_ops_load_store.h => x87_ops_sf_load_store.h} | 0 .../x87_ops_misc.h => x87_ops_sf_misc.h} | 0 .../x87_ops_trans.h => x87_ops_sf_trans.h} | 0 src/qt/qt_settingsmachine.cpp | 4 ++++ 10 files changed, 19 insertions(+), 7 deletions(-) rename src/cpu/{softfloat/x87_ops_other.h => x87_ops_sf.h} (100%) rename src/cpu/{softfloat/x87_ops_arith.h => x87_ops_sf_arith.h} (100%) rename src/cpu/{softfloat/x87_ops_compare.h => x87_ops_sf_compare.h} (100%) rename src/cpu/{softfloat/x87_ops_const.h => x87_ops_sf_const.h} (100%) rename src/cpu/{softfloat/x87_ops_load_store.h => x87_ops_sf_load_store.h} (100%) rename src/cpu/{softfloat/x87_ops_misc.h => x87_ops_sf_misc.h} (100%) rename src/cpu/{softfloat/x87_ops_trans.h => x87_ops_sf_trans.h} (100%) diff --git a/src/config.c b/src/config.c index a83512bde..75a3973e4 100644 --- a/src/config.c +++ b/src/config.c @@ -505,6 +505,13 @@ load_machine(void) cpu_use_dynarec = !!ini_section_get_int(cat, "cpu_use_dynarec", 0); fpu_softfloat = !!ini_section_get_int(cat, "fpu_softfloat", 0); + /*The IBM PS/2 model 70 type 4 BIOS does heavy tests to the FPU in 80-bit precision mode, requiring softfloat + otherwise it would always throw error 12903 on POST, so always disable dynarec and enable softfloat for this + machine only.*/ + if (!strcmp(machines[machine].internal_name, "ibmps2_m70_type4")) { + cpu_use_dynarec = 0; + fpu_softfloat = 1; + } p = ini_section_get_string(cat, "time_sync", NULL); if (p != NULL) { diff --git a/src/cpu/x87_ops.h b/src/cpu/x87_ops.h index 0ab6b2e68..742ed3e5d 100644 --- a/src/cpu/x87_ops.h +++ b/src/cpu/x87_ops.h @@ -481,13 +481,14 @@ typedef union { # define FP_TAG_VALID_N cpu_state.tag[(cpu_state.TOP + 1) & 7] &= ~TAG_UINT64 #endif -#include "softfloat/x87_ops_arith.h" -#include "softfloat/x87_ops_compare.h" -#include "softfloat/x87_ops_const.h" -#include "softfloat/x87_ops_load_store.h" -#include "softfloat/x87_ops_misc.h" -#include "softfloat/x87_ops_trans.h" -#include "softfloat/x87_ops_other.h" +#include "x87_ops_sf_arith.h" +#include "x87_ops_sf_compare.h" +#include "x87_ops_sf_const.h" +#include "x87_ops_sf_load_store.h" +#include "x87_ops_sf_misc.h" +#include "x87_ops_sf_trans.h" +#include "x87_ops_sf.h" + #include "x87_ops_arith.h" #include "x87_ops_misc.h" #include "x87_ops_loadstore.h" diff --git a/src/cpu/softfloat/x87_ops_other.h b/src/cpu/x87_ops_sf.h similarity index 100% rename from src/cpu/softfloat/x87_ops_other.h rename to src/cpu/x87_ops_sf.h diff --git a/src/cpu/softfloat/x87_ops_arith.h b/src/cpu/x87_ops_sf_arith.h similarity index 100% rename from src/cpu/softfloat/x87_ops_arith.h rename to src/cpu/x87_ops_sf_arith.h diff --git a/src/cpu/softfloat/x87_ops_compare.h b/src/cpu/x87_ops_sf_compare.h similarity index 100% rename from src/cpu/softfloat/x87_ops_compare.h rename to src/cpu/x87_ops_sf_compare.h diff --git a/src/cpu/softfloat/x87_ops_const.h b/src/cpu/x87_ops_sf_const.h similarity index 100% rename from src/cpu/softfloat/x87_ops_const.h rename to src/cpu/x87_ops_sf_const.h diff --git a/src/cpu/softfloat/x87_ops_load_store.h b/src/cpu/x87_ops_sf_load_store.h similarity index 100% rename from src/cpu/softfloat/x87_ops_load_store.h rename to src/cpu/x87_ops_sf_load_store.h diff --git a/src/cpu/softfloat/x87_ops_misc.h b/src/cpu/x87_ops_sf_misc.h similarity index 100% rename from src/cpu/softfloat/x87_ops_misc.h rename to src/cpu/x87_ops_sf_misc.h diff --git a/src/cpu/softfloat/x87_ops_trans.h b/src/cpu/x87_ops_sf_trans.h similarity index 100% rename from src/cpu/softfloat/x87_ops_trans.h rename to src/cpu/x87_ops_sf_trans.h diff --git a/src/qt/qt_settingsmachine.cpp b/src/qt/qt_settingsmachine.cpp index 2794af71b..fbe30949c 100644 --- a/src/qt/qt_settingsmachine.cpp +++ b/src/qt/qt_settingsmachine.cpp @@ -106,6 +106,10 @@ SettingsMachine::save() fpu_type = ui->comboBoxFPU->currentData().toInt(); cpu_use_dynarec = ui->checkBoxDynamicRecompiler->isChecked() ? 1 : 0; fpu_softfloat = (ui->checkBoxFPUSoftfloat->isChecked() && !cpu_use_dynarec) ? 1 : 0; + if (!strcmp(machines[machine].internal_name, "ibmps2_m70_type4")) { + cpu_use_dynarec = 0; + fpu_softfloat = 1; + } int64_t temp_mem_size; if (machine_get_ram_granularity(machine) < 1024) {