summaryrefslogtreecommitdiff
path: root/backend.h
diff options
context:
space:
mode:
authorMike Pavone <pavone@retrodev.com>2014-02-24 01:30:16 -0800
committerMike Pavone <pavone@retrodev.com>2014-02-24 01:30:16 -0800
commit14c0b3e916d866601311f9bbe53ab64ed560f67f (patch)
tree015e3c591d1c092c20bbc940f0e1b5d10be4a9c6 /backend.h
parentfcf5fcfccb16b87e69b3ce9dd8dc74dbbaf426db (diff)
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.
Diffstat (limited to 'backend.h')
-rw-r--r--backend.h21
1 files changed, 13 insertions, 8 deletions
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;