summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2013-10-27 08:44:31 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2013-10-27 08:44:31 (GMT)
commit294d13f41d0e3953fd1a8cd91d4401fbb30427e6 (patch)
tree6311362117a5991da16fc27476474f703b892400
parent796eeff64b782b2b83f645a1a57ac684eb5ec76a (diff)
downloadabc80sim-294d13f41d0e3953fd1a8cd91d4401fbb30427e6.zip
abc80sim-294d13f41d0e3953fd1a8cd91d4401fbb30427e6.tar.gz
abc80sim-294d13f41d0e3953fd1a8cd91d4401fbb30427e6.tar.bz2
abc80sim-294d13f41d0e3953fd1a8cd91d4401fbb30427e6.tar.xz
z80: we now have decodes for all bytes, so drop the bailout
According to gcc all cases are now covered, so there is no reason to have a bailout system. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--z80.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/z80.c b/z80.c
index e2d82ec..47531d6 100644
--- a/z80.c
+++ b/z80.c
@@ -47,8 +47,6 @@ static void trace_mem_write_word(uint16_t, uint16_t);
#define mem_write_word trace_mem_write_word
#endif
-static jmp_buf bad_insn;
-
/*
* Tables and routines for computing various flag values:
*/
@@ -2514,20 +2512,9 @@ static void do_ED_instruction(wordregister *ix)
int z80_run(int continuous)
{
uint8_t instruction;
- volatile uint16_t orig_pc = REG_PC;
uint16_t address; /* generic temps */
wordregister *ix;
- if (setjmp(bad_insn)) {
- printf("Unknown Z80 instruction: %04X ", orig_pc);
- for (address = orig_pc; address < REG_PC; address++) {
- printf("%02X ", mem_read(address));
- }
- disassemble(orig_pc);
- putchar('\n');
- exit(1);
- }
-
/* loop to do a z80 instruction */
do {
/*
@@ -2566,7 +2553,6 @@ int z80_run(int continuous)
z80_state.interrupt = FALSE;
}
- orig_pc = REG_PC;
ix = &z80_state.hl; /* Not an index instruction */
indexed:
@@ -3714,11 +3700,6 @@ int z80_run(int continuous)
case 0xAE: /* xor (hl) */
do_xor_byte(mem_read(get_hl_addr(ix)));
break;
-
- default:
- bad:
- longjmp(bad_insn, 1);
- break;
}
} while (continuous);
return 0;