From 77f239c97ce5d496998c3b8a07d84d27b5d5984f Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Wed, 25 Nov 2015 08:40:45 -0800 Subject: Partially working change to do proper stack alignment rather than doing a lame alignment check when calling a C compile dfunction. 68K core seems okay, but Z80 is busted. --- m68k_core.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'm68k_core.c') diff --git a/m68k_core.c b/m68k_core.c index 6a7283f..f751fe8 100644 --- a/m68k_core.c +++ b/m68k_core.c @@ -827,6 +827,10 @@ void translate_m68k(m68k_options * opts, m68kinst * inst) m68k_disasm(inst, disasm_buf); fatal_error("%X: %s\ninstruction %d not yet implemented\n", inst->address, disasm_buf, inst->op); } + if (opts->gen.code.stack_off) { + m68k_disasm(inst, disasm_buf); + fatal_error("Stack offset is %X after %X: %s\n", opts->gen.code.stack_off, inst->address, disasm_buf); + } } void translate_m68k_stream(uint32_t address, m68k_context * context) -- cgit v1.2.3