flag_NotZ = res;
flag_N = res >> 24;
DREGu32((Opcode >> 0) & 7) = res;
-#ifdef USE_CYCLONE_TIMING
-RET(14)
-#else
RET(16)
-#endif
}
// ANDI
else
{
SET_PC(execute_exception(ctx, M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
+#ifdef USE_CYCLONE_TIMING
+ RET(0)
+#else
RET(4)
+#endif
}
RET(20)
}
else
{
SET_PC(execute_exception(ctx, M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
+#ifdef USE_CYCLONE_TIMING
RET(0)
+#else
+ RET(4)
+#endif
}
RET(20)
}
flag_NotZ = res & src;
res ^= src;
DREGu32((Opcode >> 0) & 7) = res;
+#ifdef USE_CYCLONE_TIMING
+ if (src >> 16) ctx->io_cycle_counter -= 2;
+RET(10)
+#else
RET(12)
+#endif
}
// BCHGn
flag_NotZ = res & src;
res &= ~src;
DREGu32((Opcode >> 0) & 7) = res;
+#ifdef USE_CYCLONE_TIMING
+ if (src >> 16) ctx->io_cycle_counter -= 2;
+RET(12)
+#else
RET(14)
+#endif
}
// BCLRn
flag_NotZ = res & src;
res |= src;
DREGu32((Opcode >> 0) & 7) = res;
+#ifdef USE_CYCLONE_TIMING
+ if (src >> 16) ctx->io_cycle_counter -= 2;
+RET(10)
+#else
RET(12)
+#endif
}
// BSETn
flag_NotZ = res & src;
res ^= src;
DREGu32((Opcode >> 0) & 7) = res;
+#ifdef USE_CYCLONE_TIMING
+ if (src >> 16) ctx->io_cycle_counter -= 2;
+RET(6)
+#else
RET(8)
+#endif
}
// BCHG
flag_NotZ = res & src;
res &= ~src;
DREGu32((Opcode >> 0) & 7) = res;
+#ifdef USE_CYCLONE_TIMING
+ if (src >> 16) ctx->io_cycle_counter -= 2;
+RET(8)
+#else
RET(10)
+#endif
}
// BCLR
flag_NotZ = res & src;
res |= src;
DREGu32((Opcode >> 0) & 7) = res;
+#ifdef USE_CYCLONE_TIMING
+ if (src >> 16) ctx->io_cycle_counter -= 2;
+RET(6)
+#else
RET(8)
+#endif
}
// BSET
else
{
SET_PC(execute_exception(ctx, M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
+#ifdef USE_CYCLONE_TIMING
+ RET(0)
+#else
RET(4)
+#endif
}
RET(12)
}
else
{
SET_PC(execute_exception(ctx, M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
+#ifdef USE_CYCLONE_TIMING
+ RET(0)
+#else
RET(4)
+#endif
}
RET(16)
}
else
{
SET_PC(execute_exception(ctx, M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
+#ifdef USE_CYCLONE_TIMING
+ RET(0)
+#else
RET(4)
+#endif
}
RET(16)
}
else
{
SET_PC(execute_exception(ctx, M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
+#ifdef USE_CYCLONE_TIMING
+ RET(0)
+#else
RET(4)
+#endif
}
RET(18)
}
else
{
SET_PC(execute_exception(ctx, M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
+#ifdef USE_CYCLONE_TIMING
+ RET(0)
+#else
RET(4)
+#endif
}
RET(20)
}
else
{
SET_PC(execute_exception(ctx, M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
+#ifdef USE_CYCLONE_TIMING
+ RET(0)
+#else
RET(4)
+#endif
}
RET(22)
}
else
{
SET_PC(execute_exception(ctx, M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
+#ifdef USE_CYCLONE_TIMING
+ RET(0)
+#else
RET(4)
+#endif
}
RET(20)
}
else
{
SET_PC(execute_exception(ctx, M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
+#ifdef USE_CYCLONE_TIMING
+ RET(0)
+#else
RET(4)
+#endif
}
RET(24)
}
else
{
SET_PC(execute_exception(ctx, M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
+#ifdef USE_CYCLONE_TIMING
+ RET(0)
+#else
RET(4)
+#endif
}
RET(20)
}
else
{
SET_PC(execute_exception(ctx, M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
+#ifdef USE_CYCLONE_TIMING
+ RET(0)
+#else
RET(4)
+#endif
}
RET(22)
}
else
{
SET_PC(execute_exception(ctx, M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
+#ifdef USE_CYCLONE_TIMING
+ RET(0)
+#else
RET(4)
+#endif
}
RET(16)
}
else
{
SET_PC(execute_exception(ctx, M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
+#ifdef USE_CYCLONE_TIMING
+ RET(0)
+#else
RET(4)
+#endif
}
RET(16)
}
else
{
SET_PC(execute_exception(ctx, M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
+#ifdef USE_CYCLONE_TIMING
+ RET(0)
+#else
RET(4)
+#endif
}
RET(18)
}
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(18)
+RET(14)
#else
RET(8)
#endif
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(18)
+RET(14)
#else
RET(8)
#endif
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(20)
+RET(16)
#else
RET(10)
#endif
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(22)
+RET(18)
#else
RET(12)
#endif
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(24)
+RET(20)
#else
RET(14)
#endif
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(22)
+RET(18)
#else
RET(12)
#endif
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(26)
+RET(22)
#else
RET(16)
#endif
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(18)
+RET(14)
#else
RET(8)
#endif
OPCODE(0xF000)
{
SET_PC(execute_exception(ctx, M68K_1111_EX, GET_PC-2, GET_SR));
-RET(0) // 4 already taken by exc. handler
+RET(0)
}
// MOVEMaR
OPCODE(0x4E40)
{
SET_PC(execute_exception(ctx, M68K_TRAP_BASE_EX + (Opcode & 0xF), GET_PC, GET_SR));
+#ifdef USE_CYCLONE_TIMING
+RET(0)
+#else
RET(4)
+#endif
}
// LINK
if (!flag_S)
{
SET_PC(execute_exception(ctx, M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
+#ifdef USE_CYCLONE_TIMING
+RET(0)
+#else
RET(4)
+#endif
}
res = AREGu32((Opcode >> 0) & 7);
ASP = res;
if (!flag_S)
{
SET_PC(execute_exception(ctx, M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
+#ifdef USE_CYCLONE_TIMING
+RET(0)
+#else
RET(4)
+#endif
}
res = ASP;
AREG((Opcode >> 0) & 7) = res;
if (!flag_S)
{
SET_PC(execute_exception(ctx, M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
+#ifdef USE_CYCLONE_TIMING
+RET(0)
+#else
RET(4)
+#endif
}
PRE_IO
if (ctx->reset_handler) ctx->reset_handler();
if (!flag_S)
{
SET_PC(execute_exception(ctx, M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
+#ifdef USE_CYCLONE_TIMING
+RET(0)
+#else
RET(4)
+#endif
}
FETCH_WORD(res);
res &= M68K_SR_MASK;
if (!flag_S)
{
SET_PC(execute_exception(ctx, M68K_PRIVILEGE_VIOLATION_EX, GET_PC-2, GET_SR));
+#ifdef USE_CYCLONE_TIMING
+RET(0)
+#else
RET(4)
+#endif
}
PRE_IO
POP_16_F(res)
// TRAPV
OPCODE(0x4E76)
{
- if (flag_V & 0x80)
+ if (flag_V & 0x80) {
SET_PC(execute_exception(ctx, M68K_TRAPV_EX, GET_PC, GET_SR));
+#ifdef USE_CYCLONE_TIMING
+RET(0)
+#endif
+ }
RET(4)
}
{
flag_N = res >> 8;
SET_PC(execute_exception(ctx, M68K_CHK_EX, GET_PC, GET_SR));
+RET(4)
}
RET(10)
}
{
flag_N = res >> 8;
SET_PC(execute_exception(ctx, M68K_CHK_EX, GET_PC, GET_SR));
+RET(8)
}
POST_IO
RET(14)
{
flag_N = res >> 8;
SET_PC(execute_exception(ctx, M68K_CHK_EX, GET_PC, GET_SR));
+RET(8)
}
POST_IO
RET(14)
{
flag_N = res >> 8;
SET_PC(execute_exception(ctx, M68K_CHK_EX, GET_PC, GET_SR));
+RET(10)
}
POST_IO
RET(16)
{
flag_N = res >> 8;
SET_PC(execute_exception(ctx, M68K_CHK_EX, GET_PC, GET_SR));
+RET(12)
}
POST_IO
RET(18)
{
flag_N = res >> 8;
SET_PC(execute_exception(ctx, M68K_CHK_EX, GET_PC, GET_SR));
+RET(14)
}
POST_IO
RET(20)
{
flag_N = res >> 8;
SET_PC(execute_exception(ctx, M68K_CHK_EX, GET_PC, GET_SR));
+RET(12)
}
POST_IO
RET(18)
{
flag_N = res >> 8;
SET_PC(execute_exception(ctx, M68K_CHK_EX, GET_PC, GET_SR));
+RET(16)
}
POST_IO
RET(22)
{
flag_N = res >> 8;
SET_PC(execute_exception(ctx, M68K_CHK_EX, GET_PC, GET_SR));
+RET(12)
}
POST_IO
RET(18)
{
flag_N = res >> 8;
SET_PC(execute_exception(ctx, M68K_CHK_EX, GET_PC, GET_SR));
+RET(14)
}
POST_IO
RET(20)
{
flag_N = res >> 8;
SET_PC(execute_exception(ctx, M68K_CHK_EX, GET_PC, GET_SR));
+RET(8)
}
POST_IO
RET(14)
{
flag_N = res >> 8;
SET_PC(execute_exception(ctx, M68K_CHK_EX, GET_PC, GET_SR));
+RET(8)
}
POST_IO
RET(14)
{
flag_N = res >> 8;
SET_PC(execute_exception(ctx, M68K_CHK_EX, GET_PC, GET_SR));
+RET(10)
}
POST_IO
RET(16)
{
SET_PC(execute_exception(ctx, M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
-RET(140)
+RET(4)
#else
-RET(10)
+RET(14)
#endif
}
dst = DREGu32((Opcode >> 9) & 7);
{
flag_V = M68K_SR_V;
#ifdef USE_CYCLONE_TIMING_DIV
-RET(140)
+RET(10)
#else
RET(70)
#endif
flag_V = flag_C = 0;
res = q | (r << 16);
DREGu32((Opcode >> 9) & 7) = res;
- }
#ifdef USE_CYCLONE_TIMING_DIV
-RET(140)
+RET(138-BITCOUNT(res,q)*2)
#else
RET(90)
#endif
+ }
}
// DIVU
{
SET_PC(execute_exception(ctx, M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
-RET(144)
+RET(8)
#else
-RET(14)
+RET(18)
#endif
}
dst = DREGu32((Opcode >> 9) & 7);
{
flag_V = M68K_SR_V;
#ifdef USE_CYCLONE_TIMING_DIV
-RET(144)
+RET(14)
#else
RET(74)
#endif
flag_V = flag_C = 0;
res = q | (r << 16);
DREGu32((Opcode >> 9) & 7) = res;
- }
#ifdef USE_CYCLONE_TIMING_DIV
-RET(144)
+RET(142-BITCOUNT(res,q)*2)
#else
RET(94)
#endif
+ }
}
// DIVU
{
SET_PC(execute_exception(ctx, M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
-RET(144)
+RET(8)
#else
-RET(14)
+RET(18)
#endif
}
dst = DREGu32((Opcode >> 9) & 7);
{
flag_V = M68K_SR_V;
#ifdef USE_CYCLONE_TIMING_DIV
-RET(144)
+RET(14)
#else
RET(74)
#endif
flag_V = flag_C = 0;
res = q | (r << 16);
DREGu32((Opcode >> 9) & 7) = res;
- }
#ifdef USE_CYCLONE_TIMING_DIV
-RET(144)
+RET(142-BITCOUNT(res,q)*2)
#else
RET(94)
#endif
+ }
}
// DIVU
{
SET_PC(execute_exception(ctx, M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
-RET(146)
+RET(10)
#else
-RET(16)
+RET(20)
#endif
}
dst = DREGu32((Opcode >> 9) & 7);
{
flag_V = M68K_SR_V;
#ifdef USE_CYCLONE_TIMING_DIV
-RET(146)
+RET(16)
#else
RET(76)
#endif
flag_V = flag_C = 0;
res = q | (r << 16);
DREGu32((Opcode >> 9) & 7) = res;
- }
#ifdef USE_CYCLONE_TIMING_DIV
-RET(146)
+RET(144-BITCOUNT(res,q)*2)
#else
RET(96)
#endif
+ }
}
// DIVU
{
SET_PC(execute_exception(ctx, M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
-RET(148)
+RET(12)
#else
-RET(18)
+RET(22)
#endif
}
dst = DREGu32((Opcode >> 9) & 7);
{
flag_V = M68K_SR_V;
#ifdef USE_CYCLONE_TIMING_DIV
-RET(148)
+RET(18)
#else
RET(78)
#endif
flag_V = flag_C = 0;
res = q | (r << 16);
DREGu32((Opcode >> 9) & 7) = res;
- }
#ifdef USE_CYCLONE_TIMING_DIV
-RET(148)
+RET(146-BITCOUNT(res,q)*2)
#else
RET(98)
#endif
+ }
}
// DIVU
{
SET_PC(execute_exception(ctx, M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
-RET(150)
+RET(14)
#else
-RET(20)
+RET(24)
#endif
}
dst = DREGu32((Opcode >> 9) & 7);
{
flag_V = M68K_SR_V;
#ifdef USE_CYCLONE_TIMING_DIV
-RET(150)
+RET(20)
#else
RET(80)
#endif
flag_V = flag_C = 0;
res = q | (r << 16);
DREGu32((Opcode >> 9) & 7) = res;
- }
#ifdef USE_CYCLONE_TIMING_DIV
-RET(150)
+RET(148-BITCOUNT(res,q)*2)
#else
RET(100)
#endif
+ }
}
// DIVU
{
SET_PC(execute_exception(ctx, M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
-RET(148)
+RET(12)
#else
-RET(18)
+RET(22)
#endif
}
dst = DREGu32((Opcode >> 9) & 7);
{
flag_V = M68K_SR_V;
#ifdef USE_CYCLONE_TIMING_DIV
-RET(148)
+RET(18)
#else
RET(78)
#endif
flag_V = flag_C = 0;
res = q | (r << 16);
DREGu32((Opcode >> 9) & 7) = res;
- }
#ifdef USE_CYCLONE_TIMING_DIV
-RET(148)
+RET(146-BITCOUNT(res,q)*2)
#else
RET(98)
#endif
+ }
}
// DIVU
{
SET_PC(execute_exception(ctx, M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
-RET(152)
+RET(16)
#else
-RET(22)
+RET(26)
#endif
}
dst = DREGu32((Opcode >> 9) & 7);
{
flag_V = M68K_SR_V;
#ifdef USE_CYCLONE_TIMING_DIV
-RET(152)
+RET(22)
#else
RET(82)
#endif
flag_V = flag_C = 0;
res = q | (r << 16);
DREGu32((Opcode >> 9) & 7) = res;
- }
#ifdef USE_CYCLONE_TIMING_DIV
-RET(152)
+RET(150-BITCOUNT(res,q)*2)
#else
RET(102)
#endif
+ }
}
// DIVU
{
SET_PC(execute_exception(ctx, M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
-RET(148)
+RET(12)
#else
-RET(18)
+RET(22)
#endif
}
dst = DREGu32((Opcode >> 9) & 7);
{
flag_V = M68K_SR_V;
#ifdef USE_CYCLONE_TIMING_DIV
-RET(148)
+RET(18)
#else
RET(78)
#endif
flag_V = flag_C = 0;
res = q | (r << 16);
DREGu32((Opcode >> 9) & 7) = res;
- }
#ifdef USE_CYCLONE_TIMING_DIV
-RET(148)
+RET(146-BITCOUNT(res,q)*2)
#else
RET(98)
#endif
+ }
}
// DIVU
{
SET_PC(execute_exception(ctx, M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
-RET(150)
+RET(14)
#else
-RET(20)
+RET(24)
#endif
}
dst = DREGu32((Opcode >> 9) & 7);
{
flag_V = M68K_SR_V;
#ifdef USE_CYCLONE_TIMING_DIV
-RET(150)
+RET(20)
#else
RET(80)
#endif
flag_V = flag_C = 0;
res = q | (r << 16);
DREGu32((Opcode >> 9) & 7) = res;
- }
#ifdef USE_CYCLONE_TIMING_DIV
-RET(150)
+RET(148-BITCOUNT(res,q)*2)
#else
RET(100)
#endif
+ }
}
// DIVU
{
SET_PC(execute_exception(ctx, M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
-RET(144)
+RET(8)
#else
-RET(14)
+RET(18)
#endif
}
dst = DREGu32((Opcode >> 9) & 7);
{
flag_V = M68K_SR_V;
#ifdef USE_CYCLONE_TIMING_DIV
-RET(144)
+RET(14)
#else
RET(74)
#endif
flag_V = flag_C = 0;
res = q | (r << 16);
DREGu32((Opcode >> 9) & 7) = res;
- }
#ifdef USE_CYCLONE_TIMING_DIV
-RET(144)
+RET(142-BITCOUNT(res,q)*2)
#else
RET(94)
#endif
+ }
}
// DIVU
{
SET_PC(execute_exception(ctx, M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
-RET(144)
+RET(8)
#else
-RET(14)
+RET(18)
#endif
}
dst = DREGu32((Opcode >> 9) & 7);
{
flag_V = M68K_SR_V;
#ifdef USE_CYCLONE_TIMING_DIV
-RET(144)
+RET(14)
#else
RET(74)
#endif
flag_V = flag_C = 0;
res = q | (r << 16);
DREGu32((Opcode >> 9) & 7) = res;
- }
#ifdef USE_CYCLONE_TIMING_DIV
-RET(144)
+RET(142-BITCOUNT(res,q)*2)
#else
RET(94)
#endif
+ }
}
// DIVU
{
SET_PC(execute_exception(ctx, M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
-RET(146)
+RET(10)
#else
-RET(16)
+RET(20)
#endif
}
dst = DREGu32((Opcode >> 9) & 7);
{
flag_V = M68K_SR_V;
#ifdef USE_CYCLONE_TIMING_DIV
-RET(146)
+RET(16)
#else
RET(76)
#endif
flag_V = flag_C = 0;
res = q | (r << 16);
DREGu32((Opcode >> 9) & 7) = res;
- }
#ifdef USE_CYCLONE_TIMING_DIV
-RET(146)
+RET(144-BITCOUNT(res,q)*2)
#else
RET(96)
#endif
+ }
}
// DIVS
{
SET_PC(execute_exception(ctx, M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81C0;
+RET(4)
+#else
+ RET(14)
#endif
- RET(10)
}
dst = DREGu32((Opcode >> 9) & 7);
if ((dst == 0x80000000) && (src == (u32)-1))
res = 0;
DREGu32((Opcode >> 9) & 7) = res;
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81C0;
-#endif
+RET(16+(dst>>31)*2)
+#else
RET(50)
+#endif
}
{
s32 q, r;
{
flag_V = M68K_SR_V;
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81C0;
-#endif
+if (q > 0xFFFF || q < -0x10000) {
+ RET(16+(dst>>31)*2)
+} else RET(152+(dst>>31)*4+((src^dst)>>31)*2-BITCOUNT(res,abs(q))*2)
+#else
RET(80)
+#endif
}
q &= 0x0000FFFF;
flag_NotZ = q;
flag_V = flag_C = 0;
res = q | (r << 16);
DREGu32((Opcode >> 9) & 7) = res;
- }
#ifdef USE_CYCLONE_TIMING_DIV
-end81C0: ctx->io_cycle_counter -= 50;
-#endif
+RET(152+(dst>>31)*4+((src^dst)>>31)*2-BITCOUNT(res,abs(q))*2)
+#else
RET(108)
+#endif
+ }
}
// DIVS
{
SET_PC(execute_exception(ctx, M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81D0;
+RET(8)
+#else
+ RET(18)
#endif
- RET(14)
}
dst = DREGu32((Opcode >> 9) & 7);
if ((dst == 0x80000000) && (src == (u32)-1))
res = 0;
DREGu32((Opcode >> 9) & 7) = res;
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81D0;
-#endif
+RET(20+(dst>>31)*2)
+#else
RET(54)
+#endif
}
{
s32 q, r;
{
flag_V = M68K_SR_V;
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81D0;
-#endif
+if (q > 0xFFFF || q < -0x10000) {
+ RET(20+(dst>>31)*2)
+} else RET(156+(dst>>31)*4+((src^dst)>>31)*2-BITCOUNT(res,abs(q))*2)
+#else
RET(84)
+#endif
}
q &= 0x0000FFFF;
flag_NotZ = q;
flag_V = flag_C = 0;
res = q | (r << 16);
DREGu32((Opcode >> 9) & 7) = res;
- }
#ifdef USE_CYCLONE_TIMING_DIV
-end81D0: ctx->io_cycle_counter -= 50;
-#endif
+RET(156+(dst>>31)*4+((src^dst)>>31)*2-BITCOUNT(res,abs(q))*2)
+#else
RET(112)
+#endif
+ }
}
// DIVS
{
SET_PC(execute_exception(ctx, M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81D8;
+RET(8)
+#else
+ RET(18)
#endif
- RET(14)
}
dst = DREGu32((Opcode >> 9) & 7);
if ((dst == 0x80000000) && (src == (u32)-1))
res = 0;
DREGu32((Opcode >> 9) & 7) = res;
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81D8;
-#endif
+RET(20+(dst>>31)*2)
+#else
RET(54)
+#endif
}
{
s32 q, r;
{
flag_V = M68K_SR_V;
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81D8;
-#endif
+if (q > 0xFFFF || q < -0x10000) {
+ RET(20+(dst>>31)*2)
+} else RET(156+(dst>>31)*4+((src^dst)>>31)*2-BITCOUNT(res,abs(q))*2)
+#else
RET(84)
+#endif
}
q &= 0x0000FFFF;
flag_NotZ = q;
flag_V = flag_C = 0;
res = q | (r << 16);
DREGu32((Opcode >> 9) & 7) = res;
- }
#ifdef USE_CYCLONE_TIMING_DIV
-end81D8: ctx->io_cycle_counter -= 50;
-#endif
+RET(156+(dst>>31)*4+((src^dst)>>31)*2-BITCOUNT(res,abs(q))*2)
+#else
RET(112)
+#endif
+ }
}
// DIVS
{
SET_PC(execute_exception(ctx, M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81E0;
+RET(10)
+#else
+ RET(20)
#endif
- RET(16)
}
dst = DREGu32((Opcode >> 9) & 7);
if ((dst == 0x80000000) && (src == (u32)-1))
res = 0;
DREGu32((Opcode >> 9) & 7) = res;
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81E0;
-#endif
+RET(22+(dst>>31)*2)
+#else
RET(56)
+#endif
}
{
s32 q, r;
{
flag_V = M68K_SR_V;
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81E0;
-#endif
+if (q > 0xFFFF || q < -0x10000) {
+ RET(22+(dst>>31)*2)
+} else RET(158+(dst>>31)*4+((src^dst)>>31)*2-BITCOUNT(res,abs(q))*2)
+#else
RET(86)
+#endif
}
q &= 0x0000FFFF;
flag_NotZ = q;
flag_V = flag_C = 0;
res = q | (r << 16);
DREGu32((Opcode >> 9) & 7) = res;
- }
#ifdef USE_CYCLONE_TIMING_DIV
-end81E0: ctx->io_cycle_counter -= 50;
-#endif
+RET(158+(dst>>31)*4+((src^dst)>>31)*2-BITCOUNT(res,abs(q))*2)
+#else
RET(114)
+#endif
+ }
}
// DIVS
{
SET_PC(execute_exception(ctx, M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81E8;
+RET(12)
+#else
+ RET(22)
#endif
- RET(18)
}
dst = DREGu32((Opcode >> 9) & 7);
if ((dst == 0x80000000) && (src == (u32)-1))
res = 0;
DREGu32((Opcode >> 9) & 7) = res;
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81E8;
-#endif
+RET(24+(dst>>31)*2)
+#else
RET(58)
+#endif
}
{
s32 q, r;
{
flag_V = M68K_SR_V;
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81E8;
-#endif
+if (q > 0xFFFF || q < -0x10000) {
+ RET(24+(dst>>31)*2)
+} else RET(160+(dst>>31)*4+((src^dst)>>31)*2-BITCOUNT(res,abs(q))*2)
+#else
RET(88)
+#endif
}
q &= 0x0000FFFF;
flag_NotZ = q;
flag_V = flag_C = 0;
res = q | (r << 16);
DREGu32((Opcode >> 9) & 7) = res;
- }
#ifdef USE_CYCLONE_TIMING_DIV
-end81E8: ctx->io_cycle_counter -= 50;
-#endif
+RET(160+(dst>>31)*4+((src^dst)>>31)*2-BITCOUNT(res,abs(q))*2)
+#else
RET(116)
+#endif
+ }
}
// DIVS
{
SET_PC(execute_exception(ctx, M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81F0;
+RET(14)
+#else
+ RET(24)
#endif
- RET(20)
}
dst = DREGu32((Opcode >> 9) & 7);
if ((dst == 0x80000000) && (src == (u32)-1))
res = 0;
DREGu32((Opcode >> 9) & 7) = res;
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81F0;
-#endif
+RET(26+(dst>>31)*2)
+#else
RET(60)
+#endif
}
{
s32 q, r;
{
flag_V = M68K_SR_V;
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81F0;
-#endif
+if (q > 0xFFFF || q < -0x10000) {
+ RET(26+(dst>>31)*2)
+} else RET(162+(dst>>31)*4+((src^dst)>>31)*2-BITCOUNT(res,abs(q))*2)
+#else
RET(90)
+#endif
}
q &= 0x0000FFFF;
flag_NotZ = q;
flag_V = flag_C = 0;
res = q | (r << 16);
DREGu32((Opcode >> 9) & 7) = res;
- }
#ifdef USE_CYCLONE_TIMING_DIV
-end81F0: ctx->io_cycle_counter -= 50;
-#endif
+RET(162+(dst>>31)*4+((src^dst)>>31)*2-BITCOUNT(res,abs(q))*2)
+#else
RET(118)
+#endif
+ }
}
// DIVS
{
SET_PC(execute_exception(ctx, M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81F8;
+RET(12)
+#else
+ RET(22)
#endif
- RET(18)
}
dst = DREGu32((Opcode >> 9) & 7);
if ((dst == 0x80000000) && (src == (u32)-1))
res = 0;
DREGu32((Opcode >> 9) & 7) = res;
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81F8;
-#endif
+RET(24+(dst>>31)*2)
+#else
RET(58)
+#endif
}
{
s32 q, r;
{
flag_V = M68K_SR_V;
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81F8;
-#endif
+if (q > 0xFFFF || q < -0x10000) {
+ RET(24+(dst>>31)*2)
+} else RET(160+(dst>>31)*4+((src^dst)>>31)*2-BITCOUNT(res,abs(q))*2)
+#else
RET(88)
+#endif
}
q &= 0x0000FFFF;
flag_NotZ = q;
flag_V = flag_C = 0;
res = q | (r << 16);
DREGu32((Opcode >> 9) & 7) = res;
- }
#ifdef USE_CYCLONE_TIMING_DIV
-end81F8: ctx->io_cycle_counter -= 50;
-#endif
+RET(160+(dst>>31)*4+((src^dst)>>31)*2-BITCOUNT(res,abs(q))*2)
+#else
RET(116)
+#endif
+ }
}
// DIVS
{
SET_PC(execute_exception(ctx, M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81F9;
+RET(16)
+#else
+ RET(26)
#endif
- RET(22)
}
dst = DREGu32((Opcode >> 9) & 7);
if ((dst == 0x80000000) && (src == (u32)-1))
res = 0;
DREGu32((Opcode >> 9) & 7) = res;
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81F9;
-#endif
+RET(28+(dst>>31)*2)
+#else
RET(62)
+#endif
}
{
s32 q, r;
{
flag_V = M68K_SR_V;
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81F9;
-#endif
+if (q > 0xFFFF || q < -0x10000) {
+ RET(28+(dst>>31)*2)
+} else RET(164+(dst>>31)*4+((src^dst)>>31)*2-BITCOUNT(res,abs(q))*2)
+#else
RET(92)
+#endif
}
q &= 0x0000FFFF;
flag_NotZ = q;
flag_V = flag_C = 0;
res = q | (r << 16);
DREGu32((Opcode >> 9) & 7) = res;
- }
#ifdef USE_CYCLONE_TIMING_DIV
-end81F9: ctx->io_cycle_counter -= 50;
-#endif
+RET(164+(dst>>31)*4+((src^dst)>>31)*2-BITCOUNT(res,abs(q))*2)
+#else
RET(120)
+#endif
+ }
}
// DIVS
{
SET_PC(execute_exception(ctx, M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81FA;
+RET(12)
+#else
+ RET(22)
#endif
- RET(18)
}
dst = DREGu32((Opcode >> 9) & 7);
if ((dst == 0x80000000) && (src == (u32)-1))
res = 0;
DREGu32((Opcode >> 9) & 7) = res;
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81FA;
-#endif
+RET(24+(dst>>31)*2)
+#else
RET(58)
+#endif
}
{
s32 q, r;
{
flag_V = M68K_SR_V;
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81FA;
-#endif
+if (q > 0xFFFF || q < -0x10000) {
+ RET(24+(dst>>31)*2)
+} else RET(160+(dst>>31)*4+((src^dst)>>31)*2-BITCOUNT(res,abs(q))*2)
+#else
RET(88)
+#endif
}
q &= 0x0000FFFF;
flag_NotZ = q;
flag_V = flag_C = 0;
res = q | (r << 16);
DREGu32((Opcode >> 9) & 7) = res;
- }
#ifdef USE_CYCLONE_TIMING_DIV
-end81FA: ctx->io_cycle_counter -= 50;
-#endif
+RET(160+(dst>>31)*4+((src^dst)>>31)*2-BITCOUNT(res,abs(q))*2)
+#else
RET(116)
+#endif
+ }
}
// DIVS
{
SET_PC(execute_exception(ctx, M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81FB;
+RET(14)
+#else
+ RET(24)
#endif
- RET(20)
}
dst = DREGu32((Opcode >> 9) & 7);
if ((dst == 0x80000000) && (src == (u32)-1))
res = 0;
DREGu32((Opcode >> 9) & 7) = res;
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81FB;
-#endif
+RET(26+(dst>>31)*2)
+#else
RET(60)
+#endif
}
{
s32 q, r;
{
flag_V = M68K_SR_V;
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81FB;
-#endif
+if (q > 0xFFFF || q < -0x10000) {
+ RET(26+(dst>>31)*2)
+} else RET(162+(dst>>31)*4+((src^dst)>>31)*2-BITCOUNT(res,abs(q))*2)
+#else
RET(90)
+#endif
}
q &= 0x0000FFFF;
flag_NotZ = q;
flag_V = flag_C = 0;
res = q | (r << 16);
DREGu32((Opcode >> 9) & 7) = res;
- }
#ifdef USE_CYCLONE_TIMING_DIV
-end81FB: ctx->io_cycle_counter -= 50;
-#endif
+RET(162+(dst>>31)*4+((src^dst)>>31)*2-BITCOUNT(res,abs(q))*2)
+#else
RET(118)
+#endif
+ }
}
// DIVS
{
SET_PC(execute_exception(ctx, M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81FC;
+RET(8)
+#else
+ RET(18)
#endif
- RET(14)
}
dst = DREGu32((Opcode >> 9) & 7);
if ((dst == 0x80000000) && (src == (u32)-1))
res = 0;
DREGu32((Opcode >> 9) & 7) = res;
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81FC;
-#endif
+RET(20+(dst>>31)*2)
+#else
RET(54)
+#endif
}
{
s32 q, r;
{
flag_V = M68K_SR_V;
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81FC;
-#endif
+if (q > 0xFFFF || q < -0x10000) {
+ RET(20+(dst>>31)*2)
+} else RET(156+(dst>>31)*4+((src^dst)>>31)*2-BITCOUNT(res,abs(q))*2)
+#else
RET(84)
+#endif
}
q &= 0x0000FFFF;
flag_NotZ = q;
flag_V = flag_C = 0;
res = q | (r << 16);
DREGu32((Opcode >> 9) & 7) = res;
- }
#ifdef USE_CYCLONE_TIMING_DIV
-end81FC: ctx->io_cycle_counter -= 50;
-#endif
+RET(156+(dst>>31)*4+((src^dst)>>31)*2-BITCOUNT(res,abs(q))*2)
+#else
RET(112)
+#endif
+ }
}
// DIVS
{
SET_PC(execute_exception(ctx, M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81DF;
+RET(8)
+#else
+ RET(18)
#endif
- RET(14)
}
dst = DREGu32((Opcode >> 9) & 7);
if ((dst == 0x80000000) && (src == (u32)-1))
res = 0;
DREGu32((Opcode >> 9) & 7) = res;
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81DF;
-#endif
+RET(20+(dst>>31)*2)
+#else
RET(54)
+#endif
}
{
s32 q, r;
{
flag_V = M68K_SR_V;
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81DF;
-#endif
+if (q > 0xFFFF || q < -0x10000) {
+ RET(20+(dst>>31)*2)
+} else RET(156+(dst>>31)*4+((src^dst)>>31)*2-BITCOUNT(res,abs(q))*2)
+#else
RET(84)
+#endif
}
q &= 0x0000FFFF;
flag_NotZ = q;
flag_V = flag_C = 0;
res = q | (r << 16);
DREGu32((Opcode >> 9) & 7) = res;
- }
#ifdef USE_CYCLONE_TIMING_DIV
-end81DF: ctx->io_cycle_counter -= 50;
-#endif
+RET(156+(dst>>31)*4+((src^dst)>>31)*2-BITCOUNT(res,abs(q))*2)
+#else
RET(112)
+#endif
+ }
}
// DIVS
{
SET_PC(execute_exception(ctx, M68K_ZERO_DIVIDE_EX, GET_PC, GET_SR));
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81E7;
+RET(10)
+#else
+ RET(20)
#endif
- RET(16)
}
dst = DREGu32((Opcode >> 9) & 7);
if ((dst == 0x80000000) && (src == (u32)-1))
res = 0;
DREGu32((Opcode >> 9) & 7) = res;
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81E7;
-#endif
+RET(22+(dst>>31)*2)
+#else
RET(56)
+#endif
}
{
s32 q, r;
{
flag_V = M68K_SR_V;
#ifdef USE_CYCLONE_TIMING_DIV
-goto end81E7;
-#endif
+if (q > 0xFFFF || q < -0x10000) {
+ RET(22+(dst>>31)*2)
+} else RET(158+(dst>>31)*4+((src^dst)>>31)*2-BITCOUNT(res,abs(q))*2)
+#else
RET(86)
+#endif
}
q &= 0x0000FFFF;
flag_NotZ = q;
flag_V = flag_C = 0;
res = q | (r << 16);
DREGu32((Opcode >> 9) & 7) = res;
- }
#ifdef USE_CYCLONE_TIMING_DIV
-end81E7: ctx->io_cycle_counter -= 50;
-#endif
+RET(158+(dst>>31)*4+((src^dst)>>31)*2-BITCOUNT(res,abs(q))*2)
+#else
RET(114)
+#endif
+ }
}
// SUBaD
flag_V = flag_C = 0;
DREGu32((Opcode >> 9) & 7) = res;
#ifdef USE_CYCLONE_TIMING
-RET(54)
+RET(38+BITCOUNT(res,src)*2)
#else
RET(50)
#endif
DREGu32((Opcode >> 9) & 7) = res;
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(58)
+RET(42+BITCOUNT(res,src)*2)
#else
RET(54)
#endif
DREGu32((Opcode >> 9) & 7) = res;
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(58)
+RET(42+BITCOUNT(res,src)*2)
#else
RET(54)
#endif
DREGu32((Opcode >> 9) & 7) = res;
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(60)
+RET(44+BITCOUNT(res,src)*2)
#else
RET(56)
#endif
DREGu32((Opcode >> 9) & 7) = res;
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(62)
+RET(46+BITCOUNT(res,src)*2)
#else
RET(58)
#endif
DREGu32((Opcode >> 9) & 7) = res;
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(64)
+RET(48+BITCOUNT(res,src)*2)
#else
RET(60)
#endif
DREGu32((Opcode >> 9) & 7) = res;
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(62)
+RET(46+BITCOUNT(res,src)*2)
#else
RET(58)
#endif
DREGu32((Opcode >> 9) & 7) = res;
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(66)
+RET(50+BITCOUNT(res,src)*2)
#else
RET(62)
#endif
DREGu32((Opcode >> 9) & 7) = res;
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(62)
+RET(46+BITCOUNT(res,src)*2)
#else
RET(58)
#endif
DREGu32((Opcode >> 9) & 7) = res;
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(64)
+RET(48+BITCOUNT(res,src)*2)
#else
RET(60)
#endif
flag_V = flag_C = 0;
DREGu32((Opcode >> 9) & 7) = res;
#ifdef USE_CYCLONE_TIMING
-RET(58)
+RET(42+BITCOUNT(res,src)*2)
#else
RET(54)
#endif
DREGu32((Opcode >> 9) & 7) = res;
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(58)
+RET(42+BITCOUNT(res,src)*2)
#else
RET(54)
#endif
DREGu32((Opcode >> 9) & 7) = res;
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(60)
+RET(44+BITCOUNT(res,src)*2)
#else
RET(56)
#endif
flag_V = flag_C = 0;
DREGu32((Opcode >> 9) & 7) = res;
#ifdef USE_CYCLONE_TIMING
-RET(54)
+RET(38+BITCOUNT(res,src^(src<<1)))
#else
RET(50)
#endif
DREGu32((Opcode >> 9) & 7) = res;
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(58)
+RET(42+BITCOUNT(res,src^(src<<1))*2)
#else
RET(54)
#endif
DREGu32((Opcode >> 9) & 7) = res;
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(58)
+RET(42+BITCOUNT(res,src^(src<<1))*2)
#else
RET(54)
#endif
DREGu32((Opcode >> 9) & 7) = res;
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(60)
+RET(44+BITCOUNT(res,src^(src<<1))*2)
#else
RET(56)
#endif
DREGu32((Opcode >> 9) & 7) = res;
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(62)
+RET(46+BITCOUNT(res,src^(src<<1))*2)
#else
RET(58)
#endif
DREGu32((Opcode >> 9) & 7) = res;
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(64)
+RET(48+BITCOUNT(res,src^(src<<1))*2)
#else
RET(60)
#endif
DREGu32((Opcode >> 9) & 7) = res;
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(62)
+RET(46+BITCOUNT(res,src^(src<<1))*2)
#else
RET(58)
#endif
DREGu32((Opcode >> 9) & 7) = res;
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(66)
+RET(50+BITCOUNT(res,src^(src<<1))*2)
#else
RET(62)
#endif
DREGu32((Opcode >> 9) & 7) = res;
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(62)
+RET(46+BITCOUNT(res,src^(src<<1))*2)
#else
RET(58)
#endif
DREGu32((Opcode >> 9) & 7) = res;
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(64)
+RET(48+BITCOUNT(res,src^(src<<1))*2)
#else
RET(60)
#endif
flag_V = flag_C = 0;
DREGu32((Opcode >> 9) & 7) = res;
#ifdef USE_CYCLONE_TIMING
-RET(58)
+RET(42+BITCOUNT(res,src^(src<<1))*2)
#else
RET(54)
#endif
DREGu32((Opcode >> 9) & 7) = res;
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(58)
+RET(42+BITCOUNT(res,src^(src<<1))*2)
#else
RET(54)
#endif
DREGu32((Opcode >> 9) & 7) = res;
POST_IO
#ifdef USE_CYCLONE_TIMING
-RET(60)
+RET(44+BITCOUNT(res,src^(src<<1))*2)
#else
RET(56)
#endif