]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Added jit inhibit option (can force disable JIT without adjusting uae-configuration...
authorToni Wilen <twilen@winuae.net>
Fri, 26 May 2023 18:32:26 +0000 (21:32 +0300)
committerToni Wilen <twilen@winuae.net>
Fri, 26 May 2023 18:32:26 +0000 (21:32 +0300)
cfgfile.cpp
include/options.h
main.cpp

index aa49a24b76e896b52e84827ab762b108aa837fbe..3651713f56a86f9ebb056a1e4a5987c422392a57 100644 (file)
@@ -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)
index c0f3b215981ec70619860e60afac185efb60ba36..8dc93b8e4a13f8f6d3fba9cd9420c2fc6e656d53 100644 (file)
@@ -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;
index ad10bcf8a7d6ffa14b617eed63923d202897b3c4..2860d4942a589ea39448f75c8fafd634f6c9cdec 100644 (file)
--- 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."));