2 |
|
#error "Only Real or Direct Addressing is supported with the JIT Compiler" |
3 |
|
#endif |
4 |
|
|
5 |
+ |
#if X86_ASSEMBLY && !SAHF_SETO_PROFITABLE |
6 |
+ |
#error "Only [LS]AHF scheme to [gs]et flags is supported with the JIT Compiler" |
7 |
+ |
#endif |
8 |
+ |
|
9 |
|
#define USE_MATCH 0 |
10 |
|
|
11 |
|
/* kludge for Brian, so he can compile under MSVC++ */ |
83 |
|
|
84 |
|
const uae_u32 MIN_CACHE_SIZE = 2048; // Minimal translation cache size (2048 KB) |
85 |
|
static uae_u32 cache_size = 0; // Size of total cache allocated for compiled blocks |
86 |
< |
static uae_u32 current_cache_size = 0; // Cache grows upwards: how much has been consumed yet |
86 |
> |
static uae_u32 current_cache_size = 0; // Cache grows upwards: how much has been consumed already |
87 |
|
static bool lazy_flush = true; // Flag: lazy translation cache invalidation |
88 |
|
static bool avoid_fpu = true; // Flag: compile FPU instructions ? |
89 |
|
static bool have_cmov = false; // target has CMOV instructions ? |
4593 |
|
|
4594 |
|
// Deallocate translation cache |
4595 |
|
if (compiled_code) { |
4596 |
< |
#ifndef WIN32 |
4593 |
< |
munmap((caddr_t)compiled_code, cache_size); |
4594 |
< |
#else |
4595 |
< |
free(compiled_code); |
4596 |
< |
#endif |
4596 |
> |
vm_release(compiled_code, cache_size * 1024); |
4597 |
|
compiled_code = 0; |
4598 |
|
} |
4599 |
|
|
5145 |
|
{ |
5146 |
|
if (compiled_code) { |
5147 |
|
flush_icache_hard(6); |
5148 |
< |
#ifndef WIN32 |
5149 |
< |
munmap((caddr_t)compiled_code, cache_size*1024); |
5150 |
< |
#else |
5151 |
< |
free(compiled_code); |
5152 |
< |
#endif |
5148 |
> |
vm_release(compiled_code, cache_size * 1024); |
5149 |
|
compiled_code = 0; |
5150 |
|
} |
5151 |
|
|