From: Toni Wilen Date: Fri, 26 May 2023 18:32:26 +0000 (+0300) Subject: Added jit inhibit option (can force disable JIT without adjusting uae-configuration... X-Git-Tag: 5.0.0~9 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=4cdf74a43f5f45d4bbfc0ad58aae8ffec9208a32;p=francis%2Fwinuae.git Added jit inhibit option (can force disable JIT without adjusting uae-configuration/custom event strings) --- diff --git a/cfgfile.cpp b/cfgfile.cpp index aa49a24b..3651713f 100644 --- a/cfgfile.cpp +++ b/cfgfile.cpp @@ -2202,6 +2202,7 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type) cfgfile_write_bool(f, _T("comp_catchfault"), p->comp_catchfault); cfgfile_write(f, _T("cachesize"), _T("%d"), p->cachesize); cfgfile_dwrite_str(f, _T("jit_blacklist"), p->jitblacklist); + cfgfile_dwrite_bool(f, _T("jit_inhibit"), p->cachesize_inhibit); for (i = 0; i < MAX_JPORTS; i++) { struct jport *jp = &p->jports[i]; @@ -5916,12 +5917,13 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, const TCHAR *option, TCH #ifdef USE_JIT_FPU || cfgfile_yesno (option, value, _T("compfpu"), &p->compfpu) #endif - || cfgfile_yesno (option, value, _T("rtg_nocustom"), &p->picasso96_nocustom) - || cfgfile_yesno (option, value, _T("floppy_write_protect"), &p->floppy_read_only) + || cfgfile_yesno(option, value, _T("jit_inhibit"), &p->cachesize_inhibit) + || cfgfile_yesno(option, value, _T("rtg_nocustom"), &p->picasso96_nocustom) + || cfgfile_yesno(option, value, _T("floppy_write_protect"), &p->floppy_read_only) || cfgfile_yesno(option, value, _T("harddrive_write_protect"), &p->harddrive_read_only) || cfgfile_yesno(option, value, _T("uae_hide_autoconfig"), &p->uae_hide_autoconfig) || cfgfile_yesno(option, value, _T("board_custom_order"), &p->autoconfig_custom_sort) - || cfgfile_yesno (option, value, _T("uaeserial"), &p->uaeserial)) + || cfgfile_yesno(option, value, _T("uaeserial"), &p->uaeserial)) return 1; if (cfgfile_intval(option, value, _T("cachesize"), &p->cachesize, 1) diff --git a/include/options.h b/include/options.h index c0f3b215..8dc93b8e 100644 --- a/include/options.h +++ b/include/options.h @@ -568,6 +568,7 @@ struct uae_prefs { bool comp_constjump; bool comp_catchfault; int cachesize; + bool cachesize_inhibit; TCHAR jitblacklist[MAX_DPATH]; bool fpu_strict; int fpu_mode; diff --git a/main.cpp b/main.cpp index ad10bcf8..2860d494 100644 --- a/main.cpp +++ b/main.cpp @@ -272,6 +272,9 @@ void fixup_cpu (struct uae_prefs *p) p->cpuboardmem1.size = 8 * 1024 * 1024; } + if (p->cachesize_inhibit) { + p->cachesize = 0; + } if (p->cpu_model < 68020 && p->cachesize) { p->cachesize = 0; error_log (_T("JIT requires 68020 or better CPU."));