comparison m68k_core_x86.c @ 1111:2eb54e24914e

Mostly working changes to allow support for multiple emulated system types in main blastem program
author Michael Pavone <pavone@retrodev.com>
date Mon, 19 Dec 2016 13:28:18 -0800
parents faa3a4617f62
children 8f14767661fa
comparison
equal deleted inserted replaced
1110:d1eed3b1121c 1111:2eb54e24914e
2287 jmp(&orig, options->retrans_stub); 2287 jmp(&orig, options->retrans_stub);
2288 } 2288 }
2289 return context; 2289 return context;
2290 } 2290 }
2291 2291
2292 void insert_breakpoint(m68k_context * context, uint32_t address, code_ptr bp_handler) 2292 void insert_breakpoint(m68k_context * context, uint32_t address, m68k_debug_handler bp_handler)
2293 { 2293 {
2294 static code_ptr bp_stub = NULL; 2294 static code_ptr bp_stub = NULL;
2295 m68k_options * opts = context->options; 2295 m68k_options * opts = context->options;
2296 code_info native; 2296 code_info native;
2297 native.cur = get_native_address_trans(context, address); 2297 native.cur = get_native_address_trans(context, address);
2313 code->stack_off = tmp_stack_off; 2313 code->stack_off = tmp_stack_off;
2314 2314
2315 //Save context and call breakpoint handler 2315 //Save context and call breakpoint handler
2316 call(code, opts->gen.save_context); 2316 call(code, opts->gen.save_context);
2317 push_r(code, opts->gen.scratch1); 2317 push_r(code, opts->gen.scratch1);
2318 call_args_abi(code, bp_handler, 2, opts->gen.context_reg, opts->gen.scratch1); 2318 call_args_abi(code, (code_ptr)bp_handler, 2, opts->gen.context_reg, opts->gen.scratch1);
2319 mov_rr(code, RAX, opts->gen.context_reg, SZ_PTR); 2319 mov_rr(code, RAX, opts->gen.context_reg, SZ_PTR);
2320 //Restore context 2320 //Restore context
2321 call(code, opts->gen.load_context); 2321 call(code, opts->gen.load_context);
2322 pop_r(code, opts->gen.scratch1); 2322 pop_r(code, opts->gen.scratch1);
2323 //do prologue stuff 2323 //do prologue stuff