}
else
{
- u32 newPC = (u32)(PC) - BasePC;
- SET_PC(newPC-2);
- execute_exception(M68K_PRIVILEGE_VIOLATION_EX);
+ SET_PC(execute_exception(M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
#ifdef USE_CYCLONE_TIMING
RET(0)
#else
}
else
{
- u32 newPC = (u32)(PC) - BasePC;
- SET_PC(newPC-2);
- execute_exception(M68K_PRIVILEGE_VIOLATION_EX);
+ SET_PC(execute_exception(M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
RET(4)
}
RET(20)
}
else
{
- u32 newPC = (u32)(PC) - BasePC;
- SET_PC(newPC-2);
- execute_exception(M68K_PRIVILEGE_VIOLATION_EX);
+ SET_PC(execute_exception(M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
RET(0)
}
RET(20)
}
else
{
- u32 oldPC=GET_PC;
- SET_PC(oldPC-2)
- execute_exception(M68K_PRIVILEGE_VIOLATION_EX);
+ SET_PC(execute_exception(M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
RET(4)
}
RET(12)
}
else
{
- u32 oldPC=GET_PC;
- SET_PC(oldPC-2)
- execute_exception(M68K_PRIVILEGE_VIOLATION_EX);
+ SET_PC(execute_exception(M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
RET(4)
}
RET(16)
}
else
{
- u32 oldPC=GET_PC;
- SET_PC(oldPC-2)
- execute_exception(M68K_PRIVILEGE_VIOLATION_EX);
+ SET_PC(execute_exception(M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
RET(4)
}
RET(16)
}
else
{
- u32 oldPC=GET_PC;
- SET_PC(oldPC-2)
- execute_exception(M68K_PRIVILEGE_VIOLATION_EX);
+ SET_PC(execute_exception(M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
RET(4)
}
RET(18)
}
else
{
- u32 oldPC=GET_PC;
- SET_PC(oldPC-2)
- execute_exception(M68K_PRIVILEGE_VIOLATION_EX);
+ SET_PC(execute_exception(M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
RET(4)
}
RET(20)
}
else
{
- u32 oldPC=GET_PC;
- SET_PC(oldPC-2)
- execute_exception(M68K_PRIVILEGE_VIOLATION_EX);
+ SET_PC(execute_exception(M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
RET(4)
}
RET(22)
}
else
{
- u32 oldPC=GET_PC;
- SET_PC(oldPC-2)
- execute_exception(M68K_PRIVILEGE_VIOLATION_EX);
+ SET_PC(execute_exception(M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
RET(4)
}
RET(20)
}
else
{
- u32 oldPC=GET_PC;
- SET_PC(oldPC-2)
- execute_exception(M68K_PRIVILEGE_VIOLATION_EX);
+ SET_PC(execute_exception(M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
RET(4)
}
RET(24)
ASP = res;
}
POST_IO
- CHECK_INT_TO_JUMP(24)
+ CHECK_INT_TO_JUMP(20)
}
else
{
- u32 oldPC=GET_PC;
- SET_PC(oldPC-2)
- execute_exception(M68K_PRIVILEGE_VIOLATION_EX);
+ SET_PC(execute_exception(M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
RET(4)
}
RET(20)
}
else
{
- u32 oldPC=GET_PC;
- SET_PC(oldPC-2)
- execute_exception(M68K_PRIVILEGE_VIOLATION_EX);
+ SET_PC(execute_exception(M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
RET(4)
}
RET(22)
}
else
{
- u32 oldPC=GET_PC;
- SET_PC(oldPC-2)
- execute_exception(M68K_PRIVILEGE_VIOLATION_EX);
+ SET_PC(execute_exception(M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
RET(4)
}
RET(16)
}
else
{
- u32 oldPC=GET_PC;
- SET_PC(oldPC-2)
- execute_exception(M68K_PRIVILEGE_VIOLATION_EX);
+ SET_PC(execute_exception(M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
RET(4)
}
RET(16)
}
else
{
- u32 oldPC=GET_PC;
- SET_PC(oldPC-2)
- execute_exception(M68K_PRIVILEGE_VIOLATION_EX);
+ SET_PC(execute_exception(M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
RET(4)
}
RET(18)
// ILLEGAL
OPCODE(0x4AFC)
{
- u32 oldPC=GET_PC;
- SET_PC(oldPC-2)
- execute_exception(M68K_ILLEGAL_INSTRUCTION_EX);
+ SET_PC(execute_exception(M68K_ILLEGAL_INSTRUCTION_EX, GET_PC-2, GET_SR));
RET(0)
}
// ILLEGAL A000-AFFF
OPCODE(0xA000)
{
- u32 oldPC=GET_PC;
- SET_PC(oldPC-2)
- execute_exception(M68K_1010_EX);
+ SET_PC(execute_exception(M68K_1010_EX, GET_PC-2, GET_SR));
RET(0)
}
// ILLEGAL F000-FFFF
OPCODE(0xF000)
{
- u32 oldPC=GET_PC;
- SET_PC(oldPC-2)
- execute_exception(M68K_1111_EX);
+ SET_PC(execute_exception(M68K_1111_EX, GET_PC-2, GET_SR));
RET(0) // 4 already taken by exc. handler
}
// TRAP
OPCODE(0x4E40)
{
- execute_exception(M68K_TRAP_BASE_EX + (Opcode & 0xF));
+ SET_PC(execute_exception(M68K_TRAP_BASE_EX + (Opcode & 0xF), GET_PC, GET_SR));
RET(4)
}
if (!flag_S)
{
- u32 oldPC=GET_PC;
- SET_PC(oldPC-2)
- execute_exception(M68K_PRIVILEGE_VIOLATION_EX);
+ SET_PC(execute_exception(M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
RET(4)
}
res = AREGu32((Opcode >> 0) & 7);
if (!flag_S)
{
- u32 oldPC=GET_PC;
- SET_PC(oldPC-2)
- execute_exception(M68K_PRIVILEGE_VIOLATION_EX);
+ SET_PC(execute_exception(M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
RET(4)
}
res = ASP;
if (!flag_S)
{
- u32 oldPC=GET_PC;
- SET_PC(oldPC-2)
- execute_exception(M68K_PRIVILEGE_VIOLATION_EX);
+ SET_PC(execute_exception(M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
RET(4)
}
PRE_IO
if (!flag_S)
{
- u32 oldPC=GET_PC;
- SET_PC(oldPC-2)
- execute_exception(M68K_PRIVILEGE_VIOLATION_EX);
+ SET_PC(execute_exception(M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
RET(4)
}
FETCH_WORD(res);
if (!flag_S)
{
- u32 oldPC=GET_PC;
- SET_PC(oldPC-2)
- execute_exception(M68K_PRIVILEGE_VIOLATION_EX);
+ SET_PC(execute_exception(M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
RET(4)
}
PRE_IO
OPCODE(0x4E76)
{
if (flag_V & 0x80)
- execute_exception(M68K_TRAPV_EX);
+ SET_PC(execute_exception(M68K_TRAPV_EX, GET_PC, GET_SR));
RET(4)
}
if (((s32)res < 0) || (res > src))
{
flag_N = res >> 8;
- execute_exception(M68K_CHK_EX);
+ SET_PC(execute_exception(M68K_CHK_EX, GET_PC, GET_SR));
}
RET(10)
}
if (((s32)res < 0) || (res > src))
{
flag_N = res >> 8;
- execute_exception(M68K_CHK_EX);
+ SET_PC(execute_exception(M68K_CHK_EX, GET_PC, GET_SR));
}
POST_IO
RET(14)
if (((s32)res < 0) || (res > src))
{
flag_N = res >> 8;
- execute_exception(M68K_CHK_EX);
+ SET_PC(execute_exception(M68K_CHK_EX, GET_PC, GET_SR));
}
POST_IO
RET(14)
if (((s32)res < 0) || (res > src))
{
flag_N = res >> 8;
- execute_exception(M68K_CHK_EX);
+ SET_PC(execute_exception(M68K_CHK_EX, GET_PC, GET_SR));
}
POST_IO
RET(16)
if (((s32)res < 0) || (res > src))
{
flag_N = res >> 8;
- execute_exception(M68K_CHK_EX);
+ SET_PC(execute_exception(M68K_CHK_EX, GET_PC, GET_SR));
}
POST_IO
RET(18)
if (((s32)res < 0) || (res > src))
{
flag_N = res >> 8;
- execute_exception(M68K_CHK_EX);
+ SET_PC(execute_exception(M68K_CHK_EX, GET_PC, GET_SR));
}
POST_IO
RET(20)
if (((s32)res < 0) || (res > src))
{
flag_N = res >> 8;
- execute_exception(M68K_CHK_EX);
+ SET_PC(execute_exception(M68K_CHK_EX, GET_PC, GET_SR));
}
POST_IO
RET(18)
if (((s32)res < 0) || (res > src))
{
flag_N = res >> 8;
- execute_exception(M68K_CHK_EX);
+ SET_PC(execute_exception(M68K_CHK_EX, GET_PC, GET_SR));
}
POST_IO
RET(22)
if (((s32)res < 0) || (res > src))
{
flag_N = res >> 8;
- execute_exception(M68K_CHK_EX);
+ SET_PC(execute_exception(M68K_CHK_EX, GET_PC, GET_SR));
}
POST_IO
RET(18)
if (((s32)res < 0) || (res > src))
{
flag_N = res >> 8;
- execute_exception(M68K_CHK_EX);
+ SET_PC(execute_exception(M68K_CHK_EX, GET_PC, GET_SR));
}
POST_IO
RET(20)
if (((s32)res < 0) || (res > src))
{
flag_N = res >> 8;
- execute_exception(M68K_CHK_EX);
+ SET_PC(execute_exception(M68K_CHK_EX, GET_PC, GET_SR));
}
POST_IO
RET(14)
if (((s32)res < 0) || (res > src))
{
flag_N = res >> 8;
- execute_exception(M68K_CHK_EX);
+ SET_PC(execute_exception(M68K_CHK_EX, GET_PC, GET_SR));
}
POST_IO
RET(14)
if (((s32)res < 0) || (res > src))
{
flag_N = res >> 8;
- execute_exception(M68K_CHK_EX);
+ SET_PC(execute_exception(M68K_CHK_EX, GET_PC, GET_SR));
}
POST_IO
RET(16)
src = DREGu16((Opcode >> 0) & 7);
if (src == 0)
{
- execute_exception(M68K_ZERO_DIVIDE_EX);
+ SET_PC(execute_exception(M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
RET(140)
#else
READ_WORD_F(adr, src)
if (src == 0)
{
- execute_exception(M68K_ZERO_DIVIDE_EX);
+ SET_PC(execute_exception(M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
RET(144)
#else
READ_WORD_F(adr, src)
if (src == 0)
{
- execute_exception(M68K_ZERO_DIVIDE_EX);
+ SET_PC(execute_exception(M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
RET(144)
#else
READ_WORD_F(adr, src)
if (src == 0)
{
- execute_exception(M68K_ZERO_DIVIDE_EX);
+ SET_PC(execute_exception(M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
RET(146)
#else
READ_WORD_F(adr, src)
if (src == 0)
{
- execute_exception(M68K_ZERO_DIVIDE_EX);
+ SET_PC(execute_exception(M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
RET(148)
#else
READ_WORD_F(adr, src)
if (src == 0)
{
- execute_exception(M68K_ZERO_DIVIDE_EX);
+ SET_PC(execute_exception(M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
RET(150)
#else
READ_WORD_F(adr, src)
if (src == 0)
{
- execute_exception(M68K_ZERO_DIVIDE_EX);
+ SET_PC(execute_exception(M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
RET(148)
#else
READ_WORD_F(adr, src)
if (src == 0)
{
- execute_exception(M68K_ZERO_DIVIDE_EX);
+ SET_PC(execute_exception(M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
RET(162)
#else
READ_WORD_F(adr, src)
if (src == 0)
{
- execute_exception(M68K_ZERO_DIVIDE_EX);
+ SET_PC(execute_exception(M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
RET(148)
#else
READ_WORD_F(adr, src)
if (src == 0)
{
- execute_exception(M68K_ZERO_DIVIDE_EX);
+ SET_PC(execute_exception(M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
RET(160)
#else
FETCH_WORD(src);
if (src == 0)
{
- execute_exception(M68K_ZERO_DIVIDE_EX);
+ SET_PC(execute_exception(M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
RET(144)
#else
READ_WORD_F(adr, src)
if (src == 0)
{
- execute_exception(M68K_ZERO_DIVIDE_EX);
+ SET_PC(execute_exception(M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
RET(144)
#else
READ_WORD_F(adr, src)
if (src == 0)
{
- execute_exception(M68K_ZERO_DIVIDE_EX);
+ SET_PC(execute_exception(M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
RET(146)
#else
src = (s32)DREGs16((Opcode >> 0) & 7);
if (src == 0)
{
- execute_exception(M68K_ZERO_DIVIDE_EX);
+ SET_PC(execute_exception(M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
goto end81C0;
#endif
READSX_WORD_F(adr, src)
if (src == 0)
{
- execute_exception(M68K_ZERO_DIVIDE_EX);
+ SET_PC(execute_exception(M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
goto end81D0;
#endif
READSX_WORD_F(adr, src)
if (src == 0)
{
- execute_exception(M68K_ZERO_DIVIDE_EX);
+ SET_PC(execute_exception(M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
goto end81D8;
#endif
READSX_WORD_F(adr, src)
if (src == 0)
{
- execute_exception(M68K_ZERO_DIVIDE_EX);
+ SET_PC(execute_exception(M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
goto end81E0;
#endif
READSX_WORD_F(adr, src)
if (src == 0)
{
- execute_exception(M68K_ZERO_DIVIDE_EX);
+ SET_PC(execute_exception(M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
goto end81E8;
#endif
READSX_WORD_F(adr, src)
if (src == 0)
{
- execute_exception(M68K_ZERO_DIVIDE_EX);
+ SET_PC(execute_exception(M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
goto end81F0;
#endif
READSX_WORD_F(adr, src)
if (src == 0)
{
- execute_exception(M68K_ZERO_DIVIDE_EX);
+ SET_PC(execute_exception(M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
goto end81F8;
#endif
READSX_WORD_F(adr, src)
if (src == 0)
{
- execute_exception(M68K_ZERO_DIVIDE_EX);
+ SET_PC(execute_exception(M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
goto end81F9;
#endif
READSX_WORD_F(adr, src)
if (src == 0)
{
- execute_exception(M68K_ZERO_DIVIDE_EX);
+ SET_PC(execute_exception(M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
goto end81FA;
#endif
READSX_WORD_F(adr, src)
if (src == 0)
{
- execute_exception(M68K_ZERO_DIVIDE_EX);
+ SET_PC(execute_exception(M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
goto end81FB;
#endif
FETCH_SWORD(src);
if (src == 0)
{
- execute_exception(M68K_ZERO_DIVIDE_EX);
+ SET_PC(execute_exception(M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
goto end81FC;
#endif
READSX_WORD_F(adr, src)
if (src == 0)
{
- execute_exception(M68K_ZERO_DIVIDE_EX);
+ SET_PC(execute_exception(M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
goto end81DF;
#endif
READSX_WORD_F(adr, src)
if (src == 0)
{
- execute_exception(M68K_ZERO_DIVIDE_EX);
+ SET_PC(execute_exception(M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
goto end81E7;
#endif
res = dst - src;
AREG((Opcode >> 9) & 7) = res;
POST_IO
+#ifdef USE_CYCLONE_TIMING
+RET(12)
+#else
RET(10)
+#endif
}
// SUBA
res = dst - src;
AREG((Opcode >> 9) & 7) = res;
POST_IO
+#ifdef USE_CYCLONE_TIMING
+RET(12)
+#else
RET(10)
+#endif
}
// SUBA
res = dst - src;
AREG((Opcode >> 9) & 7) = res;
POST_IO
+#ifdef USE_CYCLONE_TIMING
+RET(14)
+#else
RET(12)
+#endif
}
// SUBA
res = dst - src;
AREG((Opcode >> 9) & 7) = res;
POST_IO
+#ifdef USE_CYCLONE_TIMING
+RET(16)
+#else
RET(14)
+#endif
}
// SUBA
res = dst - src;
AREG((Opcode >> 9) & 7) = res;
POST_IO
+#ifdef USE_CYCLONE_TIMING
+RET(18)
+#else
RET(16)
+#endif
}
// SUBA
res = dst - src;
AREG((Opcode >> 9) & 7) = res;
POST_IO
+#ifdef USE_CYCLONE_TIMING
+RET(16)
+#else
RET(14)
+#endif
}
// SUBA
res = dst - src;
AREG((Opcode >> 9) & 7) = res;
POST_IO
+#ifdef USE_CYCLONE_TIMING
+RET(20)
+#else
RET(18)
+#endif
}
// SUBA
res = dst - src;
AREG((Opcode >> 9) & 7) = res;
POST_IO
+#ifdef USE_CYCLONE_TIMING
+RET(16)
+#else
RET(14)
+#endif
}
// SUBA
res = dst - src;
AREG((Opcode >> 9) & 7) = res;
POST_IO
+#ifdef USE_CYCLONE_TIMING
+RET(18)
+#else
RET(16)
+#endif
}
// SUBA
res = dst - src;
AREG((Opcode >> 9) & 7) = res;
POST_IO
+#ifdef USE_CYCLONE_TIMING
+RET(12)
+#else
RET(10)
+#endif
}
// SUBA
res = dst - src;
AREG((Opcode >> 9) & 7) = res;
POST_IO
+#ifdef USE_CYCLONE_TIMING
+RET(14)
+#else
RET(12)
+#endif
}
// SUBA