Mercurial > repos > blastem
comparison m68k_to_x86.c @ 177:09761d4391e1
Make sure we bail out of translation after translating an invalid instruction
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 06 Jan 2013 21:44:54 -0800 |
parents | e2918b5208eb |
children | 48eb62ba63bc |
comparison
equal
deleted
inserted
replaced
176:e2918b5208eb | 177:09761d4391e1 |
---|---|
3522 address += (next-encoded)*2; | 3522 address += (next-encoded)*2; |
3523 encoded = next; | 3523 encoded = next; |
3524 //m68k_disasm(&instbuf, disbuf); | 3524 //m68k_disasm(&instbuf, disbuf); |
3525 //printf("%X: %s\n", instbuf.address, disbuf); | 3525 //printf("%X: %s\n", instbuf.address, disbuf); |
3526 dst = translate_m68k(dst, &instbuf, opts); | 3526 dst = translate_m68k(dst, &instbuf, opts); |
3527 } while(instbuf.op != M68K_ILLEGAL && instbuf.op != M68K_TRAP && instbuf.op != M68K_RTS && instbuf.op != M68K_RTR && instbuf.op != M68K_RTE && !(instbuf.op == M68K_BCC && instbuf.extra.cond == COND_TRUE) && instbuf.op != M68K_JMP); | 3527 } while(instbuf.op != M68K_ILLEGAL && instbuf.op != M68K_INVALID && instbuf.op != M68K_TRAP && instbuf.op != M68K_RTS && instbuf.op != M68K_RTR && instbuf.op != M68K_RTE && !(instbuf.op == M68K_BCC && instbuf.extra.cond == COND_TRUE) && instbuf.op != M68K_JMP); |
3528 process_deferred(opts); | 3528 process_deferred(opts); |
3529 if (opts->deferred) { | 3529 if (opts->deferred) { |
3530 address = opts->deferred->address; | 3530 address = opts->deferred->address; |
3531 if ((address & 0xFFFFFF) < 0x400000) { | 3531 if ((address & 0xFFFFFF) < 0x400000) { |
3532 encoded = context->mem_pointers[0] + (address & 0xFFFFFF)/2; | 3532 encoded = context->mem_pointers[0] + (address & 0xFFFFFF)/2; |