comparison m68k_to_x86.h @ 558:dc9f178085a0

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.
author Mike Pavone <pavone@retrodev.com>
date Mon, 24 Feb 2014 01:30:16 -0800
parents acec5464fa1e
children 624dd5106060
comparison
equal deleted inserted replaced
557:acec5464fa1e 558:dc9f178085a0
17 #define MAX_NATIVE_SIZE 255 17 #define MAX_NATIVE_SIZE 255
18 18
19 typedef void (*start_fun)(uint8_t * addr, void * context); 19 typedef void (*start_fun)(uint8_t * addr, void * context);
20 20
21 typedef struct { 21 typedef struct {
22 uint32_t flags; 22 cpu_options gen;
23
23 int8_t dregs[8]; 24 int8_t dregs[8];
24 int8_t aregs[8]; 25 int8_t aregs[8];
25 int8_t flag_regs[5]; 26 int8_t flag_regs[5];
26 native_map_slot *native_code_map;
27 deferred_addr *deferred;
28 uint8_t *cur_code;
29 uint8_t *code_end;
30 uint8_t **ram_inst_sizes;
31 FILE *address_log; 27 FILE *address_log;
32 uint8_t *read_16; 28 code_ptr read_16;
33 uint8_t *write_16; 29 code_ptr write_16;
34 uint8_t *read_8; 30 code_ptr read_8;
35 uint8_t *write_8; 31 code_ptr write_8;
36 uint8_t *read_32; 32 code_ptr read_32;
37 uint8_t *write_32_lowfirst; 33 code_ptr write_32_lowfirst;
38 uint8_t *write_32_highfirst; 34 code_ptr write_32_highfirst;
39 uint8_t *handle_cycle_limit; 35 code_ptr do_sync;
40 uint8_t *handle_cycle_limit_int; 36 code_ptr trap;
41 uint8_t *do_sync;
42 uint8_t *trap;
43 uint8_t *save_context;
44 uint8_t *load_context;
45 start_fun start_context; 37 start_fun start_context;
46 uint8_t *retrans_stub; 38 code_ptr retrans_stub;
47 uint8_t *native_addr; 39 code_ptr native_addr;
48 uint8_t *native_addr_and_sync; 40 code_ptr native_addr_and_sync;
49 uint8_t *get_sr; 41 code_ptr get_sr;
50 uint8_t *set_sr; 42 code_ptr set_sr;
51 uint8_t *set_ccr; 43 code_ptr set_ccr;
52 } x86_68k_options; 44 } x86_68k_options;
53 45
54 typedef struct { 46 typedef struct {
55 uint8_t flags[5]; 47 uint8_t flags[5];
56 uint8_t status; 48 uint8_t status;