Mercurial > repos > blastem
comparison m68k_internal.h @ 744:fc68992cf18d
Merge windows branch with latest changes
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 28 May 2015 21:19:55 -0700 |
parents | 7367b14ac01c |
children | f2cd380adebe |
comparison
equal
deleted
inserted
replaced
743:cf78cb045fa4 | 744:fc68992cf18d |
---|---|
8 | 8 |
9 #include "68kinst.h" | 9 #include "68kinst.h" |
10 | 10 |
11 //functions implemented in host CPU specfic file | 11 //functions implemented in host CPU specfic file |
12 void translate_out_of_bounds(code_info *code); | 12 void translate_out_of_bounds(code_info *code); |
13 void check_code_prologue(code_info *code); | |
14 void areg_to_native(m68k_options *opts, uint8_t reg, uint8_t native_reg); | 13 void areg_to_native(m68k_options *opts, uint8_t reg, uint8_t native_reg); |
15 void dreg_to_native(m68k_options *opts, uint8_t reg, uint8_t native_reg); | 14 void dreg_to_native(m68k_options *opts, uint8_t reg, uint8_t native_reg); |
16 void areg_to_native_sx(m68k_options *opts, uint8_t reg, uint8_t native_reg); | 15 void areg_to_native_sx(m68k_options *opts, uint8_t reg, uint8_t native_reg); |
17 void dreg_to_native_sx(m68k_options *opts, uint8_t reg, uint8_t native_reg); | 16 void dreg_to_native_sx(m68k_options *opts, uint8_t reg, uint8_t native_reg); |
18 void native_to_areg(m68k_options *opts, uint8_t native_reg, uint8_t reg); | 17 void native_to_areg(m68k_options *opts, uint8_t native_reg, uint8_t reg); |
30 void add_dreg_native(m68k_options *opts, uint8_t reg, uint8_t native_reg); | 29 void add_dreg_native(m68k_options *opts, uint8_t reg, uint8_t native_reg); |
31 void calc_areg_displace(m68k_options *opts, m68k_op_info *op, uint8_t native_reg); | 30 void calc_areg_displace(m68k_options *opts, m68k_op_info *op, uint8_t native_reg); |
32 void calc_index_disp8(m68k_options *opts, m68k_op_info *op, uint8_t native_reg); | 31 void calc_index_disp8(m68k_options *opts, m68k_op_info *op, uint8_t native_reg); |
33 void calc_areg_index_disp8(m68k_options *opts, m68k_op_info *op, uint8_t native_reg); | 32 void calc_areg_index_disp8(m68k_options *opts, m68k_op_info *op, uint8_t native_reg); |
34 void nop_fill_or_jmp_next(code_info *code, code_ptr old_end, code_ptr next_inst); | 33 void nop_fill_or_jmp_next(code_info *code, code_ptr old_end, code_ptr next_inst); |
34 void check_user_mode_swap_ssp_usp(m68k_options *opts); | |
35 | 35 |
36 //functions implemented in m68k_core.c | 36 //functions implemented in m68k_core.c |
37 int8_t native_reg(m68k_op_info * op, m68k_options * opts); | 37 int8_t native_reg(m68k_op_info * op, m68k_options * opts); |
38 size_t dreg_offset(uint8_t reg); | 38 size_t dreg_offset(uint8_t reg); |
39 size_t areg_offset(uint8_t reg); | 39 size_t areg_offset(uint8_t reg); |
40 size_t reg_offset(m68k_op_info *op); | 40 size_t reg_offset(m68k_op_info *op); |
41 void translate_m68k_op(m68kinst * inst, host_ea * ea, m68k_options * opts, uint8_t dst); | 41 void translate_m68k_op(m68kinst * inst, host_ea * ea, m68k_options * opts, uint8_t dst); |
42 void print_regs_exit(m68k_context * context); | 42 void print_regs_exit(m68k_context * context); |
43 void m68k_read_size(m68k_options *opts, uint8_t size); | 43 void m68k_read_size(m68k_options *opts, uint8_t size); |
44 void m68k_write_size(m68k_options *opts, uint8_t size); | 44 void m68k_write_size(m68k_options *opts, uint8_t size); |
45 void m68k_save_result(m68kinst * inst, m68k_options * opts); | |
45 void push_const(m68k_options *opts, int32_t value); | 46 void push_const(m68k_options *opts, int32_t value); |
46 void jump_m68k_abs(m68k_options * opts, uint32_t address); | 47 void jump_m68k_abs(m68k_options * opts, uint32_t address); |
47 void swap_ssp_usp(m68k_options * opts); | 48 void swap_ssp_usp(m68k_options * opts); |
48 code_ptr get_native_address(native_map_slot * native_code_map, uint32_t address); | 49 code_ptr get_native_address(m68k_options *opts, uint32_t address); |
49 void map_native_address(m68k_context * context, uint32_t address, code_ptr native_addr, uint8_t size, uint8_t native_size); | 50 void map_native_address(m68k_context * context, uint32_t address, code_ptr native_addr, uint8_t size, uint8_t native_size); |
50 uint8_t get_native_inst_size(m68k_options * opts, uint32_t address); | 51 uint8_t get_native_inst_size(m68k_options * opts, uint32_t address); |
51 uint8_t m68k_is_terminal(m68kinst * inst); | 52 uint8_t m68k_is_terminal(m68kinst * inst); |
52 void m68k_handle_deferred(m68k_context * context); | 53 void m68k_handle_deferred(m68k_context * context); |
53 code_ptr get_native_address_trans(m68k_context * context, uint32_t address); | 54 code_ptr get_native_address_trans(m68k_context * context, uint32_t address); |
82 void translate_m68k_andi_ori_ccr_sr(m68k_options *opts, m68kinst *inst); | 83 void translate_m68k_andi_ori_ccr_sr(m68k_options *opts, m68kinst *inst); |
83 void translate_m68k_eori_ccr_sr(m68k_options *opts, m68kinst *inst); | 84 void translate_m68k_eori_ccr_sr(m68k_options *opts, m68kinst *inst); |
84 void translate_m68k_move_ccr_sr(m68k_options *opts, m68kinst *inst, host_ea *src_op, host_ea *dst_op); | 85 void translate_m68k_move_ccr_sr(m68k_options *opts, m68kinst *inst, host_ea *src_op, host_ea *dst_op); |
85 void translate_m68k_stop(m68k_options *opts, m68kinst *inst); | 86 void translate_m68k_stop(m68k_options *opts, m68kinst *inst); |
86 void translate_m68k_move_from_sr(m68k_options *opts, m68kinst *inst, host_ea *src_op, host_ea *dst_op); | 87 void translate_m68k_move_from_sr(m68k_options *opts, m68kinst *inst, host_ea *src_op, host_ea *dst_op); |
87 void translate_m68k_reset(m68k_options *opts, m68kinst *inst); | |
88 void translate_m68k_rte(m68k_options *opts, m68kinst *inst); | |
89 | 88 |
90 //flag update bits | 89 //flag update bits |
91 #define X0 0x0001 | 90 #define X0 0x0001 |
92 #define X1 0x0002 | 91 #define X1 0x0002 |
93 #define X 0x0004 | 92 #define X 0x0004 |