From 51733a538cf49a747176d6dcd34a16ec86a1a0b6 Mon Sep 17 00:00:00 2001 From: Frode Solheim Date: Mon, 7 Sep 2015 21:18:32 +0200 Subject: [PATCH] JIT: USE_INLINING and related changes --- jit/compemu.h | 30 ++++++++++++++++++++++++------ jit/compemu_support.cpp | 7 ++++++- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/jit/compemu.h b/jit/compemu.h index 41214ce8..faa4d192 100644 --- a/jit/compemu.h +++ b/jit/compemu.h @@ -50,7 +50,10 @@ typedef uae_u32 uintptr; extern void compiler_dumpstate(void); #endif -#define TAGMASK 0x000fffff +/* Now that we do block chaining, and also have linked lists on each tag, + TAGMASK can be much smaller and still do its job. Saves several megs + of memory! */ +#define TAGMASK 0x0000ffff #define TAGSIZE (TAGMASK+1) #define MAXRUN 1024 #define cacheline(x) (((uintptr)x)&TAGMASK) @@ -76,8 +79,27 @@ union cacheline { #error implementation in progress #endif +/* (gb) When on, this option can save save up to 30% compilation time + * when many lazy flushes occur (e.g. apps in MacOS 8.x). + */ +#define USE_SEPARATE_BIA 1 + +/* Use chain of checksum_info_t to compute the block checksum */ +#define USE_CHECKSUM_INFO 1 + +/* Use code inlining, aka follow-up of constant jumps */ +#define USE_INLINING 1 + +/* Inlining requires the chained checksuming information */ +#if USE_INLINING +#undef USE_CHECKSUM_INFO +#define USE_CHECKSUM_INFO 1 +#endif + +/* Does flush_icache_range() only check for blocks falling in the requested range? */ +#define LAZY_FLUSH_ICACHE_RANGE 0 + #define USE_F_ALIAS 1 -#define USE_SOFT_FLUSH 1 #define USE_OFFSET 1 #define COMP_DEBUG 1 @@ -423,10 +445,6 @@ static inline void build_comp() { } #ifdef UAE -#define BI_NEW 0 -#define BI_COUNTING 1 -#define BI_TARGETTED 2 - typedef struct { uae_u8 type; uae_u8 reg; diff --git a/jit/compemu_support.cpp b/jit/compemu_support.cpp index 3ac23243..4e7fa3b7 100644 --- a/jit/compemu_support.cpp +++ b/jit/compemu_support.cpp @@ -252,7 +252,12 @@ static int optcount[10] = { }; #ifdef UAE -/* FIXME: currently in compemu.h */ +/* FIXME: op_properties is currently in compemu.h */ + +static inline bool is_const_jump(uae_u32 opcode) +{ + return prop[opcode].is_const_jump != 0; +} #else struct op_properties { uae_u8 use_flags; -- 2.47.3