|
|
1.1 ! root 1: /******************************************************************** ! 2: * Preferences handling. This is just a convenient place to put it * ! 3: ********************************************************************/ ! 4: extern bool have_done_picasso; ! 5: ! 6: bool check_prefs_changed_comp (bool checkonly) ! 7: { ! 8: bool changed = 0; ! 9: static int cachesize_prev, comptrust_prev; ! 10: static bool canbang_prev; ! 11: ! 12: if (currprefs.comptrustbyte != changed_prefs.comptrustbyte || ! 13: currprefs.comptrustword != changed_prefs.comptrustword || ! 14: currprefs.comptrustlong != changed_prefs.comptrustlong || ! 15: currprefs.comptrustnaddr!= changed_prefs.comptrustnaddr || ! 16: currprefs.compnf != changed_prefs.compnf || ! 17: currprefs.comp_hardflush != changed_prefs.comp_hardflush || ! 18: currprefs.comp_constjump != changed_prefs.comp_constjump || ! 19: currprefs.compfpu != changed_prefs.compfpu || ! 20: currprefs.fpu_strict != changed_prefs.fpu_strict || ! 21: currprefs.cachesize != changed_prefs.cachesize) ! 22: changed = 1; ! 23: ! 24: if (checkonly) ! 25: return changed; ! 26: ! 27: currprefs.comptrustbyte = changed_prefs.comptrustbyte; ! 28: currprefs.comptrustword = changed_prefs.comptrustword; ! 29: currprefs.comptrustlong = changed_prefs.comptrustlong; ! 30: currprefs.comptrustnaddr= changed_prefs.comptrustnaddr; ! 31: currprefs.compnf = changed_prefs.compnf; ! 32: currprefs.comp_hardflush = changed_prefs.comp_hardflush; ! 33: currprefs.comp_constjump = changed_prefs.comp_constjump; ! 34: currprefs.compfpu = changed_prefs.compfpu; ! 35: currprefs.fpu_strict = changed_prefs.fpu_strict; ! 36: ! 37: if (currprefs.cachesize != changed_prefs.cachesize) { ! 38: if (currprefs.cachesize && !changed_prefs.cachesize) { ! 39: cachesize_prev = currprefs.cachesize; ! 40: comptrust_prev = currprefs.comptrustbyte; ! 41: canbang_prev = canbang; ! 42: } else if (!currprefs.cachesize && changed_prefs.cachesize == cachesize_prev) { ! 43: changed_prefs.comptrustbyte = currprefs.comptrustbyte = comptrust_prev; ! 44: changed_prefs.comptrustword = currprefs.comptrustword = comptrust_prev; ! 45: changed_prefs.comptrustlong = currprefs.comptrustlong = comptrust_prev; ! 46: changed_prefs.comptrustnaddr = currprefs.comptrustnaddr = comptrust_prev; ! 47: } ! 48: currprefs.cachesize = changed_prefs.cachesize; ! 49: alloc_cache(); ! 50: changed = 1; ! 51: } ! 52: ! 53: // Turn off illegal-mem logging when using JIT... ! 54: if(currprefs.cachesize) ! 55: currprefs.illegal_mem = changed_prefs.illegal_mem;// = 0; ! 56: ! 57: if ((!canbang || !currprefs.cachesize) && currprefs.comptrustbyte != 1) { ! 58: // Set all of these to indirect when canbang == 0 ! 59: currprefs.comptrustbyte = 1; ! 60: currprefs.comptrustword = 1; ! 61: currprefs.comptrustlong = 1; ! 62: currprefs.comptrustnaddr= 1; ! 63: ! 64: changed_prefs.comptrustbyte = 1; ! 65: changed_prefs.comptrustword = 1; ! 66: changed_prefs.comptrustlong = 1; ! 67: changed_prefs.comptrustnaddr= 1; ! 68: ! 69: changed = 1; ! 70: ! 71: if (currprefs.cachesize) ! 72: write_log (_T("JIT: Reverting to \"indirect\" access, because canbang is zero!\n")); ! 73: } ! 74: ! 75: if (changed) ! 76: write_log (_T("JIT: cache=%d. b=%d w=%d l=%d fpu=%d nf=%d inline=%d hard=%d\n"), ! 77: currprefs.cachesize, ! 78: currprefs.comptrustbyte, currprefs.comptrustword, currprefs.comptrustlong, ! 79: currprefs.compfpu, currprefs.compnf, currprefs.comp_constjump, currprefs.comp_hardflush); ! 80: ! 81: return changed; ! 82: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.