]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
JIT: USE_JIT_FPU always on, use currprefs.compfpu properly at runtime
authorFrode Solheim <frode@fs-uae.net>
Fri, 18 Sep 2015 21:36:41 +0000 (23:36 +0200)
committerFrode Solheim <frode@fs-uae.net>
Fri, 18 Sep 2015 21:36:41 +0000 (23:36 +0200)
cfgfile.cpp
jit/compemu.h
jit/compemu_support.cpp
od-win32/sysconfig.h

index 9ed00a7f6a1ab5e91fe1916e9637c157762bf381..b7c86a1f3b8f18f7dc5f744653a063b01d7cc1c8 100644 (file)
@@ -1401,7 +1401,9 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
        cfgfile_write_bool (f, _T("comp_constjump"), p->comp_constjump);
        cfgfile_write_bool (f, _T("comp_oldsegv"), p->comp_oldsegv);
        cfgfile_write_str (f, _T("comp_flushmode"), flushmode[p->comp_hardflush]);
+#ifdef USE_JIT_FPU
        cfgfile_write_bool (f, _T("compfpu"), p->compfpu);
+#endif
        cfgfile_write_bool (f, _T("comp_midopt"), p->comp_midopt);
        cfgfile_write_bool (f, _T("comp_lowopt"), p->comp_lowopt);
        cfgfile_write_bool (f, _T("avoid_cmov"), p->avoid_cmov);
@@ -4277,7 +4279,9 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, const TCHAR *option, TCH
                || cfgfile_yesno (option, value, _T("comp_constjump"), &p->comp_constjump)
                || cfgfile_yesno (option, value, _T("comp_oldsegv"), &p->comp_oldsegv)
                || cfgfile_yesno (option, value, _T("compforcesettings"), &dummybool)
+#ifdef USE_JIT_FPU
                || cfgfile_yesno (option, value, _T("compfpu"), &p->compfpu)
+#endif
                || cfgfile_yesno (option, value, _T("comp_midopt"), &p->comp_midopt)
                || cfgfile_yesno (option, value, _T("comp_lowopt"), &p->comp_lowopt)
                || cfgfile_yesno (option, value, _T("rtg_nocustom"), &p->picasso96_nocustom)
@@ -6022,7 +6026,11 @@ void default_prefs (struct uae_prefs *p, int type)
        p->comp_hardflush = 0;
        p->comp_constjump = 1;
        p->comp_oldsegv = 0;
+#ifdef USE_JIT_FPU
        p->compfpu = 1;
+#else
+       p->compfpu = 0;
+#endif
        p->cachesize = 0;
        p->avoid_cmov = 0;
        p->comp_midopt = 0;
index d1f568a8728e5a68405bcdabc9014b7821bf0e3c..d42b6b6b30130d3e2a5206bcc861067542e6a3fd 100644 (file)
@@ -40,10 +40,8 @@ typedef uae_u64 uintptr;
 #else
 typedef uae_u32 uintptr;
 #endif
+/* FIXME: cpummu.cpp also checks for USE_JIT, possibly others */
 #define USE_JIT
-#ifdef CPU_i386
-#define USE_JIT_FPU
-#endif
 #endif
 
 #ifdef USE_JIT
index 6f547da9821c60789e5123b66892e2c50020aa7d..3fdb2f8df08306ba691954e18d4bcda68d1f1807 100644 (file)
@@ -257,7 +257,15 @@ static uae_u32     cache_size                      = 0;            // Size of total cache allocated for compiled
 #endif
 static uae_u32         current_cache_size      = 0;            // Cache grows upwards: how much has been consumed already
 static bool            lazy_flush              = true; // Flag: lazy translation cache invalidation
-static bool            avoid_fpu               = true; // Flag: compile FPU instructions ?
+#ifdef UAE
+#ifdef USE_JIT_FPU
+#define avoid_fpu (!currprefs.compfpu)
+#else
+#define avoid_fpu (true)
+#endif
+#else
+static bool avoid_fpu = true; // Flag: compile FPU instructions ?
+#endif
 static bool            have_cmov               = false;        // target has CMOV instructions ?
 static bool            have_lahf_lm            = true;         // target has LAHF supported in long mode ?
 static bool            have_rat_stall          = true; // target has partial register stalls ?
@@ -3960,13 +3968,6 @@ void build_comp(void)
                prop[cft_map(tbl[i].opcode)].is_addx = isaddx;
 
                bool uses_fpu = (tbl[i].specific & COMP_OPCODE_USES_FPU) != 0;
-#ifdef UAE
-#ifdef USE_JIT_FPU
-               avoid_fpu = false;
-#else
-               avoid_fpu = true;
-#endif
-#endif
                if (uses_fpu && avoid_fpu)
                        compfunctbl[cft_map(tbl[i].opcode)] = NULL;
                else
index 0d3999ec1ef4bbb5166df0336a4c2a214356b87c..fb78fe545b656b5f1dc9d2c093e04864efa6c0cb 100644 (file)
@@ -30,6 +30,7 @@
 #define UAE_FILESYS_THREADS
 #define AUTOCONFIG /* autoconfig support, fast ram, harddrives etc.. */
 #define JIT /* JIT compiler support */
+#define USE_JIT_FPU
 #define NATMEM_OFFSET natmem_offset
 #define USE_NORMAL_CALLING_CONVENTION 0
 #define USE_X86_FPUCW 1