Mercurial > repos > blastem
changeset 2420:1fba97414ba6
Properly handle stack alignment in m68k breakpoint implementation
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 19 Jan 2024 22:30:25 -0800 |
parents | 0871f555eff6 |
children | bcfa5e272f5e |
files | m68k_core_x86.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/m68k_core_x86.c Thu Jan 18 23:03:58 2024 -0800 +++ b/m68k_core_x86.c Fri Jan 19 22:30:25 2024 -0800 @@ -2581,7 +2581,7 @@ mov_ir(&native, address, opts->gen.scratch1, SZ_D); - call(&native, opts->bp_stub); + call_noalign(&native, opts->bp_stub); } void init_m68k_opts(m68k_options * opts, memmap_chunk * memmap, uint32_t num_chunks, uint32_t clock_divider, sync_fun sync_components, int_ack_fun int_ack) @@ -3277,10 +3277,10 @@ opts->prologue_start = *opts->bp_stub; //Calculate length of patch mov_ir(code, 0x1234, opts->gen.scratch1, SZ_D); - call(code, opts->bp_stub); + call_noalign(code, opts->bp_stub); int patch_size = code->cur - opts->bp_stub; code->cur = opts->bp_stub; - code->stack_off = tmp_stack_off; + code->stack_off = tmp_stack_off + sizeof(void*); //Save context and call breakpoint handler call(code, opts->gen.save_context);