diff m68k_core.c @ 894:a7774fc2de4b

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.
author Michael Pavone <pavone@retrodev.com>
date Wed, 25 Nov 2015 08:40:45 -0800
parents 252dfd29831d
children 6011409ded0d
line wrap: on
line diff
--- a/m68k_core.c	Sun Nov 22 14:43:51 2015 -0800
+++ b/m68k_core.c	Wed Nov 25 08:40:45 2015 -0800
@@ -827,6 +827,10 @@
 		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)