X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=deps%2Flightrec%2Flightrec-private.h;h=3c043d5e93b7327d86c83a29fe4fe68824c46e2c;hb=0b8caa417c2bef660d6a0c70cbab71f1e997023b;hp=87565a636d296868498f598cda734957414a008d;hpb=02487de7ff9fcbb6d7d692a6b3ae6e6539708abc;p=pcsx_rearmed.git diff --git a/deps/lightrec/lightrec-private.h b/deps/lightrec/lightrec-private.h index 87565a63..3c043d5e 100644 --- a/deps/lightrec/lightrec-private.h +++ b/deps/lightrec/lightrec-private.h @@ -43,6 +43,8 @@ #define SET_DEFAULT_ELM(table, value) [0] = NULL #endif +#define fallthrough do {} while (0) /* fall-through */ + /* Flags for (struct block *)->flags */ #define BLOCK_NEVER_COMPILE BIT(0) #define BLOCK_SHOULD_RECOMPILE BIT(1) @@ -67,9 +69,16 @@ struct blockcache; struct recompiler; struct regcache; struct opcode; -struct tinymm; struct reaper; +struct u16x2 { +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + u16 h, l; +#else + u16 l, h; +#endif +}; + struct block { jit_state_t *_jit; struct opcode *opcode_list; @@ -78,6 +87,7 @@ struct block { struct block *next; u32 pc; u32 hash; + u32 precompile_date; unsigned int code_size; u16 nb_ops; u8 flags; @@ -131,7 +141,6 @@ struct lightrec_state { struct block *dispatcher, *c_wrapper_block; void *c_wrappers[C_WRAPPERS_COUNT]; void *wrappers_eps[C_WRAPPERS_COUNT]; - struct tinymm *tinymm; struct blockcache *block_cache; struct recompiler *rec; struct lightrec_cstate *cstate; @@ -207,7 +216,7 @@ static inline void ** lut_address(struct lightrec_state *state, u32 offset) static inline void * lut_read(struct lightrec_state *state, u32 offset) { - void **lut_entry = lut_address(state, lut_offset(offset)); + void **lut_entry = lut_address(state, offset); if (lut_is_32bit(state)) return (void *)(uintptr_t) *(u32 *) lut_entry;