Mercurial > repos > blastem
diff m68k_to_x86.c @ 208:3457dc6fd558
Tweaks to make blastem compatible with m68k-tester
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 26 Jan 2013 01:33:32 -0800 |
parents | c82f65a87a53 |
children | 922b59c09259 |
line wrap: on
line diff
--- a/m68k_to_x86.c Fri Jan 25 18:39:22 2013 -0800 +++ b/m68k_to_x86.c Sat Jan 26 01:33:32 2013 -0800 @@ -1,5 +1,6 @@ #include "gen_x86.h" #include "m68k_to_x86.h" +#include "68kinst.h" #include "mem.h" #include <stdio.h> #include <stddef.h> @@ -2804,6 +2805,9 @@ } else if(inst->op == M68K_MOVEP) { return translate_m68k_movep(dst, inst, opts); } else if(inst->op == M68K_INVALID) { + if (inst->src.params.immed == 0x7100) { + return retn(dst); + } dst = mov_ir(dst, inst->address, SCRATCH1, SZ_D); return call(dst, (uint8_t *)m68k_invalid); } else if(inst->op == M68K_CMP) { @@ -2962,7 +2966,6 @@ break; case M68K_ASL: case M68K_LSL: - //TODO: Check overflow flag behavior dst = translate_shift(dst, inst, &src_op, &dst_op, opts, shl_ir, shl_irdisp8, shl_clr, shl_clrdisp8, shr_ir, shr_irdisp8); break; case M68K_ASR: @@ -3864,6 +3867,9 @@ break; } next = m68k_decode(encoded, &instbuf, address); + if (instbuf.op == M68K_INVALID) { + instbuf.src.params.immed = *encoded; + } uint16_t m68k_size = (next-encoded)*2; address += m68k_size; encoded = next;