From 14c0b3e916d866601311f9bbe53ab64ed560f67f Mon Sep 17 00:00:00 2001 From: Mike Pavone Date: Mon, 24 Feb 2014 01:30:16 -0800 Subject: Use a typedef code_ptr in place of uint8_t * in 68K core to better support host instruction sets with different instruction word sizes. Make x86_68k_options contain a cpu_options so that gen_mem_fun can eventually be shared with the Z80 core. --- backend.h | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'backend.h') diff --git a/backend.h b/backend.h index d16a80b..d35a1ec 100644 --- a/backend.h +++ b/backend.h @@ -20,6 +20,12 @@ typedef struct { uint8_t cycles; } x86_ea; +#if defined(X86_64) || defined(X86_32) +typedef uint8_t* code_ptr; +#else +typedef uint32_t* code_ptr; +#endif + typedef struct { uint8_t *base; int32_t *offsets; @@ -27,7 +33,7 @@ typedef struct { typedef struct deferred_addr { struct deferred_addr *next; - uint8_t *dest; + code_ptr dest; uint32_t address; } deferred_addr; @@ -42,14 +48,13 @@ typedef struct { uint32_t flags; native_map_slot *native_code_map; deferred_addr *deferred; - uint8_t *cur_code; - uint8_t *code_end; + code_ptr cur_code; + code_ptr code_end; uint8_t **ram_inst_sizes; - FILE *address_log; - uint8_t *save_context; - uint8_t *load_context; - uint8_t *handle_cycle_limit; - uint8_t *handle_cycle_limit_int; + code_ptr save_context; + code_ptr load_context; + code_ptr handle_cycle_limit; + code_ptr handle_cycle_limit_int; uint8_t context_reg; uint8_t scratch1; uint8_t scratch2; -- cgit v1.2.3