# HG changeset patch # User Mike Pavone # Date 1356678011 28800 # Node ID a0fdaa13496439823eb93146ef135720d2276a4a # Parent a71544cd01ea8364267945953e0706ab1abac94c Use unsigned comparisons for address decoding, exit when we hit an unhandled addressing mode for jmp diff -r a71544cd01ea -r a0fdaa134964 m68k_to_x86.c --- a/m68k_to_x86.c Thu Dec 27 22:48:54 2012 -0800 +++ b/m68k_to_x86.c Thu Dec 27 23:00:11 2012 -0800 @@ -1376,6 +1376,7 @@ break; default: printf("address mode %d not yet supported (jmp)\n", inst->src.addr_mode); + exit(1); } return dst; } diff -r a71544cd01ea -r a0fdaa134964 runtime.S --- a/runtime.S Thu Dec 27 22:48:54 2012 -0800 +++ b/runtime.S Thu Dec 27 23:00:11 2012 -0800 @@ -178,15 +178,15 @@ call inccycles and $0xFFFFFF, %rdi cmp $0x400000, %edi - jle cart_w + jbe cart_w cmp $0xE00000, %edi - jge workram_w + jae workram_w cmp $0xC00000, %edi - jge vdp_psg_w + jae vdp_psg_w cmp $0xA10000, %edi - jl not_io_w + jb not_io_w cmp $0xA12000, %edi - jge not_io_w + jae not_io_w jmp do_io_write_w not_io_w: ret @@ -202,7 +202,7 @@ jnz crash and $0x1F, %edi cmp $4, %edi - jl try_fifo_write + jb try_fifo_write jmp do_vdp_port_write try_fifo_write: push %rdx @@ -245,15 +245,15 @@ call inccycles and $0xFFFFFF, %rdi cmp $0x400000, %edi - jle cart_wb + jbe cart_wb cmp $0xE00000, %edi - jge workram_wb + jae workram_wb cmp $0xC00000, %edi - jge vdp_psg_wb + jae vdp_psg_wb cmp $0xA10000, %edi - jl not_io_wb + jb not_io_wb cmp $0xA12000, %edi - jge not_io_wb + jae not_io_wb jmp do_io_write not_io_wb: ret @@ -318,15 +318,15 @@ call inccycles and $0xFFFFFF, %rcx cmp $0x400000, %ecx - jle cart + jbe cart cmp $0xE00000, %ecx - jge workram + jae workram cmp $0xC00000, %ecx - jge vdp_psg + jae vdp_psg cmp $0xA10000, %ecx - jl not_io + jb not_io cmp $0xA12000, %ecx - jge not_io + jae not_io call do_io_read_w ret not_io: @@ -366,13 +366,13 @@ call inccycles and $0xFFFFFF, %rcx cmp $0x400000, %ecx - jle cart_b + jbe cart_b cmp $0xE00000, %ecx - jge workram_b + jae workram_b cmp $0xA10000, %ecx - jl not_io_b + jb not_io_b cmp $0xA12000, %ecx - jge not_io_b + jae not_io_b jmp do_io_read not_io_b: xor %cl, %cl