Previous 199869 Revisions Next

r20605 Tuesday 29th January, 2013 at 23:27:08 UTC by Angelo Salese
Illegal opcode is the start of the undefined address
[src/emu/cpu/sh2]sh2.c

trunk/src/emu/cpu/sh2/sh2.c
r20604r20605
848848/*  ILLEGAL */
849849INLINE void ILLEGAL(sh2_state *sh2)
850850{
851   logerror("SH2.%s: Illegal opcode at %08x\n", sh2->device->tag(), sh2->pc);
851   logerror("SH2.%s: Illegal opcode at %08x\n", sh2->device->tag(), sh2->pc - 2);
852852   sh2->r[15] -= 4;
853853   WL( sh2, sh2->r[15], sh2->sr );     /* push SR onto stack */
854854   sh2->r[15] -= 4;
855   WL( sh2, sh2->r[15], sh2->pc );    /* push PC onto stack */
855   WL( sh2, sh2->r[15], sh2->pc - 2 ); /* push PC onto stack */
856856
857857   /* fetch PC */
858858   sh2->pc = RL( sh2, sh2->vbr + 4 * 4 );

Previous 199869 Revisions Next


© 1997-2024 The MAME Team