--- /dev/null
+m68kops.c : m68kmake
+ ./$<
+
+clean:
+ $(RM) m68kops.c m68kops.h m68kmake *.o
+
/* ======================================================================== */\r
/*\r
* MUSASHI\r
- * Version 3.3\r
+ * Version 3.31\r
*\r
* A portable Motorola M680x0 processor emulation engine.\r
- * Copyright 1998-2001 Karl Stenerud. All rights reserved.\r
+ * Copyright 1998-2007 Karl Stenerud. All rights reserved.\r
*\r
* This code may be freely used for non-commercial purposes as long as this\r
* copyright notice remains unaltered in the source code and any binary files\r
*/\r
void m68k_set_rte_instr_callback(void (*callback)(void));\r
\r
+/* Set the callback for the TAS instruction.\r
+ * You must enable M68K_TAS_HAS_CALLBACK in m68kconf.h.\r
+ * The CPU calls this callback every time it encounters a TAS instruction.\r
+ * Default behavior: return 1, allow writeback.\r
+ */\r
+void m68k_set_tas_instr_callback(int (*callback)(void));\r
+\r
+\r
\r
/* Set the callback for informing of a large PC change.\r
* You must enable M68K_MONITOR_PC in m68kconf.h.\r
/* Same as above but accepts raw opcode data directly rather than fetching\r
* via the read/write interfaces.\r
*/\r
-unsigned int m68k_disassemble_raw(char* str_buff, unsigned int pc, unsigned char* opdata, unsigned char* argdata, int length, unsigned int cpu_type);\r
+unsigned int m68k_disassemble_raw(char* str_buff, unsigned int pc, const unsigned char* opdata, const unsigned char* argdata, unsigned int cpu_type);\r
\r
\r
/* ======================================================================== */\r
/* ======================================================================== */\r
/*\r
* MUSASHI\r
- * Version 3.3\r
+ * Version 3.31\r
*\r
* A portable Motorola M680x0 processor emulation engine.\r
- * Copyright 1998-2001 Karl Stenerud. All rights reserved.\r
+ * Copyright 1998-2007 Karl Stenerud. All rights reserved.\r
*\r
* This code may be freely used for non-commercial purposes as long as this\r
* copyright notice remains unaltered in the source code and any binary files\r
M68KMAKE_OPCODE_HANDLER_HEADER\r
\r
#include "m68kcpu.h"\r
+extern void m68040_fpu_op0(void);\r
+extern void m68040_fpu_op1(void);\r
\r
/* ======================================================================== */\r
/* ========================= INSTRUCTION HANDLERS ========================= */\r
M68KMAKE_TABLE_START\r
1010 0 . . 1010............ .......... U U U U 4 4 4 4\r
1111 0 . . 1111............ .......... U U U U 4 4 4 4\r
+040fpu0 32 . . 11110010........ .......... . . . U . . . 0\r
+040fpu1 32 . . 11110011........ .......... . . . U . . . 0\r
abcd 8 rr . 1100...100000... .......... U U U U 6 6 4 4\r
abcd 8 mm ax7 1100111100001... .......... U U U U 18 18 16 16\r
abcd 8 mm ay7 1100...100001111 .......... U U U U 18 18 16 16\r
clr 8 . d 0100001000000... .......... U U U U 4 4 2 2\r
clr 8 . . 0100001000...... A+-DXWL... U U U U 6 4 4 4 notaz hack: changed 000 cycles 8 -> 6 like in starscream for Fatal Rewind\r
clr 16 . d 0100001001000... .......... U U U U 4 4 2 2\r
-clr 16 . . 0100001001...... A+-DXWL... U U U U 6 4 4 4 ditto\r
+clr 16 . . 0100001001...... A+-DXWL... U U U U 6 4 4 4 notaz hack: ditto\r
clr 32 . d 0100001010000... .......... U U U U 6 6 2 2\r
clr 32 . . 0100001010...... A+-DXWL... U U U U 12 6 4 4\r
cmp 8 . d 1011...000000... .......... U U U U 4 4 2 2\r
}\r
\r
\r
+M68KMAKE_OP(040fpu0, 32, ., .)\r
+{\r
+ if(CPU_TYPE_IS_040_PLUS(CPU_TYPE))\r
+ {\r
+ m68040_fpu_op0();\r
+ return;\r
+ }\r
+ m68ki_exception_1111();\r
+}\r
+\r
+\r
+M68KMAKE_OP(040fpu1, 32, ., .)\r
+{\r
+ if(CPU_TYPE_IS_040_PLUS(CPU_TYPE))\r
+ {\r
+ m68040_fpu_op1();\r
+ return;\r
+ }\r
+ m68ki_exception_1111();\r
+}\r
+\r
+\r
+\r
M68KMAKE_OP(abcd, 8, rr, .)\r
{\r
uint* r_dst = &DX;\r
M68KMAKE_OP(adda, 16, ., .)\r
{\r
uint* r_dst = &AX;\r
+ uint src = MAKE_INT_16(M68KMAKE_GET_OPER_AY_16);\r
\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst + MAKE_INT_16(M68KMAKE_GET_OPER_AY_16));\r
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst + src);\r
}\r
\r
\r
{\r
m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
-// if(REG_PC == REG_PPC)\r
-// USE_ALL_CYCLES();\r
+ if(REG_PC == REG_PPC)\r
+ USE_ALL_CYCLES();\r
}\r
\r
\r
REG_PC -= 2;\r
m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
m68ki_branch_16(offset);\r
-// if(REG_PC == REG_PPC)\r
-// USE_ALL_CYCLES();\r
+ if(REG_PC == REG_PPC)\r
+ USE_ALL_CYCLES();\r
}\r
\r
\r
{\r
m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
-// if(REG_PC == REG_PPC)\r
-// USE_ALL_CYCLES();\r
+ if(REG_PC == REG_PPC)\r
+ USE_ALL_CYCLES();\r
}\r
}\r
\r
{\r
uint ea = M68KMAKE_GET_EA_AY_32;\r
m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_push_32(MAKE_INT_24(REG_PC)); // notaz: Cyclone can't handle 32bit PC and I neet to debug it\r
+ m68ki_push_32(REG_PC);\r
m68ki_jump(ea);\r
}\r
\r
uint res = DY;\r
uint ea = EA_AX_PD_32();\r
\r
- m68ki_write_32(ea, res);\r
+ m68ki_write_16(ea+2, res & 0xFFFF );\r
+ m68ki_write_16(ea, (res >> 16) & 0xFFFF );\r
\r
FLAG_N = NFLAG_32(res);\r
FLAG_Z = res;\r
uint res = AY;\r
uint ea = EA_AX_PD_32();\r
\r
- m68ki_write_32(ea, res);\r
+ m68ki_write_16(ea+2, res & 0xFFFF );\r
+ m68ki_write_16(ea, (res >> 16) & 0xFFFF );\r
\r
FLAG_N = NFLAG_32(res);\r
FLAG_Z = res;\r
uint res = M68KMAKE_GET_OPER_AY_32;\r
uint ea = EA_AX_PD_32();\r
\r
- m68ki_write_32(ea, res);\r
+ m68ki_write_16(ea+2, res & 0xFFFF );\r
+ m68ki_write_16(ea, (res >> 16) & 0xFFFF );\r
\r
FLAG_N = NFLAG_32(res);\r
FLAG_Z = res;\r
case 0x002: /* CACR */\r
if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
{\r
- REG_CACR = REG_DA[(word2 >> 12) & 15];\r
+ if (CPU_TYPE_IS_040_PLUS(CPU_TYPE))\r
+ {\r
+ REG_CACR = REG_DA[(word2 >> 12) & 15];\r
+ }\r
+ else\r
+ {\r
+ /* non 68040 can only set the lower 4 bits (C,CE,F,E) */\r
+ REG_CACR = REG_DA[(word2 >> 12) & 15] & 0x0f;\r
+ }\r
return;\r
}\r
m68ki_exception_illegal();\r
if(register_list & (1 << i))\r
{\r
ea -= 4;\r
- m68ki_write_32(ea, REG_DA[15-i]);\r
+ m68ki_write_16(ea+2, REG_DA[15-i] & 0xFFFF );\r
+ m68ki_write_16(ea, (REG_DA[15-i] >> 16) & 0xFFFF );\r
count++;\r
}\r
AY = ea;\r
\r
*r_dst = res;\r
\r
- FLAG_C = (src >> (32 - shift)) << 8;\r
- if (shift == 0) FLAG_C = src << 8; // notaz\r
+ FLAG_C = (src >> ((32 - shift) & 0x1f)) << 8;\r
FLAG_N = NFLAG_32(res);\r
FLAG_Z = res;\r
FLAG_V = VFLAG_CLEAR;\r
M68KMAKE_OP(suba, 16, ., .)\r
{\r
uint* r_dst = &AX;\r
+ uint src = MAKE_INT_16(M68KMAKE_GET_OPER_AY_16);\r
\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst - MAKE_INT_16(M68KMAKE_GET_OPER_AY_16));\r
+ *r_dst = MASK_OUT_ABOVE_32(*r_dst - src);\r
}\r
\r
\r
{\r
uint ea = M68KMAKE_GET_EA_AY_8;\r
uint dst = m68ki_read_8(ea);\r
+ uint allow_writeback;\r
\r
FLAG_Z = dst;\r
FLAG_N = NFLAG_8(dst);\r
FLAG_V = VFLAG_CLEAR;\r
FLAG_C = CFLAG_CLEAR;\r
-// m68ki_write_8(ea, dst | 0x80); // notaz: genesis, but only to mem\r
+\r
+ /* The Genesis/Megadrive games Gargoyles and Ex-Mutants need the TAS writeback\r
+ disabled in order to function properly. Some Amiga software may also rely\r
+ on this, but only when accessing specific addresses so additional functionality\r
+ will be needed. */\r
+ allow_writeback = m68ki_tas_callback();\r
+\r
+ if (allow_writeback==1) m68ki_write_8(ea, dst | 0x80);\r
}\r
\r
\r
#define M68K_RTE_CALLBACK() your_rte_handler_function()\r
\r
\r
+/* If ON, CPU will call the callback when it encounters a tas\r
+ * instruction.\r
+ */\r
+#define M68K_TAS_HAS_CALLBACK OPT_ON\r
+#define M68K_TAS_CALLBACK() your_tas_handler_function()\r
+\r
+\r
/* If ON, CPU will call the set fc callback on every memory access to\r
* differentiate between user/supervisor, program/data access like a real\r
* 68000 would. This should be enabled and the callback should be set if you\r
#if 0\r
static const char* copyright_notice =\r
"MUSASHI\n"\r
-"Version 3.3 (2001-01-29)\n"\r
+"Version 3.31 (2007-07-09)\n"\r
"A portable Motorola M680x0 processor emulation engine.\n"\r
-"Copyright 1998-2001 Karl Stenerud. All rights reserved.\n"\r
+"Copyright 1998-2007 Karl Stenerud. All rights reserved.\n"\r
"\n"\r
"This code may be freely used for non-commercial purpooses as long as this\n"\r
"copyright notice remains unaltered in the source code and any binary files\n"\r
/* ================================ INCLUDES ============================== */\r
/* ======================================================================== */\r
\r
+extern void m68040_fpu_op0(void);\r
+extern void m68040_fpu_op1(void);\r
+\r
#include "m68kops.h"\r
#include "m68kcpu.h"\r
+//#include "m68kfpu.c"\r
\r
/* ======================================================================== */\r
/* ================================= DATA ================================= */\r
/* ======================================================================== */\r
\r
-// int m68ki_initial_cycles; // moved to m68k_execute() stack\r
-// int m68ki_remaining_cycles = 0; /* Number of clocks remaining */\r
+int m68ki_initial_cycles;\r
+//int m68ki_remaining_cycles = 0; /* Number of clocks remaining */\r
uint m68ki_tracing = 0;\r
uint m68ki_address_space;\r
\r
#endif /* M68K_LOG_ENABLE */\r
\r
/* The CPU core */\r
-// m68ki_cpu_core m68ki_cpu = {0};\r
+// notaz\r
m68ki_cpu_core *m68ki_cpu_p = NULL;\r
+//m68ki_cpu_core m68ki_cpu = {0};\r
\r
\r
#if M68K_EMULATE_ADDRESS_ERROR\r
{\r
}\r
\r
+/* Called when a tas instruction is executed */\r
+static int default_tas_instr_callback(void)\r
+{\r
+ return 1; // allow writeback\r
+}\r
+\r
/* Called when the program counter changed by a large value */\r
static unsigned int default_pc_changed_callback_data;\r
static void default_pc_changed_callback(unsigned int new_pc)\r
CALLBACK_RTE_INSTR = callback ? callback : default_rte_instr_callback;\r
}\r
\r
+void m68k_set_tas_instr_callback(int (*callback)(void))\r
+{\r
+ CALLBACK_TAS_INSTR = callback ? callback : default_tas_instr_callback;\r
+}\r
+\r
void m68k_set_pc_changed_callback(void (*callback)(unsigned int new_pc))\r
{\r
CALLBACK_PC_CHANGED = callback ? callback : default_pc_changed_callback;\r
/* ASG: removed per-instruction interrupt checks */\r
int m68k_execute(int num_cycles)\r
{\r
- int m68ki_initial_cycles;\r
-\r
/* Make sure we're not stopped */\r
if(!CPU_STOPPED)\r
{\r
m68ki_set_address_error_trap(); /* auto-disable (see m68kcpu.h) */\r
\r
/* Main loop. Keep going until we run out of clock cycles */\r
+ // notaz\r
while(GET_CYCLES() >= 0)\r
+// do\r
{\r
/* Set tracing accodring to T1. (T0 is done inside instruction) */\r
m68ki_trace_t1(); /* auto-disable (see m68kcpu.h) */\r
\r
/* Trace m68k_exception, if necessary */\r
m68ki_exception_if_trace(); /* auto-disable (see m68kcpu.h) */\r
- }\r
+ } // while(GET_CYCLES() > 0); // notaz\r
\r
/* set previous PC to current PC for the next entry into the loop */\r
REG_PPC = REG_PC;\r
return num_cycles;\r
}\r
\r
-#if 0\r
+\r
int m68k_cycles_run(void)\r
{\r
return m68ki_initial_cycles - GET_CYCLES();\r
}\r
-#endif\r
\r
int m68k_cycles_remaining(void)\r
{\r
return GET_CYCLES();\r
}\r
\r
-#if 0\r
/* Change the timeslice */\r
void m68k_modify_timeslice(int cycles)\r
{\r
m68ki_initial_cycles = GET_CYCLES();\r
SET_CYCLES(0);\r
}\r
-#endif\r
+\r
\r
/* ASG: rewrote so that the int_level is a mask of the IPL0/IPL1/IPL2 bits */\r
/* KS: Modified so that IPL* bits match with mask positions in the SR\r
m68k_set_reset_instr_callback(NULL);\r
m68k_set_cmpild_instr_callback(NULL);\r
m68k_set_rte_instr_callback(NULL);\r
+ m68k_set_tas_instr_callback(NULL);\r
m68k_set_pc_changed_callback(NULL);\r
m68k_set_fc_callback(NULL);\r
m68k_set_instr_hook_callback(NULL);\r
return sizeof(m68ki_cpu_core);\r
}\r
\r
-/*\r
unsigned int m68k_get_context(void* dst)\r
{\r
if(dst) *(m68ki_cpu_core*)dst = m68ki_cpu;\r
return sizeof(m68ki_cpu_core);\r
}\r
-*/\r
\r
void m68k_set_context(void* src)\r
{\r
+ // notaz\r
if(src) m68ki_cpu_p = src;\r
+// if(src) m68ki_cpu = *(m68ki_cpu_core*)src;\r
}\r
\r
\r
\r
#if M68K_COMPILE_FOR_MAME == OPT_ON\r
\r
-#include "state.h"\r
-\r
static struct {\r
UINT16 sr;\r
UINT8 stopped;\r
/* ======================================================================== */\r
/*\r
* MUSASHI\r
- * Version 3.3\r
+ * Version 3.31\r
*\r
* A portable Motorola M680x0 processor emulation engine.\r
- * Copyright 1998-2001 Karl Stenerud. All rights reserved.\r
+ * Copyright 1998-2007 Karl Stenerud. All rights reserved.\r
*\r
* This code may be freely used for non-commercial purposes as long as this\r
* copyright notice remains unaltered in the source code and any binary files\r
\r
// notaz: something's missing this\r
#ifndef UINT16\r
+#define UINT64 unsigned long long\r
#define UINT32 unsigned int\r
#define UINT16 unsigned short\r
#define UINT8 unsigned char\r
\r
#define sint8 signed char /* ASG: changed from char to signed char */\r
#define sint16 signed short\r
-#define sint32 signed long\r
+#define sint32 signed int /* AWJ: changed from long to int */\r
#define uint8 unsigned char\r
#define uint16 unsigned short\r
-#define uint32 unsigned long\r
+#define uint32 unsigned int /* AWJ: changed from long to int */\r
\r
/* signed and unsigned int must be at least 32 bits wide */\r
#define sint signed int\r
\r
\r
/* Allow for architectures that don't have 32-bit sizes */\r
-#if ULONG_MAX == 0xffffffff\r
+#if UINT_MAX == 0xffffffff\r
#define MAKE_INT_32(A) (sint32)(A)\r
#else\r
#undef sint32\r
{\r
return (value & 0x80000000) ? value | ~0xffffffff : value & 0xffffffff;\r
}\r
-#endif /* ULONG_MAX == 0xffffffff */\r
+#endif /* UINT_MAX == 0xffffffff */\r
\r
-// notaz\r
-INLINE sint32 MAKE_INT_24(uint value)\r
-{\r
- return (value & 0x800000) ? value | ~0xffffff : value & 0xffffff;\r
-}\r
\r
\r
\r
#define REG_CAAR m68ki_cpu.caar\r
#define REG_IR m68ki_cpu.ir\r
\r
+#define REG_FP m68ki_cpu.fpr\r
+#define REG_FPCR m68ki_cpu.fpcr\r
+#define REG_FPSR m68ki_cpu.fpsr\r
+#define REG_FPIAR m68ki_cpu.fpiar\r
+\r
#define FLAG_T1 m68ki_cpu.t1_flag\r
#define FLAG_T0 m68ki_cpu.t0_flag\r
#define FLAG_S m68ki_cpu.s_flag\r
#define CALLBACK_RESET_INSTR m68ki_cpu.reset_instr_callback\r
#define CALLBACK_CMPILD_INSTR m68ki_cpu.cmpild_instr_callback\r
#define CALLBACK_RTE_INSTR m68ki_cpu.rte_instr_callback\r
+#define CALLBACK_TAS_INSTR m68ki_cpu.tas_instr_callback\r
#define CALLBACK_PC_CHANGED m68ki_cpu.pc_changed_callback\r
#define CALLBACK_SET_FC m68ki_cpu.set_fc_callback\r
#define CALLBACK_INSTR_HOOK m68ki_cpu.instr_hook_callback\r
#define m68ki_rte_callback()\r
#endif /* M68K_RTE_HAS_CALLBACK */\r
\r
+#if M68K_TAS_HAS_CALLBACK\r
+ #if M68K_TAS_HAS_CALLBACK == OPT_SPECIFY_HANDLER\r
+ #define m68ki_tas_callback() M68K_TAS_CALLBACK()\r
+ #else\r
+ #define m68ki_tas_callback() CALLBACK_TAS_INSTR()\r
+ #endif\r
+#else\r
+ #define m68ki_tas_callback()\r
+#endif /* M68K_TAS_HAS_CALLBACK */\r
+\r
+\r
#if M68K_INSTRUCTION_HOOK\r
#if M68K_INSTRUCTION_HOOK == OPT_SPECIFY_HANDLER\r
#define m68ki_instr_hook() M68K_INSTRUCTION_CALLBACK()\r
/* =============================== PROTOTYPES ============================= */\r
/* ======================================================================== */\r
\r
+typedef union\r
+{\r
+ UINT64 i;\r
+ double f;\r
+} fp_reg;\r
+\r
typedef struct\r
{\r
uint cpu_type; /* CPU Type: 68000, 68008, 68010, 68EC020, or 68020 */\r
uint cacr; /* Cache Control Register (m68020, unemulated) */\r
uint caar; /* Cache Address Register (m68020, unemulated) */\r
uint ir; /* Instruction Register */\r
+ fp_reg fpr[8]; /* FPU Data Register (m68040) */\r
+ uint fpiar; /* FPU Instruction Address Register (m68040) */\r
+ uint fpsr; /* FPU Status Register (m68040) */\r
+ uint fpcr; /* FPU Control Register (m68040) */\r
uint t1_flag; /* Trace 1 */\r
uint t0_flag; /* Trace 0 */\r
uint s_flag; /* Supervisor */\r
void (*reset_instr_callback)(void); /* Called when a RESET instruction is encountered */\r
void (*cmpild_instr_callback)(unsigned int, int); /* Called when a CMPI.L #v, Dn instruction is encountered */\r
void (*rte_instr_callback)(void); /* Called when a RTE instruction is encountered */\r
+ int (*tas_instr_callback)(void); /* Called when a TAS instruction is encountered, allows / disallows writeback */\r
void (*pc_changed_callback)(unsigned int new_pc); /* Called when the PC changes by a large amount */\r
void (*set_fc_callback)(unsigned int new_fc); /* Called when the CPU function code changes */\r
void (*instr_hook_callback)(void); /* Called every instruction cycle prior to execution */\r
\r
+ // notaz\r
sint cyc_remaining_cycles;\r
} m68ki_cpu_core;\r
\r
-\r
+// notaz\r
extern m68ki_cpu_core *m68ki_cpu_p;\r
-#define m68ki_cpu (*m68ki_cpu_p) // test\r
-\r
-// extern sint m68ki_remaining_cycles;\r
+#define m68ki_cpu (*m68ki_cpu_p)\r
#define m68ki_remaining_cycles m68ki_cpu_p->cyc_remaining_cycles\r
\r
+\r
+//extern m68ki_cpu_core m68ki_cpu;\r
+//extern sint m68ki_remaining_cycles;\r
extern uint m68ki_tracing;\r
extern uint8 m68ki_shift_8_table[];\r
extern uint16 m68ki_shift_16_table[];\r
USE_CYCLES(CYC_EXCEPTION[EXCEPTION_ADDRESS_ERROR] - CYC_INSTRUCTION[REG_IR]);\r
}\r
\r
+\r
/* Service an interrupt request and start exception processing */\r
void m68ki_exception_interrupt(uint int_level)\r
{\r
\r
/* If we are halted, don't do anything */\r
if(CPU_STOPPED)\r
- {\r
- printf("mu stopped! (%x)\n", CPU_STOPPED);\r
return;\r
- }\r
\r
/* Acknowledge the interrupt */\r
vector = m68ki_int_ack(int_level);\r
/* ASG: Check for interrupts */\r
INLINE void m68ki_check_interrupts(void)\r
{\r
- //printf("mu level, mask: %04x %04x\n", CPU_INT_LEVEL, FLAG_INT_MASK);\r
if(CPU_INT_LEVEL > FLAG_INT_MASK)\r
m68ki_exception_interrupt(CPU_INT_LEVEL>>8);\r
}\r
/* ======================================================================== */\r
/*\r
* MUSASHI\r
- * Version 3.3\r
+ * Version 3.31\r
*\r
* A portable Motorola M680x0 processor emulation engine.\r
- * Copyright 1998-2001 Karl Stenerud. All rights reserved.\r
+ * Copyright 1998-2007 Karl Stenerud. All rights reserved.\r
*\r
* This code may be freely used for non-commercial purposes as long as this\r
* copyright notice remains unaltered in the source code and any binary files\r
static uint g_cpu_ir; /* instruction register */\r
static uint g_cpu_type;\r
static uint g_opcode_type;\r
-static unsigned char* g_rawop;\r
+static const unsigned char* g_rawop;\r
static uint g_rawbasepc;\r
-static uint g_rawlength;\r
\r
/* used by ops like asr, ror, addq, etc */\r
static uint g_3bit_qdata_table[8] = {8, 1, 2, 3, 4, 5, 6, 7};\r
if (g_rawop)\r
result = g_rawop[g_cpu_pc + 1 - g_rawbasepc];\r
else\r
- result = m68k_read_disassembler_16(g_cpu_pc & g_address_mask) & 0xff;\r
+ result = m68k_read_disassembler_16(g_cpu_pc & g_address_mask) & 0xffff; // 0xff ???\r
g_cpu_pc += advance;\r
return result;\r
}\r
result = (g_rawop[g_cpu_pc + 0 - g_rawbasepc] << 8) |\r
g_rawop[g_cpu_pc + 1 - g_rawbasepc];\r
else\r
- result = m68k_read_disassembler_16(g_cpu_pc & g_address_mask) & 0xffff; // & 0xff; ??\r
+ result = m68k_read_disassembler_16(g_cpu_pc & g_address_mask) & 0xffff; // 0xff ???\r
g_cpu_pc += advance;\r
return result;\r
}\r
(g_rawop[g_cpu_pc + 2 - g_rawbasepc] << 8) |\r
g_rawop[g_cpu_pc + 3 - g_rawbasepc];\r
else\r
- result = m68k_read_disassembler_32(g_cpu_pc & g_address_mask); // & 0xff; ??\r
+ result = m68k_read_disassembler_32(g_cpu_pc & g_address_mask) & 0xffff; // 0xff ???\r
g_cpu_pc += advance;\r
return result;\r
}\r
sprintf(g_dasm_str, "extb.l D%d; (2+)", g_cpu_ir&7);\r
}\r
\r
+static void d68040_fpu(void)\r
+{\r
+ char float_data_format[8][3] =\r
+ {\r
+ ".l", ".s", ".x", ".p", ".w", ".d", ".b", ".?"\r
+ };\r
+\r
+ char mnemonic[40];\r
+ uint w2, src, dst_reg;\r
+ LIMIT_CPU_TYPES(M68040_PLUS);\r
+ w2 = read_imm_16();\r
+\r
+ src = (w2 >> 10) & 0x7;\r
+ dst_reg = (w2 >> 7) & 0x7;\r
+\r
+ switch ((w2 >> 13) & 0x7)\r
+ {\r
+ case 0x0:\r
+ case 0x2:\r
+ {\r
+ switch(w2 & 0x7f)\r
+ {\r
+ case 0x00: sprintf(mnemonic, "fmove"); break;\r
+ case 0x01: sprintf(mnemonic, "fint"); break;\r
+ case 0x02: sprintf(mnemonic, "fsinh"); break;\r
+ case 0x03: sprintf(mnemonic, "fintrz"); break;\r
+ case 0x04: sprintf(mnemonic, "fsqrt"); break;\r
+ case 0x06: sprintf(mnemonic, "flognp1"); break;\r
+ case 0x08: sprintf(mnemonic, "fetoxm1"); break;\r
+ case 0x09: sprintf(mnemonic, "ftanh1"); break;\r
+ case 0x0a: sprintf(mnemonic, "fatan"); break;\r
+ case 0x0c: sprintf(mnemonic, "fasin"); break;\r
+ case 0x0d: sprintf(mnemonic, "fatanh"); break;\r
+ case 0x0e: sprintf(mnemonic, "fsin"); break;\r
+ case 0x0f: sprintf(mnemonic, "ftan"); break;\r
+ case 0x10: sprintf(mnemonic, "fetox"); break;\r
+ case 0x11: sprintf(mnemonic, "ftwotox"); break;\r
+ case 0x12: sprintf(mnemonic, "ftentox"); break;\r
+ case 0x14: sprintf(mnemonic, "flogn"); break;\r
+ case 0x15: sprintf(mnemonic, "flog10"); break;\r
+ case 0x16: sprintf(mnemonic, "flog2"); break;\r
+ case 0x18: sprintf(mnemonic, "fabs"); break;\r
+ case 0x19: sprintf(mnemonic, "fcosh"); break;\r
+ case 0x1a: sprintf(mnemonic, "fneg"); break;\r
+ case 0x1c: sprintf(mnemonic, "facos"); break;\r
+ case 0x1d: sprintf(mnemonic, "fcos"); break;\r
+ case 0x1e: sprintf(mnemonic, "fgetexp"); break;\r
+ case 0x1f: sprintf(mnemonic, "fgetman"); break;\r
+ case 0x20: sprintf(mnemonic, "fdiv"); break;\r
+ case 0x21: sprintf(mnemonic, "fmod"); break;\r
+ case 0x22: sprintf(mnemonic, "fadd"); break;\r
+ case 0x23: sprintf(mnemonic, "fmul"); break;\r
+ case 0x24: sprintf(mnemonic, "fsgldiv"); break;\r
+ case 0x25: sprintf(mnemonic, "frem"); break;\r
+ case 0x26: sprintf(mnemonic, "fscale"); break;\r
+ case 0x27: sprintf(mnemonic, "fsglmul"); break;\r
+ case 0x28: sprintf(mnemonic, "fsub"); break;\r
+ case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37:\r
+ sprintf(mnemonic, "fsincos"); break;\r
+ case 0x38: sprintf(mnemonic, "fcmp"); break;\r
+ case 0x3a: sprintf(mnemonic, "ftst"); break;\r
+ case 0x41: sprintf(mnemonic, "fssqrt"); break;\r
+ case 0x45: sprintf(mnemonic, "fdsqrt"); break;\r
+ case 0x58: sprintf(mnemonic, "fsabs"); break;\r
+ case 0x5a: sprintf(mnemonic, "fsneg"); break;\r
+ case 0x5c: sprintf(mnemonic, "fdabs"); break;\r
+ case 0x5e: sprintf(mnemonic, "fdneg"); break;\r
+ case 0x60: sprintf(mnemonic, "fsdiv"); break;\r
+ case 0x62: sprintf(mnemonic, "fsadd"); break;\r
+ case 0x63: sprintf(mnemonic, "fsmul"); break;\r
+ case 0x64: sprintf(mnemonic, "fddiv"); break;\r
+ case 0x66: sprintf(mnemonic, "fdadd"); break;\r
+ case 0x67: sprintf(mnemonic, "fdmul"); break;\r
+ case 0x68: sprintf(mnemonic, "fssub"); break;\r
+ case 0x6c: sprintf(mnemonic, "fdsub"); break;\r
+\r
+ default: sprintf(mnemonic, "FPU (?)"); break;\r
+ }\r
+\r
+ if (w2 & 0x4000)\r
+ {\r
+ sprintf(g_dasm_str, "%s%s %s, FP%d", mnemonic, float_data_format[src], get_ea_mode_str_32(g_cpu_ir), dst_reg);\r
+ }\r
+ else\r
+ {\r
+ sprintf(g_dasm_str, "%s.x FP%d, FP%d", mnemonic, src, dst_reg);\r
+ }\r
+ break;\r
+ }\r
+\r
+ case 0x3:\r
+ {\r
+ sprintf(g_dasm_str, "fmove /todo");\r
+ break;\r
+ }\r
+\r
+ case 0x4:\r
+ case 0x5:\r
+ {\r
+ sprintf(g_dasm_str, "fmove /todo");\r
+ break;\r
+ }\r
+\r
+ case 0x6:\r
+ case 0x7:\r
+ {\r
+ sprintf(g_dasm_str, "fmovem /todo");\r
+ break;\r
+ }\r
+\r
+ default:\r
+ {\r
+ sprintf(g_dasm_str, "FPU (?) ");\r
+ break;\r
+ }\r
+ }\r
+}\r
+\r
static void d68000_jmp(void)\r
{\r
sprintf(g_dasm_str, "jmp %s", get_ea_mode_str_32(g_cpu_ir));\r
processor = "?";\r
}\r
\r
- if(BIT_1(g_cpu_ir))\r
+ if(BIT_0(g_cpu_ir))\r
sprintf(g_dasm_str, "movec %c%d, %s; (%s)", BIT_F(extension) ? 'A' : 'D', (extension>>12)&7, reg_name, processor);\r
else\r
sprintf(g_dasm_str, "movec %s, %c%d; (%s)", reg_name, BIT_F(extension) ? 'A' : 'D', (extension>>12)&7, processor);\r
{d68020_extb_32 , 0xfff8, 0x49c0, 0x000},\r
{d68000_ext_16 , 0xfff8, 0x4880, 0x000},\r
{d68000_ext_32 , 0xfff8, 0x48c0, 0x000},\r
+ {d68040_fpu , 0xffc0, 0xf200, 0x000},\r
{d68000_illegal , 0xffff, 0x4afc, 0x000},\r
{d68000_jmp , 0xffc0, 0x4ec0, 0x27b},\r
{d68000_jsr , 0xffc0, 0x4e80, 0x27b},\r
return buff;\r
}\r
\r
-unsigned int m68k_disassemble_raw(char* str_buff, unsigned int pc, unsigned char* opdata, unsigned char* argdata, int length, unsigned int cpu_type)\r
+unsigned int m68k_disassemble_raw(char* str_buff, unsigned int pc, const unsigned char* opdata, const unsigned char* argdata, unsigned int cpu_type)\r
{\r
unsigned int result;\r
\r
g_rawop = opdata;\r
g_rawbasepc = pc;\r
- g_rawlength = length;\r
result = m68k_disassemble(str_buff, pc, cpu_type);\r
g_rawop = NULL;\r
return result;\r
return 0;\r
if(g_instruction_table[instruction] == d68040_pflush)\r
return 0;\r
+ case M68K_CPU_TYPE_68040:\r
+ if(g_instruction_table[instruction] == d68020_cpbcc_16)\r
+ return 0;\r
+ if(g_instruction_table[instruction] == d68020_cpbcc_32)\r
+ return 0;\r
+ if(g_instruction_table[instruction] == d68020_cpdbcc)\r
+ return 0;\r
+ if(g_instruction_table[instruction] == d68020_cpgen)\r
+ return 0;\r
+ if(g_instruction_table[instruction] == d68020_cprestore)\r
+ return 0;\r
+ if(g_instruction_table[instruction] == d68020_cpsave)\r
+ return 0;\r
+ if(g_instruction_table[instruction] == d68020_cpscc)\r
+ return 0;\r
+ if(g_instruction_table[instruction] == d68020_cptrapcc_0)\r
+ return 0;\r
+ if(g_instruction_table[instruction] == d68020_cptrapcc_16)\r
+ return 0;\r
+ if(g_instruction_table[instruction] == d68020_cptrapcc_32)\r
+ return 0;\r
}\r
if(cpu_type != M68K_CPU_TYPE_68020 && cpu_type != M68K_CPU_TYPE_68EC020 &&\r
(g_instruction_table[instruction] == d68020_callm ||\r
/* ======================================================================== */\r
/*\r
* MUSASHI\r
- * Version 3.3\r
+ * Version 3.31\r
*\r
* A portable Motorola M680x0 processor emulation engine.\r
- * Copyright 1998-2001 Karl Stenerud. All rights reserved.\r
+ * Copyright 1998-2007 Karl Stenerud. All rights reserved.\r
*\r
* This code may be freely used for non-commercial purposes as long as this\r
* copyright notice remains unaltered in the source code and any binary files\r
*/\r
\r
\r
-const char* g_version = "3.3";\r
+static const char* g_version = "3.31";\r
\r
/* ======================================================================== */\r
/* =============================== INCLUDES =============================== */\r
#define FILENAME_INPUT "m68k_in.c"\r
#define FILENAME_PROTOTYPE "m68kops.h"\r
#define FILENAME_TABLE "m68kops.c"\r
-#define FILENAME_OPS_AC "m68kopac.c"\r
-#define FILENAME_OPS_DM "m68kopdm.c"\r
-#define FILENAME_OPS_NZ "m68kopnz.c"\r
\r
\r
/* Identifier sequences recognized by this program */\r
void generate_opcode_handler(FILE* filep, body_struct* body, replace_struct* replace, opcode_struct* opinfo, int ea_mode);\r
void generate_opcode_ea_variants(FILE* filep, body_struct* body, replace_struct* replace, opcode_struct* op);\r
void generate_opcode_cc_variants(FILE* filep, body_struct* body, replace_struct* replace, opcode_struct* op_in, int offset);\r
-void process_opcode_handlers(void);\r
+void process_opcode_handlers(FILE* filep);\r
void populate_table(void);\r
void read_insert(char* insert);\r
\r
FILE* g_input_file = NULL;\r
FILE* g_prototype_file = NULL;\r
FILE* g_table_file = NULL;\r
-FILE* g_ops_ac_file = NULL;\r
-FILE* g_ops_dm_file = NULL;\r
-FILE* g_ops_nz_file = NULL;\r
\r
int g_num_functions = 0; /* Number of functions processed */\r
int g_num_primitives = 0; /* Number of function primitives read */\r
\r
if(g_prototype_file) fclose(g_prototype_file);\r
if(g_table_file) fclose(g_table_file);\r
- if(g_ops_ac_file) fclose(g_ops_ac_file);\r
- if(g_ops_dm_file) fclose(g_ops_dm_file);\r
- if(g_ops_nz_file) fclose(g_ops_nz_file);\r
if(g_input_file) fclose(g_input_file);\r
\r
exit(EXIT_FAILURE);\r
\r
if(g_prototype_file) fclose(g_prototype_file);\r
if(g_table_file) fclose(g_table_file);\r
- if(g_ops_ac_file) fclose(g_ops_ac_file);\r
- if(g_ops_dm_file) fclose(g_ops_dm_file);\r
- if(g_ops_nz_file) fclose(g_ops_nz_file);\r
if(g_input_file) fclose(g_input_file);\r
\r
exit(EXIT_FAILURE);\r
}\r
\r
/* Process the opcode handlers section of the input file */\r
-void process_opcode_handlers(void)\r
+void process_opcode_handlers(FILE* filep)\r
{\r
FILE* input_file = g_input_file;\r
- FILE* output_file;\r
char func_name[MAX_LINE_LENGTH+1];\r
char oper_name[MAX_LINE_LENGTH+1];\r
int oper_size;\r
replace_struct* replace = malloc(sizeof(replace_struct));\r
body_struct* body = malloc(sizeof(body_struct));\r
\r
-\r
- output_file = g_ops_ac_file;\r
-\r
for(;;)\r
{\r
/* Find the first line of the function */\r
if(opinfo == NULL)\r
error_exit("Unable to find matching table entry for %s", func_name);\r
\r
- /* Change output files if we pass 'c' or 'n' */\r
- if(output_file == g_ops_ac_file && oper_name[0] > 'c')\r
- output_file = g_ops_dm_file;\r
- else if(output_file == g_ops_dm_file && oper_name[0] > 'm')\r
- output_file = g_ops_nz_file;\r
-\r
replace->length = 0;\r
\r
/* Generate opcode variants */\r
if(strcmp(opinfo->name, "bcc") == 0 || strcmp(opinfo->name, "scc") == 0)\r
- generate_opcode_cc_variants(output_file, body, replace, opinfo, 1);\r
+ generate_opcode_cc_variants(filep, body, replace, opinfo, 1);\r
else if(strcmp(opinfo->name, "dbcc") == 0)\r
- generate_opcode_cc_variants(output_file, body, replace, opinfo, 2);\r
+ generate_opcode_cc_variants(filep, body, replace, opinfo, 2);\r
else if(strcmp(opinfo->name, "trapcc") == 0)\r
- generate_opcode_cc_variants(output_file, body, replace, opinfo, 4);\r
+ generate_opcode_cc_variants(filep, body, replace, opinfo, 4);\r
else\r
- generate_opcode_ea_variants(output_file, body, replace, opinfo);\r
+ generate_opcode_ea_variants(filep, body, replace, opinfo);\r
}\r
\r
free(replace);\r
/* Inserts */\r
char temp_insert[MAX_INSERT_LENGTH+1];\r
char prototype_footer_insert[MAX_INSERT_LENGTH+1];\r
+ char table_header_insert[MAX_INSERT_LENGTH+1];\r
char table_footer_insert[MAX_INSERT_LENGTH+1];\r
+ char ophandler_header_insert[MAX_INSERT_LENGTH+1];\r
char ophandler_footer_insert[MAX_INSERT_LENGTH+1];\r
/* Flags if we've processed certain parts already */\r
int prototype_header_read = 0;\r
int table_body_read = 0;\r
int ophandler_body_read = 0;\r
\r
- printf("\n\t\tMusashi v%s 68000, 68008, 68010, 68EC020, 68020 emulator\n", g_version);\r
- printf("\t\tCopyright 1998-2000 Karl Stenerud (karl@mame.net)\n\n");\r
+ printf("\n\tMusashi v%s 68000, 68008, 68010, 68EC020, 68020, 68040 emulator\n", g_version);\r
+ printf("\tCopyright 1998-2007 Karl Stenerud (karl@mame.net)\n\n");\r
\r
/* Check if output path and source for the input file are given */\r
if(argc > 1)\r
if((g_table_file = fopen(filename, "w")) == NULL)\r
perror_exit("Unable to create table file (%s)\n", filename);\r
\r
- sprintf(filename, "%s%s", output_path, FILENAME_OPS_AC);\r
- if((g_ops_ac_file = fopen(filename, "w")) == NULL)\r
- perror_exit("Unable to create ops ac file (%s)\n", filename);\r
-\r
- sprintf(filename, "%s%s", output_path, FILENAME_OPS_DM);\r
- if((g_ops_dm_file = fopen(filename, "w")) == NULL)\r
- perror_exit("Unable to create ops dm file (%s)\n", filename);\r
-\r
- sprintf(filename, "%s%s", output_path, FILENAME_OPS_NZ);\r
- if((g_ops_nz_file = fopen(filename, "w")) == NULL)\r
- perror_exit("Unable to create ops nz file (%s)\n", filename);\r
-\r
if((g_input_file=fopen(g_input_filename, "r")) == NULL)\r
perror_exit("can't open %s for input", g_input_filename);\r
\r
if((g_table_file = fopen(filename, "wt")) == NULL)\r
perror_exit("Unable to create table file (%s)\n", filename);\r
\r
- sprintf(filename, "%s%s", output_path, FILENAME_OPS_AC);\r
- if((g_ops_ac_file = fopen(filename, "wt")) == NULL)\r
- perror_exit("Unable to create ops ac file (%s)\n", filename);\r
-\r
- sprintf(filename, "%s%s", output_path, FILENAME_OPS_DM);\r
- if((g_ops_dm_file = fopen(filename, "wt")) == NULL)\r
- perror_exit("Unable to create ops dm file (%s)\n", filename);\r
-\r
- sprintf(filename, "%s%s", output_path, FILENAME_OPS_NZ);\r
- if((g_ops_nz_file = fopen(filename, "wt")) == NULL)\r
- perror_exit("Unable to create ops nz file (%s)\n", filename);\r
-\r
if((g_input_file=fopen(g_input_filename, "rt")) == NULL)\r
perror_exit("can't open %s for input", g_input_filename);\r
\r
{\r
if(table_header_read)\r
error_exit("Duplicate table header");\r
- read_insert(temp_insert);\r
- fprintf(g_table_file, "%s", temp_insert);\r
+ read_insert(table_header_insert);\r
table_header_read = 1;\r
}\r
else if(strcmp(section_id, ID_OPHANDLER_HEADER) == 0)\r
{\r
if(ophandler_header_read)\r
error_exit("Duplicate opcode handler header");\r
- read_insert(temp_insert);\r
- fprintf(g_ops_ac_file, "%s\n\n", temp_insert);\r
- fprintf(g_ops_dm_file, "%s\n\n", temp_insert);\r
- fprintf(g_ops_nz_file, "%s\n\n", temp_insert);\r
+ read_insert(ophandler_header_insert);\r
ophandler_header_read = 1;\r
}\r
else if(strcmp(section_id, ID_PROTOTYPE_FOOTER) == 0)\r
if(ophandler_body_read)\r
error_exit("Duplicate opcode handler section");\r
\r
- process_opcode_handlers();\r
+ fprintf(g_table_file, "%s\n\n", ophandler_header_insert);\r
+ process_opcode_handlers(g_table_file);\r
+ fprintf(g_table_file, "%s\n\n", ophandler_footer_insert);\r
\r
ophandler_body_read = 1;\r
}\r
if(!ophandler_body_read)\r
error_exit("Missing opcode handler body");\r
\r
+ fprintf(g_table_file, "%s\n\n", table_header_insert);\r
print_opcode_output_table(g_table_file);\r
+ fprintf(g_table_file, "%s\n\n", table_footer_insert);\r
\r
fprintf(g_prototype_file, "%s\n\n", prototype_footer_insert);\r
- fprintf(g_table_file, "%s\n\n", table_footer_insert);\r
- fprintf(g_ops_ac_file, "%s\n\n", ophandler_footer_insert);\r
- fprintf(g_ops_dm_file, "%s\n\n", ophandler_footer_insert);\r
- fprintf(g_ops_nz_file, "%s\n\n", ophandler_footer_insert);\r
\r
break;\r
}\r
/* Close all files and exit */\r
fclose(g_prototype_file);\r
fclose(g_table_file);\r
- fclose(g_ops_ac_file);\r
- fclose(g_ops_dm_file);\r
- fclose(g_ops_nz_file);\r
fclose(g_input_file);\r
\r
printf("Generated %d opcode handlers from %d primitives\n", g_num_functions, g_num_primitives);\r
+++ /dev/null
-#include "m68kcpu.h"\r
-\r
-/* ======================================================================== */\r
-/* ========================= INSTRUCTION HANDLERS ========================= */\r
-/* ======================================================================== */\r
-\r
-\r
-void m68k_op_1010(void)\r
-{\r
- m68ki_exception_1010();\r
-}\r
-\r
-\r
-void m68k_op_1111(void)\r
-{\r
- m68ki_exception_1111();\r
-}\r
-\r
-\r
-void m68k_op_abcd_8_rr(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = DY;\r
- uint dst = *r_dst;\r
- uint res = LOW_NIBBLE(src) + LOW_NIBBLE(dst) + XFLAG_AS_1();\r
-\r
- FLAG_V = ~res; /* Undefined V behavior */\r
-\r
- if(res > 9)\r
- res += 6;\r
- res += HIGH_NIBBLE(src) + HIGH_NIBBLE(dst);\r
- FLAG_X = FLAG_C = (res > 0x99) << 8;\r
- if(FLAG_C)\r
- res -= 0xa0;\r
-\r
- FLAG_V &= res; /* Undefined V behavior part II */\r
- FLAG_N = NFLAG_8(res); /* Undefined N behavior */\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
- FLAG_Z |= res;\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
-}\r
-\r
-\r
-void m68k_op_abcd_8_mm_ax7(void)\r
-{\r
- uint src = OPER_AY_PD_8();\r
- uint ea = EA_A7_PD_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = LOW_NIBBLE(src) + LOW_NIBBLE(dst) + XFLAG_AS_1();\r
-\r
- FLAG_V = ~res; /* Undefined V behavior */\r
-\r
- if(res > 9)\r
- res += 6;\r
- res += HIGH_NIBBLE(src) + HIGH_NIBBLE(dst);\r
- FLAG_X = FLAG_C = (res > 0x99) << 8;\r
- if(FLAG_C)\r
- res -= 0xa0;\r
-\r
- FLAG_V &= res; /* Undefined V behavior part II */\r
- FLAG_N = NFLAG_8(res); /* Undefined N behavior */\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_abcd_8_mm_ay7(void)\r
-{\r
- uint src = OPER_A7_PD_8();\r
- uint ea = EA_AX_PD_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = LOW_NIBBLE(src) + LOW_NIBBLE(dst) + XFLAG_AS_1();\r
-\r
- FLAG_V = ~res; /* Undefined V behavior */\r
-\r
- if(res > 9)\r
- res += 6;\r
- res += HIGH_NIBBLE(src) + HIGH_NIBBLE(dst);\r
- FLAG_X = FLAG_C = (res > 0x99) << 8;\r
- if(FLAG_C)\r
- res -= 0xa0;\r
-\r
- FLAG_V &= res; /* Undefined V behavior part II */\r
- FLAG_N = NFLAG_8(res); /* Undefined N behavior */\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_abcd_8_mm_axy7(void)\r
-{\r
- uint src = OPER_A7_PD_8();\r
- uint ea = EA_A7_PD_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = LOW_NIBBLE(src) + LOW_NIBBLE(dst) + XFLAG_AS_1();\r
-\r
- FLAG_V = ~res; /* Undefined V behavior */\r
-\r
- if(res > 9)\r
- res += 6;\r
- res += HIGH_NIBBLE(src) + HIGH_NIBBLE(dst);\r
- FLAG_X = FLAG_C = (res > 0x99) << 8;\r
- if(FLAG_C)\r
- res -= 0xa0;\r
-\r
- FLAG_V &= res; /* Undefined V behavior part II */\r
- FLAG_N = NFLAG_8(res); /* Undefined N behavior */\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_abcd_8_mm(void)\r
-{\r
- uint src = OPER_AY_PD_8();\r
- uint ea = EA_AX_PD_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = LOW_NIBBLE(src) + LOW_NIBBLE(dst) + XFLAG_AS_1();\r
-\r
- FLAG_V = ~res; /* Undefined V behavior */\r
-\r
- if(res > 9)\r
- res += 6;\r
- res += HIGH_NIBBLE(src) + HIGH_NIBBLE(dst);\r
- FLAG_X = FLAG_C = (res > 0x99) << 8;\r
- if(FLAG_C)\r
- res -= 0xa0;\r
-\r
- FLAG_V &= res; /* Undefined V behavior part II */\r
- FLAG_N = NFLAG_8(res); /* Undefined N behavior */\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_add_8_er_d(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = MASK_OUT_ABOVE_8(DY);\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_8_er_ai(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_AI_8();\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_8_er_pi(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_PI_8();\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_8_er_pi7(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_A7_PI_8();\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_8_er_pd(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_PD_8();\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_8_er_pd7(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_A7_PD_8();\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_8_er_di(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_DI_8();\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_8_er_ix(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_IX_8();\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_8_er_aw(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AW_8();\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_8_er_al(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AL_8();\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_8_er_pcdi(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_PCDI_8();\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_8_er_pcix(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_PCIX_8();\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_8_er_i(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_I_8();\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_16_er_d(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = MASK_OUT_ABOVE_16(DY);\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_16_er_a(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = MASK_OUT_ABOVE_16(AY);\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_16_er_ai(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_AI_16();\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_16_er_pi(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_PI_16();\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_16_er_pd(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_PD_16();\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_16_er_di(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_DI_16();\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_16_er_ix(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_IX_16();\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_16_er_aw(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AW_16();\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_16_er_al(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AL_16();\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_16_er_pcdi(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_PCDI_16();\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_16_er_pcix(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_PCIX_16();\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_16_er_i(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_I_16();\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_32_er_d(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = DY;\r
- uint dst = *r_dst;\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_32_er_a(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = AY;\r
- uint dst = *r_dst;\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_32_er_ai(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_AI_32();\r
- uint dst = *r_dst;\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_32_er_pi(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_PI_32();\r
- uint dst = *r_dst;\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_32_er_pd(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_PD_32();\r
- uint dst = *r_dst;\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_32_er_di(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_DI_32();\r
- uint dst = *r_dst;\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_32_er_ix(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_IX_32();\r
- uint dst = *r_dst;\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_32_er_aw(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AW_32();\r
- uint dst = *r_dst;\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_32_er_al(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AL_32();\r
- uint dst = *r_dst;\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_32_er_pcdi(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_PCDI_32();\r
- uint dst = *r_dst;\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_32_er_pcix(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_PCIX_32();\r
- uint dst = *r_dst;\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_32_er_i(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_I_32();\r
- uint dst = *r_dst;\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_add_8_re_ai(void)\r
-{\r
- uint ea = EA_AY_AI_8();\r
- uint src = MASK_OUT_ABOVE_8(DX);\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_add_8_re_pi(void)\r
-{\r
- uint ea = EA_AY_PI_8();\r
- uint src = MASK_OUT_ABOVE_8(DX);\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_add_8_re_pi7(void)\r
-{\r
- uint ea = EA_A7_PI_8();\r
- uint src = MASK_OUT_ABOVE_8(DX);\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_add_8_re_pd(void)\r
-{\r
- uint ea = EA_AY_PD_8();\r
- uint src = MASK_OUT_ABOVE_8(DX);\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_add_8_re_pd7(void)\r
-{\r
- uint ea = EA_A7_PD_8();\r
- uint src = MASK_OUT_ABOVE_8(DX);\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_add_8_re_di(void)\r
-{\r
- uint ea = EA_AY_DI_8();\r
- uint src = MASK_OUT_ABOVE_8(DX);\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_add_8_re_ix(void)\r
-{\r
- uint ea = EA_AY_IX_8();\r
- uint src = MASK_OUT_ABOVE_8(DX);\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_add_8_re_aw(void)\r
-{\r
- uint ea = EA_AW_8();\r
- uint src = MASK_OUT_ABOVE_8(DX);\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_add_8_re_al(void)\r
-{\r
- uint ea = EA_AL_8();\r
- uint src = MASK_OUT_ABOVE_8(DX);\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_add_16_re_ai(void)\r
-{\r
- uint ea = EA_AY_AI_16();\r
- uint src = MASK_OUT_ABOVE_16(DX);\r
- uint dst = m68ki_read_16(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_add_16_re_pi(void)\r
-{\r
- uint ea = EA_AY_PI_16();\r
- uint src = MASK_OUT_ABOVE_16(DX);\r
- uint dst = m68ki_read_16(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_add_16_re_pd(void)\r
-{\r
- uint ea = EA_AY_PD_16();\r
- uint src = MASK_OUT_ABOVE_16(DX);\r
- uint dst = m68ki_read_16(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_add_16_re_di(void)\r
-{\r
- uint ea = EA_AY_DI_16();\r
- uint src = MASK_OUT_ABOVE_16(DX);\r
- uint dst = m68ki_read_16(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_add_16_re_ix(void)\r
-{\r
- uint ea = EA_AY_IX_16();\r
- uint src = MASK_OUT_ABOVE_16(DX);\r
- uint dst = m68ki_read_16(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_add_16_re_aw(void)\r
-{\r
- uint ea = EA_AW_16();\r
- uint src = MASK_OUT_ABOVE_16(DX);\r
- uint dst = m68ki_read_16(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_add_16_re_al(void)\r
-{\r
- uint ea = EA_AL_16();\r
- uint src = MASK_OUT_ABOVE_16(DX);\r
- uint dst = m68ki_read_16(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_add_32_re_ai(void)\r
-{\r
- uint ea = EA_AY_AI_32();\r
- uint src = DX;\r
- uint dst = m68ki_read_32(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_add_32_re_pi(void)\r
-{\r
- uint ea = EA_AY_PI_32();\r
- uint src = DX;\r
- uint dst = m68ki_read_32(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_add_32_re_pd(void)\r
-{\r
- uint ea = EA_AY_PD_32();\r
- uint src = DX;\r
- uint dst = m68ki_read_32(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_add_32_re_di(void)\r
-{\r
- uint ea = EA_AY_DI_32();\r
- uint src = DX;\r
- uint dst = m68ki_read_32(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_add_32_re_ix(void)\r
-{\r
- uint ea = EA_AY_IX_32();\r
- uint src = DX;\r
- uint dst = m68ki_read_32(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_add_32_re_aw(void)\r
-{\r
- uint ea = EA_AW_32();\r
- uint src = DX;\r
- uint dst = m68ki_read_32(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_add_32_re_al(void)\r
-{\r
- uint ea = EA_AL_32();\r
- uint src = DX;\r
- uint dst = m68ki_read_32(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_adda_16_d(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst + MAKE_INT_16(DY));\r
-}\r
-\r
-\r
-void m68k_op_adda_16_a(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst + MAKE_INT_16(AY));\r
-}\r
-\r
-\r
-void m68k_op_adda_16_ai(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst + MAKE_INT_16(OPER_AY_AI_16()));\r
-}\r
-\r
-\r
-void m68k_op_adda_16_pi(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst + MAKE_INT_16(OPER_AY_PI_16()));\r
-}\r
-\r
-\r
-void m68k_op_adda_16_pd(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst + MAKE_INT_16(OPER_AY_PD_16()));\r
-}\r
-\r
-\r
-void m68k_op_adda_16_di(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst + MAKE_INT_16(OPER_AY_DI_16()));\r
-}\r
-\r
-\r
-void m68k_op_adda_16_ix(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst + MAKE_INT_16(OPER_AY_IX_16()));\r
-}\r
-\r
-\r
-void m68k_op_adda_16_aw(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst + MAKE_INT_16(OPER_AW_16()));\r
-}\r
-\r
-\r
-void m68k_op_adda_16_al(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst + MAKE_INT_16(OPER_AL_16()));\r
-}\r
-\r
-\r
-void m68k_op_adda_16_pcdi(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst + MAKE_INT_16(OPER_PCDI_16()));\r
-}\r
-\r
-\r
-void m68k_op_adda_16_pcix(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst + MAKE_INT_16(OPER_PCIX_16()));\r
-}\r
-\r
-\r
-void m68k_op_adda_16_i(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst + MAKE_INT_16(OPER_I_16()));\r
-}\r
-\r
-\r
-void m68k_op_adda_32_d(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst + DY);\r
-}\r
-\r
-\r
-void m68k_op_adda_32_a(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst + AY);\r
-}\r
-\r
-\r
-void m68k_op_adda_32_ai(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst + OPER_AY_AI_32());\r
-}\r
-\r
-\r
-void m68k_op_adda_32_pi(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst + OPER_AY_PI_32());\r
-}\r
-\r
-\r
-void m68k_op_adda_32_pd(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst + OPER_AY_PD_32());\r
-}\r
-\r
-\r
-void m68k_op_adda_32_di(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst + OPER_AY_DI_32());\r
-}\r
-\r
-\r
-void m68k_op_adda_32_ix(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst + OPER_AY_IX_32());\r
-}\r
-\r
-\r
-void m68k_op_adda_32_aw(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst + OPER_AW_32());\r
-}\r
-\r
-\r
-void m68k_op_adda_32_al(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst + OPER_AL_32());\r
-}\r
-\r
-\r
-void m68k_op_adda_32_pcdi(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst + OPER_PCDI_32());\r
-}\r
-\r
-\r
-void m68k_op_adda_32_pcix(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst + OPER_PCIX_32());\r
-}\r
-\r
-\r
-void m68k_op_adda_32_i(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst + OPER_I_32());\r
-}\r
-\r
-\r
-void m68k_op_addi_8_d(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint src = OPER_I_8();\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_addi_8_ai(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AY_AI_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addi_8_pi(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AY_PI_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addi_8_pi7(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_A7_PI_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addi_8_pd(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AY_PD_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addi_8_pd7(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_A7_PD_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addi_8_di(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AY_DI_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addi_8_ix(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AY_IX_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addi_8_aw(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AW_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addi_8_al(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AL_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addi_16_d(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint src = OPER_I_16();\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_addi_16_ai(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AY_AI_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addi_16_pi(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AY_PI_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addi_16_pd(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AY_PD_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addi_16_di(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AY_DI_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addi_16_ix(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AY_IX_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addi_16_aw(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AW_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addi_16_al(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AL_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addi_32_d(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint src = OPER_I_32();\r
- uint dst = *r_dst;\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_addi_32_ai(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AY_AI_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addi_32_pi(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AY_PI_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addi_32_pd(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AY_PD_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addi_32_di(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AY_DI_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addi_32_ix(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AY_IX_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addi_32_aw(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AW_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addi_32_al(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AL_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addq_8_d(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_addq_8_ai(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_AI_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addq_8_pi(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_PI_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addq_8_pi7(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_A7_PI_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addq_8_pd(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_PD_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addq_8_pd7(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_A7_PD_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addq_8_di(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_DI_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addq_8_ix(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_IX_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addq_8_aw(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AW_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addq_8_al(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AL_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addq_16_d(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_addq_16_a(void)\r
-{\r
- uint* r_dst = &AY;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst + (((REG_IR >> 9) - 1) & 7) + 1);\r
-}\r
-\r
-\r
-void m68k_op_addq_16_ai(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_AI_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addq_16_pi(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_PI_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addq_16_pd(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_PD_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addq_16_di(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_DI_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addq_16_ix(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_IX_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addq_16_aw(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AW_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addq_16_al(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AL_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addq_32_d(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint dst = *r_dst;\r
- uint res = src + dst;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_addq_32_a(void)\r
-{\r
- uint* r_dst = &AY;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst + (((REG_IR >> 9) - 1) & 7) + 1);\r
-}\r
-\r
-\r
-void m68k_op_addq_32_ai(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_AI_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = src + dst;\r
-\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addq_32_pi(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_PI_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = src + dst;\r
-\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addq_32_pd(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_PD_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = src + dst;\r
-\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addq_32_di(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_DI_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = src + dst;\r
-\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addq_32_ix(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_IX_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = src + dst;\r
-\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addq_32_aw(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AW_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = src + dst;\r
-\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addq_32_al(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AL_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = src + dst;\r
-\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_addx_8_rr(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = MASK_OUT_ABOVE_8(DY);\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = src + dst + XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
- FLAG_Z |= res;\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
-}\r
-\r
-\r
-void m68k_op_addx_16_rr(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = MASK_OUT_ABOVE_16(DY);\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = src + dst + XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
-\r
- res = MASK_OUT_ABOVE_16(res);\r
- FLAG_Z |= res;\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
-}\r
-\r
-\r
-void m68k_op_addx_32_rr(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = DY;\r
- uint dst = *r_dst;\r
- uint res = src + dst + XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
-\r
- res = MASK_OUT_ABOVE_32(res);\r
- FLAG_Z |= res;\r
-\r
- *r_dst = res;\r
-}\r
-\r
-\r
-void m68k_op_addx_8_mm_ax7(void)\r
-{\r
- uint src = OPER_AY_PD_8();\r
- uint ea = EA_A7_PD_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst + XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_addx_8_mm_ay7(void)\r
-{\r
- uint src = OPER_A7_PD_8();\r
- uint ea = EA_AX_PD_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst + XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_addx_8_mm_axy7(void)\r
-{\r
- uint src = OPER_A7_PD_8();\r
- uint ea = EA_A7_PD_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst + XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_addx_8_mm(void)\r
-{\r
- uint src = OPER_AY_PD_8();\r
- uint ea = EA_AX_PD_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = src + dst + XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_V = VFLAG_ADD_8(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_addx_16_mm(void)\r
-{\r
- uint src = OPER_AY_PD_16();\r
- uint ea = EA_AX_PD_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = src + dst + XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_V = VFLAG_ADD_16(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
-\r
- res = MASK_OUT_ABOVE_16(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_16(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_addx_32_mm(void)\r
-{\r
- uint src = OPER_AY_PD_32();\r
- uint ea = EA_AX_PD_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = src + dst + XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_ADD_32(src, dst, res);\r
- FLAG_X = FLAG_C = CFLAG_ADD_32(src, dst, res);\r
-\r
- res = MASK_OUT_ABOVE_32(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_32(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_and_8_er_d(void)\r
-{\r
- FLAG_Z = MASK_OUT_ABOVE_8(DX &= (DY | 0xffffff00));\r
-\r
- FLAG_N = NFLAG_8(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_8_er_ai(void)\r
-{\r
- FLAG_Z = MASK_OUT_ABOVE_8(DX &= (OPER_AY_AI_8() | 0xffffff00));\r
-\r
- FLAG_N = NFLAG_8(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_8_er_pi(void)\r
-{\r
- FLAG_Z = MASK_OUT_ABOVE_8(DX &= (OPER_AY_PI_8() | 0xffffff00));\r
-\r
- FLAG_N = NFLAG_8(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_8_er_pi7(void)\r
-{\r
- FLAG_Z = MASK_OUT_ABOVE_8(DX &= (OPER_A7_PI_8() | 0xffffff00));\r
-\r
- FLAG_N = NFLAG_8(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_8_er_pd(void)\r
-{\r
- FLAG_Z = MASK_OUT_ABOVE_8(DX &= (OPER_AY_PD_8() | 0xffffff00));\r
-\r
- FLAG_N = NFLAG_8(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_8_er_pd7(void)\r
-{\r
- FLAG_Z = MASK_OUT_ABOVE_8(DX &= (OPER_A7_PD_8() | 0xffffff00));\r
-\r
- FLAG_N = NFLAG_8(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_8_er_di(void)\r
-{\r
- FLAG_Z = MASK_OUT_ABOVE_8(DX &= (OPER_AY_DI_8() | 0xffffff00));\r
-\r
- FLAG_N = NFLAG_8(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_8_er_ix(void)\r
-{\r
- FLAG_Z = MASK_OUT_ABOVE_8(DX &= (OPER_AY_IX_8() | 0xffffff00));\r
-\r
- FLAG_N = NFLAG_8(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_8_er_aw(void)\r
-{\r
- FLAG_Z = MASK_OUT_ABOVE_8(DX &= (OPER_AW_8() | 0xffffff00));\r
-\r
- FLAG_N = NFLAG_8(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_8_er_al(void)\r
-{\r
- FLAG_Z = MASK_OUT_ABOVE_8(DX &= (OPER_AL_8() | 0xffffff00));\r
-\r
- FLAG_N = NFLAG_8(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_8_er_pcdi(void)\r
-{\r
- FLAG_Z = MASK_OUT_ABOVE_8(DX &= (OPER_PCDI_8() | 0xffffff00));\r
-\r
- FLAG_N = NFLAG_8(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_8_er_pcix(void)\r
-{\r
- FLAG_Z = MASK_OUT_ABOVE_8(DX &= (OPER_PCIX_8() | 0xffffff00));\r
-\r
- FLAG_N = NFLAG_8(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_8_er_i(void)\r
-{\r
- FLAG_Z = MASK_OUT_ABOVE_8(DX &= (OPER_I_8() | 0xffffff00));\r
-\r
- FLAG_N = NFLAG_8(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_16_er_d(void)\r
-{\r
- FLAG_Z = MASK_OUT_ABOVE_16(DX &= (DY | 0xffff0000));\r
-\r
- FLAG_N = NFLAG_16(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_16_er_ai(void)\r
-{\r
- FLAG_Z = MASK_OUT_ABOVE_16(DX &= (OPER_AY_AI_16() | 0xffff0000));\r
-\r
- FLAG_N = NFLAG_16(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_16_er_pi(void)\r
-{\r
- FLAG_Z = MASK_OUT_ABOVE_16(DX &= (OPER_AY_PI_16() | 0xffff0000));\r
-\r
- FLAG_N = NFLAG_16(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_16_er_pd(void)\r
-{\r
- FLAG_Z = MASK_OUT_ABOVE_16(DX &= (OPER_AY_PD_16() | 0xffff0000));\r
-\r
- FLAG_N = NFLAG_16(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_16_er_di(void)\r
-{\r
- FLAG_Z = MASK_OUT_ABOVE_16(DX &= (OPER_AY_DI_16() | 0xffff0000));\r
-\r
- FLAG_N = NFLAG_16(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_16_er_ix(void)\r
-{\r
- FLAG_Z = MASK_OUT_ABOVE_16(DX &= (OPER_AY_IX_16() | 0xffff0000));\r
-\r
- FLAG_N = NFLAG_16(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_16_er_aw(void)\r
-{\r
- FLAG_Z = MASK_OUT_ABOVE_16(DX &= (OPER_AW_16() | 0xffff0000));\r
-\r
- FLAG_N = NFLAG_16(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_16_er_al(void)\r
-{\r
- FLAG_Z = MASK_OUT_ABOVE_16(DX &= (OPER_AL_16() | 0xffff0000));\r
-\r
- FLAG_N = NFLAG_16(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_16_er_pcdi(void)\r
-{\r
- FLAG_Z = MASK_OUT_ABOVE_16(DX &= (OPER_PCDI_16() | 0xffff0000));\r
-\r
- FLAG_N = NFLAG_16(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_16_er_pcix(void)\r
-{\r
- FLAG_Z = MASK_OUT_ABOVE_16(DX &= (OPER_PCIX_16() | 0xffff0000));\r
-\r
- FLAG_N = NFLAG_16(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_16_er_i(void)\r
-{\r
- FLAG_Z = MASK_OUT_ABOVE_16(DX &= (OPER_I_16() | 0xffff0000));\r
-\r
- FLAG_N = NFLAG_16(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_32_er_d(void)\r
-{\r
- FLAG_Z = DX &= DY;\r
-\r
- FLAG_N = NFLAG_32(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_32_er_ai(void)\r
-{\r
- FLAG_Z = DX &= OPER_AY_AI_32();\r
-\r
- FLAG_N = NFLAG_32(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_32_er_pi(void)\r
-{\r
- FLAG_Z = DX &= OPER_AY_PI_32();\r
-\r
- FLAG_N = NFLAG_32(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_32_er_pd(void)\r
-{\r
- FLAG_Z = DX &= OPER_AY_PD_32();\r
-\r
- FLAG_N = NFLAG_32(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_32_er_di(void)\r
-{\r
- FLAG_Z = DX &= OPER_AY_DI_32();\r
-\r
- FLAG_N = NFLAG_32(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_32_er_ix(void)\r
-{\r
- FLAG_Z = DX &= OPER_AY_IX_32();\r
-\r
- FLAG_N = NFLAG_32(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_32_er_aw(void)\r
-{\r
- FLAG_Z = DX &= OPER_AW_32();\r
-\r
- FLAG_N = NFLAG_32(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_32_er_al(void)\r
-{\r
- FLAG_Z = DX &= OPER_AL_32();\r
-\r
- FLAG_N = NFLAG_32(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_32_er_pcdi(void)\r
-{\r
- FLAG_Z = DX &= OPER_PCDI_32();\r
-\r
- FLAG_N = NFLAG_32(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_32_er_pcix(void)\r
-{\r
- FLAG_Z = DX &= OPER_PCIX_32();\r
-\r
- FLAG_N = NFLAG_32(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_32_er_i(void)\r
-{\r
- FLAG_Z = DX &= OPER_I_32();\r
-\r
- FLAG_N = NFLAG_32(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_and_8_re_ai(void)\r
-{\r
- uint ea = EA_AY_AI_8();\r
- uint res = DX & m68ki_read_8(ea);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_and_8_re_pi(void)\r
-{\r
- uint ea = EA_AY_PI_8();\r
- uint res = DX & m68ki_read_8(ea);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_and_8_re_pi7(void)\r
-{\r
- uint ea = EA_A7_PI_8();\r
- uint res = DX & m68ki_read_8(ea);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_and_8_re_pd(void)\r
-{\r
- uint ea = EA_AY_PD_8();\r
- uint res = DX & m68ki_read_8(ea);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_and_8_re_pd7(void)\r
-{\r
- uint ea = EA_A7_PD_8();\r
- uint res = DX & m68ki_read_8(ea);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_and_8_re_di(void)\r
-{\r
- uint ea = EA_AY_DI_8();\r
- uint res = DX & m68ki_read_8(ea);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_and_8_re_ix(void)\r
-{\r
- uint ea = EA_AY_IX_8();\r
- uint res = DX & m68ki_read_8(ea);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_and_8_re_aw(void)\r
-{\r
- uint ea = EA_AW_8();\r
- uint res = DX & m68ki_read_8(ea);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_and_8_re_al(void)\r
-{\r
- uint ea = EA_AL_8();\r
- uint res = DX & m68ki_read_8(ea);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_and_16_re_ai(void)\r
-{\r
- uint ea = EA_AY_AI_16();\r
- uint res = DX & m68ki_read_16(ea);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_and_16_re_pi(void)\r
-{\r
- uint ea = EA_AY_PI_16();\r
- uint res = DX & m68ki_read_16(ea);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_and_16_re_pd(void)\r
-{\r
- uint ea = EA_AY_PD_16();\r
- uint res = DX & m68ki_read_16(ea);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_and_16_re_di(void)\r
-{\r
- uint ea = EA_AY_DI_16();\r
- uint res = DX & m68ki_read_16(ea);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_and_16_re_ix(void)\r
-{\r
- uint ea = EA_AY_IX_16();\r
- uint res = DX & m68ki_read_16(ea);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_and_16_re_aw(void)\r
-{\r
- uint ea = EA_AW_16();\r
- uint res = DX & m68ki_read_16(ea);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_and_16_re_al(void)\r
-{\r
- uint ea = EA_AL_16();\r
- uint res = DX & m68ki_read_16(ea);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_and_32_re_ai(void)\r
-{\r
- uint ea = EA_AY_AI_32();\r
- uint res = DX & m68ki_read_32(ea);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_and_32_re_pi(void)\r
-{\r
- uint ea = EA_AY_PI_32();\r
- uint res = DX & m68ki_read_32(ea);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_and_32_re_pd(void)\r
-{\r
- uint ea = EA_AY_PD_32();\r
- uint res = DX & m68ki_read_32(ea);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_and_32_re_di(void)\r
-{\r
- uint ea = EA_AY_DI_32();\r
- uint res = DX & m68ki_read_32(ea);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_and_32_re_ix(void)\r
-{\r
- uint ea = EA_AY_IX_32();\r
- uint res = DX & m68ki_read_32(ea);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_and_32_re_aw(void)\r
-{\r
- uint ea = EA_AW_32();\r
- uint res = DX & m68ki_read_32(ea);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_and_32_re_al(void)\r
-{\r
- uint ea = EA_AL_32();\r
- uint res = DX & m68ki_read_32(ea);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_andi_8_d(void)\r
-{\r
- FLAG_Z = MASK_OUT_ABOVE_8(DY &= (OPER_I_8() | 0xffffff00));\r
-\r
- FLAG_N = NFLAG_8(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_andi_8_ai(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AY_AI_8();\r
- uint res = src & m68ki_read_8(ea);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_andi_8_pi(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AY_PI_8();\r
- uint res = src & m68ki_read_8(ea);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_andi_8_pi7(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_A7_PI_8();\r
- uint res = src & m68ki_read_8(ea);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_andi_8_pd(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AY_PD_8();\r
- uint res = src & m68ki_read_8(ea);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_andi_8_pd7(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_A7_PD_8();\r
- uint res = src & m68ki_read_8(ea);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_andi_8_di(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AY_DI_8();\r
- uint res = src & m68ki_read_8(ea);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_andi_8_ix(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AY_IX_8();\r
- uint res = src & m68ki_read_8(ea);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_andi_8_aw(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AW_8();\r
- uint res = src & m68ki_read_8(ea);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_andi_8_al(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AL_8();\r
- uint res = src & m68ki_read_8(ea);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_andi_16_d(void)\r
-{\r
- FLAG_Z = MASK_OUT_ABOVE_16(DY &= (OPER_I_16() | 0xffff0000));\r
-\r
- FLAG_N = NFLAG_16(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_andi_16_ai(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AY_AI_16();\r
- uint res = src & m68ki_read_16(ea);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_16(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_andi_16_pi(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AY_PI_16();\r
- uint res = src & m68ki_read_16(ea);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_16(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_andi_16_pd(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AY_PD_16();\r
- uint res = src & m68ki_read_16(ea);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_16(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_andi_16_di(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AY_DI_16();\r
- uint res = src & m68ki_read_16(ea);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_16(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_andi_16_ix(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AY_IX_16();\r
- uint res = src & m68ki_read_16(ea);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_16(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_andi_16_aw(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AW_16();\r
- uint res = src & m68ki_read_16(ea);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_16(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_andi_16_al(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AL_16();\r
- uint res = src & m68ki_read_16(ea);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_16(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_andi_32_d(void)\r
-{\r
- FLAG_Z = DY &= (OPER_I_32());\r
-\r
- FLAG_N = NFLAG_32(FLAG_Z);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_andi_32_ai(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AY_AI_32();\r
- uint res = src & m68ki_read_32(ea);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_andi_32_pi(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AY_PI_32();\r
- uint res = src & m68ki_read_32(ea);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_andi_32_pd(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AY_PD_32();\r
- uint res = src & m68ki_read_32(ea);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_andi_32_di(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AY_DI_32();\r
- uint res = src & m68ki_read_32(ea);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_andi_32_ix(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AY_IX_32();\r
- uint res = src & m68ki_read_32(ea);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_andi_32_aw(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AW_32();\r
- uint res = src & m68ki_read_32(ea);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_andi_32_al(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AL_32();\r
- uint res = src & m68ki_read_32(ea);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_andi_16_toc(void)\r
-{\r
- m68ki_set_ccr(m68ki_get_ccr() & OPER_I_16());\r
-}\r
-\r
-\r
-void m68k_op_andi_16_tos(void)\r
-{\r
- if(FLAG_S)\r
- {\r
- uint src = OPER_I_16();\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_set_sr(m68ki_get_sr() & src);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
-}\r
-\r
-\r
-void m68k_op_asr_8_s(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint src = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = src >> shift;\r
-\r
- if(shift != 0)\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- if(GET_MSB_8(src))\r
- res |= m68ki_shift_8_table[shift];\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_X = FLAG_C = src << (9-shift);\r
-}\r
-\r
-\r
-void m68k_op_asr_16_s(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint src = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = src >> shift;\r
-\r
- if(shift != 0)\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- if(GET_MSB_16(src))\r
- res |= m68ki_shift_16_table[shift];\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_X = FLAG_C = src << (9-shift);\r
-}\r
-\r
-\r
-void m68k_op_asr_32_s(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint src = *r_dst;\r
- uint res = src >> shift;\r
-\r
- if(shift != 0)\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- if(GET_MSB_32(src))\r
- res |= m68ki_shift_32_table[shift];\r
-\r
- *r_dst = res;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_X = FLAG_C = src << (9-shift);\r
-}\r
-\r
-\r
-void m68k_op_asr_8_r(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = DX & 0x3f;\r
- uint src = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = src >> shift;\r
-\r
- if(shift != 0)\r
- {\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- if(shift < 8)\r
- {\r
- if(GET_MSB_8(src))\r
- res |= m68ki_shift_8_table[shift];\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
-\r
- FLAG_X = FLAG_C = src << (9-shift);\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- if(GET_MSB_8(src))\r
- {\r
- *r_dst |= 0xff;\r
- FLAG_C = CFLAG_SET;\r
- FLAG_X = XFLAG_SET;\r
- FLAG_N = NFLAG_SET;\r
- FLAG_Z = ZFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- *r_dst &= 0xffffff00;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_X = XFLAG_CLEAR;\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_N = NFLAG_8(src);\r
- FLAG_Z = src;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_asr_16_r(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = DX & 0x3f;\r
- uint src = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = src >> shift;\r
-\r
- if(shift != 0)\r
- {\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- if(shift < 16)\r
- {\r
- if(GET_MSB_16(src))\r
- res |= m68ki_shift_16_table[shift];\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
-\r
- FLAG_C = FLAG_X = (src >> (shift - 1))<<8;\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- if(GET_MSB_16(src))\r
- {\r
- *r_dst |= 0xffff;\r
- FLAG_C = CFLAG_SET;\r
- FLAG_X = XFLAG_SET;\r
- FLAG_N = NFLAG_SET;\r
- FLAG_Z = ZFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- *r_dst &= 0xffff0000;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_X = XFLAG_CLEAR;\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_N = NFLAG_16(src);\r
- FLAG_Z = src;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_asr_32_r(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = DX & 0x3f;\r
- uint src = *r_dst;\r
- uint res = src >> shift;\r
-\r
- if(shift != 0)\r
- {\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- if(shift < 32)\r
- {\r
- if(GET_MSB_32(src))\r
- res |= m68ki_shift_32_table[shift];\r
-\r
- *r_dst = res;\r
-\r
- FLAG_C = FLAG_X = (src >> (shift - 1))<<8;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- if(GET_MSB_32(src))\r
- {\r
- *r_dst = 0xffffffff;\r
- FLAG_C = CFLAG_SET;\r
- FLAG_X = XFLAG_SET;\r
- FLAG_N = NFLAG_SET;\r
- FLAG_Z = ZFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- *r_dst = 0;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_X = XFLAG_CLEAR;\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_N = NFLAG_32(src);\r
- FLAG_Z = src;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_asr_16_ai(void)\r
-{\r
- uint ea = EA_AY_AI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = src >> 1;\r
-\r
- if(GET_MSB_16(src))\r
- res |= 0x8000;\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = FLAG_X = src << 8;\r
-}\r
-\r
-\r
-void m68k_op_asr_16_pi(void)\r
-{\r
- uint ea = EA_AY_PI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = src >> 1;\r
-\r
- if(GET_MSB_16(src))\r
- res |= 0x8000;\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = FLAG_X = src << 8;\r
-}\r
-\r
-\r
-void m68k_op_asr_16_pd(void)\r
-{\r
- uint ea = EA_AY_PD_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = src >> 1;\r
-\r
- if(GET_MSB_16(src))\r
- res |= 0x8000;\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = FLAG_X = src << 8;\r
-}\r
-\r
-\r
-void m68k_op_asr_16_di(void)\r
-{\r
- uint ea = EA_AY_DI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = src >> 1;\r
-\r
- if(GET_MSB_16(src))\r
- res |= 0x8000;\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = FLAG_X = src << 8;\r
-}\r
-\r
-\r
-void m68k_op_asr_16_ix(void)\r
-{\r
- uint ea = EA_AY_IX_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = src >> 1;\r
-\r
- if(GET_MSB_16(src))\r
- res |= 0x8000;\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = FLAG_X = src << 8;\r
-}\r
-\r
-\r
-void m68k_op_asr_16_aw(void)\r
-{\r
- uint ea = EA_AW_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = src >> 1;\r
-\r
- if(GET_MSB_16(src))\r
- res |= 0x8000;\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = FLAG_X = src << 8;\r
-}\r
-\r
-\r
-void m68k_op_asr_16_al(void)\r
-{\r
- uint ea = EA_AL_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = src >> 1;\r
-\r
- if(GET_MSB_16(src))\r
- res |= 0x8000;\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = FLAG_X = src << 8;\r
-}\r
-\r
-\r
-void m68k_op_asl_8_s(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint src = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = MASK_OUT_ABOVE_8(src << shift);\r
-\r
- if(shift != 0)\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
-\r
- FLAG_X = FLAG_C = src << shift;\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- src &= m68ki_shift_8_table[shift + 1];\r
- FLAG_V = (!(src == 0 || (src == m68ki_shift_8_table[shift + 1] && shift < 8)))<<7;\r
-}\r
-\r
-\r
-void m68k_op_asl_16_s(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint src = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = MASK_OUT_ABOVE_16(src << shift);\r
-\r
- if(shift != 0)\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_X = FLAG_C = src >> (8-shift);\r
- src &= m68ki_shift_16_table[shift + 1];\r
- FLAG_V = (!(src == 0 || src == m68ki_shift_16_table[shift + 1]))<<7;\r
-}\r
-\r
-\r
-void m68k_op_asl_32_s(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint src = *r_dst;\r
- uint res = MASK_OUT_ABOVE_32(src << shift);\r
-\r
- if(shift != 0)\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- *r_dst = res;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_X = FLAG_C = src >> (24-shift);\r
- src &= m68ki_shift_32_table[shift + 1];\r
- FLAG_V = (!(src == 0 || src == m68ki_shift_32_table[shift + 1]))<<7;\r
-}\r
-\r
-\r
-void m68k_op_asl_8_r(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = DX & 0x3f;\r
- uint src = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = MASK_OUT_ABOVE_8(src << shift);\r
-\r
- if(shift != 0)\r
- {\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- if(shift < 8)\r
- {\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
- FLAG_X = FLAG_C = src << shift;\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- src &= m68ki_shift_8_table[shift + 1];\r
- FLAG_V = (!(src == 0 || src == m68ki_shift_8_table[shift + 1]))<<7;\r
- return;\r
- }\r
-\r
- *r_dst &= 0xffffff00;\r
- FLAG_X = FLAG_C = ((shift == 8 ? src & 1 : 0))<<8;\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
- FLAG_V = (!(src == 0))<<7;\r
- return;\r
- }\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_N = NFLAG_8(src);\r
- FLAG_Z = src;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_asl_16_r(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = DX & 0x3f;\r
- uint src = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = MASK_OUT_ABOVE_16(src << shift);\r
-\r
- if(shift != 0)\r
- {\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- if(shift < 16)\r
- {\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
- FLAG_X = FLAG_C = (src << shift) >> 8;\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- src &= m68ki_shift_16_table[shift + 1];\r
- FLAG_V = (!(src == 0 || src == m68ki_shift_16_table[shift + 1]))<<7;\r
- return;\r
- }\r
-\r
- *r_dst &= 0xffff0000;\r
- FLAG_X = FLAG_C = ((shift == 16 ? src & 1 : 0))<<8;\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
- FLAG_V = (!(src == 0))<<7;\r
- return;\r
- }\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_N = NFLAG_16(src);\r
- FLAG_Z = src;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_asl_32_r(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = DX & 0x3f;\r
- uint src = *r_dst;\r
- uint res = MASK_OUT_ABOVE_32(src << shift);\r
-\r
- if(shift != 0)\r
- {\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- if(shift < 32)\r
- {\r
- *r_dst = res;\r
- FLAG_X = FLAG_C = (src >> (32 - shift)) << 8;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- src &= m68ki_shift_32_table[shift + 1];\r
- FLAG_V = (!(src == 0 || src == m68ki_shift_32_table[shift + 1]))<<7;\r
- return;\r
- }\r
-\r
- *r_dst = 0;\r
- FLAG_X = FLAG_C = ((shift == 32 ? src & 1 : 0))<<8;\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
- FLAG_V = (!(src == 0))<<7;\r
- return;\r
- }\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_N = NFLAG_32(src);\r
- FLAG_Z = src;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_asl_16_ai(void)\r
-{\r
- uint ea = EA_AY_AI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = MASK_OUT_ABOVE_16(src << 1);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_X = FLAG_C = src >> 7;\r
- src &= 0xc000;\r
- FLAG_V = (!(src == 0 || src == 0xc000))<<7;\r
-}\r
-\r
-\r
-void m68k_op_asl_16_pi(void)\r
-{\r
- uint ea = EA_AY_PI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = MASK_OUT_ABOVE_16(src << 1);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_X = FLAG_C = src >> 7;\r
- src &= 0xc000;\r
- FLAG_V = (!(src == 0 || src == 0xc000))<<7;\r
-}\r
-\r
-\r
-void m68k_op_asl_16_pd(void)\r
-{\r
- uint ea = EA_AY_PD_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = MASK_OUT_ABOVE_16(src << 1);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_X = FLAG_C = src >> 7;\r
- src &= 0xc000;\r
- FLAG_V = (!(src == 0 || src == 0xc000))<<7;\r
-}\r
-\r
-\r
-void m68k_op_asl_16_di(void)\r
-{\r
- uint ea = EA_AY_DI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = MASK_OUT_ABOVE_16(src << 1);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_X = FLAG_C = src >> 7;\r
- src &= 0xc000;\r
- FLAG_V = (!(src == 0 || src == 0xc000))<<7;\r
-}\r
-\r
-\r
-void m68k_op_asl_16_ix(void)\r
-{\r
- uint ea = EA_AY_IX_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = MASK_OUT_ABOVE_16(src << 1);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_X = FLAG_C = src >> 7;\r
- src &= 0xc000;\r
- FLAG_V = (!(src == 0 || src == 0xc000))<<7;\r
-}\r
-\r
-\r
-void m68k_op_asl_16_aw(void)\r
-{\r
- uint ea = EA_AW_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = MASK_OUT_ABOVE_16(src << 1);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_X = FLAG_C = src >> 7;\r
- src &= 0xc000;\r
- FLAG_V = (!(src == 0 || src == 0xc000))<<7;\r
-}\r
-\r
-\r
-void m68k_op_asl_16_al(void)\r
-{\r
- uint ea = EA_AL_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = MASK_OUT_ABOVE_16(src << 1);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_X = FLAG_C = src >> 7;\r
- src &= 0xc000;\r
- FLAG_V = (!(src == 0 || src == 0xc000))<<7;\r
-}\r
-\r
-\r
-void m68k_op_bhi_8(void)\r
-{\r
- if(COND_HI())\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
- return;\r
- }\r
- USE_CYCLES(CYC_BCC_NOTAKE_B);\r
-}\r
-\r
-\r
-void m68k_op_bls_8(void)\r
-{\r
- if(COND_LS())\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
- return;\r
- }\r
- USE_CYCLES(CYC_BCC_NOTAKE_B);\r
-}\r
-\r
-\r
-void m68k_op_bcc_8(void)\r
-{\r
- if(COND_CC())\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
- return;\r
- }\r
- USE_CYCLES(CYC_BCC_NOTAKE_B);\r
-}\r
-\r
-\r
-void m68k_op_bcs_8(void)\r
-{\r
- if(COND_CS())\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
- return;\r
- }\r
- USE_CYCLES(CYC_BCC_NOTAKE_B);\r
-}\r
-\r
-\r
-void m68k_op_bne_8(void)\r
-{\r
- if(COND_NE())\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
- return;\r
- }\r
- USE_CYCLES(CYC_BCC_NOTAKE_B);\r
-}\r
-\r
-\r
-void m68k_op_beq_8(void)\r
-{\r
- if(COND_EQ())\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
- return;\r
- }\r
- USE_CYCLES(CYC_BCC_NOTAKE_B);\r
-}\r
-\r
-\r
-void m68k_op_bvc_8(void)\r
-{\r
- if(COND_VC())\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
- return;\r
- }\r
- USE_CYCLES(CYC_BCC_NOTAKE_B);\r
-}\r
-\r
-\r
-void m68k_op_bvs_8(void)\r
-{\r
- if(COND_VS())\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
- return;\r
- }\r
- USE_CYCLES(CYC_BCC_NOTAKE_B);\r
-}\r
-\r
-\r
-void m68k_op_bpl_8(void)\r
-{\r
- if(COND_PL())\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
- return;\r
- }\r
- USE_CYCLES(CYC_BCC_NOTAKE_B);\r
-}\r
-\r
-\r
-void m68k_op_bmi_8(void)\r
-{\r
- if(COND_MI())\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
- return;\r
- }\r
- USE_CYCLES(CYC_BCC_NOTAKE_B);\r
-}\r
-\r
-\r
-void m68k_op_bge_8(void)\r
-{\r
- if(COND_GE())\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
- return;\r
- }\r
- USE_CYCLES(CYC_BCC_NOTAKE_B);\r
-}\r
-\r
-\r
-void m68k_op_blt_8(void)\r
-{\r
- if(COND_LT())\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
- return;\r
- }\r
- USE_CYCLES(CYC_BCC_NOTAKE_B);\r
-}\r
-\r
-\r
-void m68k_op_bgt_8(void)\r
-{\r
- if(COND_GT())\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
- return;\r
- }\r
- USE_CYCLES(CYC_BCC_NOTAKE_B);\r
-}\r
-\r
-\r
-void m68k_op_ble_8(void)\r
-{\r
- if(COND_LE())\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
- return;\r
- }\r
- USE_CYCLES(CYC_BCC_NOTAKE_B);\r
-}\r
-\r
-\r
-void m68k_op_bhi_16(void)\r
-{\r
- if(COND_HI())\r
- {\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
- return;\r
- }\r
- REG_PC += 2;\r
- USE_CYCLES(CYC_BCC_NOTAKE_W);\r
-}\r
-\r
-\r
-void m68k_op_bls_16(void)\r
-{\r
- if(COND_LS())\r
- {\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
- return;\r
- }\r
- REG_PC += 2;\r
- USE_CYCLES(CYC_BCC_NOTAKE_W);\r
-}\r
-\r
-\r
-void m68k_op_bcc_16(void)\r
-{\r
- if(COND_CC())\r
- {\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
- return;\r
- }\r
- REG_PC += 2;\r
- USE_CYCLES(CYC_BCC_NOTAKE_W);\r
-}\r
-\r
-\r
-void m68k_op_bcs_16(void)\r
-{\r
- if(COND_CS())\r
- {\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
- return;\r
- }\r
- REG_PC += 2;\r
- USE_CYCLES(CYC_BCC_NOTAKE_W);\r
-}\r
-\r
-\r
-void m68k_op_bne_16(void)\r
-{\r
- if(COND_NE())\r
- {\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
- return;\r
- }\r
- REG_PC += 2;\r
- USE_CYCLES(CYC_BCC_NOTAKE_W);\r
-}\r
-\r
-\r
-void m68k_op_beq_16(void)\r
-{\r
- if(COND_EQ())\r
- {\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
- return;\r
- }\r
- REG_PC += 2;\r
- USE_CYCLES(CYC_BCC_NOTAKE_W);\r
-}\r
-\r
-\r
-void m68k_op_bvc_16(void)\r
-{\r
- if(COND_VC())\r
- {\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
- return;\r
- }\r
- REG_PC += 2;\r
- USE_CYCLES(CYC_BCC_NOTAKE_W);\r
-}\r
-\r
-\r
-void m68k_op_bvs_16(void)\r
-{\r
- if(COND_VS())\r
- {\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
- return;\r
- }\r
- REG_PC += 2;\r
- USE_CYCLES(CYC_BCC_NOTAKE_W);\r
-}\r
-\r
-\r
-void m68k_op_bpl_16(void)\r
-{\r
- if(COND_PL())\r
- {\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
- return;\r
- }\r
- REG_PC += 2;\r
- USE_CYCLES(CYC_BCC_NOTAKE_W);\r
-}\r
-\r
-\r
-void m68k_op_bmi_16(void)\r
-{\r
- if(COND_MI())\r
- {\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
- return;\r
- }\r
- REG_PC += 2;\r
- USE_CYCLES(CYC_BCC_NOTAKE_W);\r
-}\r
-\r
-\r
-void m68k_op_bge_16(void)\r
-{\r
- if(COND_GE())\r
- {\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
- return;\r
- }\r
- REG_PC += 2;\r
- USE_CYCLES(CYC_BCC_NOTAKE_W);\r
-}\r
-\r
-\r
-void m68k_op_blt_16(void)\r
-{\r
- if(COND_LT())\r
- {\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
- return;\r
- }\r
- REG_PC += 2;\r
- USE_CYCLES(CYC_BCC_NOTAKE_W);\r
-}\r
-\r
-\r
-void m68k_op_bgt_16(void)\r
-{\r
- if(COND_GT())\r
- {\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
- return;\r
- }\r
- REG_PC += 2;\r
- USE_CYCLES(CYC_BCC_NOTAKE_W);\r
-}\r
-\r
-\r
-void m68k_op_ble_16(void)\r
-{\r
- if(COND_LE())\r
- {\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
- return;\r
- }\r
- REG_PC += 2;\r
- USE_CYCLES(CYC_BCC_NOTAKE_W);\r
-}\r
-\r
-\r
-void m68k_op_bhi_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_HI())\r
- {\r
- uint offset = OPER_I_32();\r
- REG_PC -= 4;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_32(offset);\r
- return;\r
- }\r
- REG_PC += 4;\r
- return;\r
- }\r
- else\r
- {\r
- if(COND_HI())\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
- return;\r
- }\r
- USE_CYCLES(CYC_BCC_NOTAKE_B);\r
- }\r
-}\r
-\r
-\r
-void m68k_op_bls_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_LS())\r
- {\r
- uint offset = OPER_I_32();\r
- REG_PC -= 4;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_32(offset);\r
- return;\r
- }\r
- REG_PC += 4;\r
- return;\r
- }\r
- else\r
- {\r
- if(COND_LS())\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
- return;\r
- }\r
- USE_CYCLES(CYC_BCC_NOTAKE_B);\r
- }\r
-}\r
-\r
-\r
-void m68k_op_bcc_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_CC())\r
- {\r
- uint offset = OPER_I_32();\r
- REG_PC -= 4;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_32(offset);\r
- return;\r
- }\r
- REG_PC += 4;\r
- return;\r
- }\r
- else\r
- {\r
- if(COND_CC())\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
- return;\r
- }\r
- USE_CYCLES(CYC_BCC_NOTAKE_B);\r
- }\r
-}\r
-\r
-\r
-void m68k_op_bcs_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_CS())\r
- {\r
- uint offset = OPER_I_32();\r
- REG_PC -= 4;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_32(offset);\r
- return;\r
- }\r
- REG_PC += 4;\r
- return;\r
- }\r
- else\r
- {\r
- if(COND_CS())\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
- return;\r
- }\r
- USE_CYCLES(CYC_BCC_NOTAKE_B);\r
- }\r
-}\r
-\r
-\r
-void m68k_op_bne_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_NE())\r
- {\r
- uint offset = OPER_I_32();\r
- REG_PC -= 4;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_32(offset);\r
- return;\r
- }\r
- REG_PC += 4;\r
- return;\r
- }\r
- else\r
- {\r
- if(COND_NE())\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
- return;\r
- }\r
- USE_CYCLES(CYC_BCC_NOTAKE_B);\r
- }\r
-}\r
-\r
-\r
-void m68k_op_beq_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_EQ())\r
- {\r
- uint offset = OPER_I_32();\r
- REG_PC -= 4;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_32(offset);\r
- return;\r
- }\r
- REG_PC += 4;\r
- return;\r
- }\r
- else\r
- {\r
- if(COND_EQ())\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
- return;\r
- }\r
- USE_CYCLES(CYC_BCC_NOTAKE_B);\r
- }\r
-}\r
-\r
-\r
-void m68k_op_bvc_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_VC())\r
- {\r
- uint offset = OPER_I_32();\r
- REG_PC -= 4;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_32(offset);\r
- return;\r
- }\r
- REG_PC += 4;\r
- return;\r
- }\r
- else\r
- {\r
- if(COND_VC())\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
- return;\r
- }\r
- USE_CYCLES(CYC_BCC_NOTAKE_B);\r
- }\r
-}\r
-\r
-\r
-void m68k_op_bvs_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_VS())\r
- {\r
- uint offset = OPER_I_32();\r
- REG_PC -= 4;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_32(offset);\r
- return;\r
- }\r
- REG_PC += 4;\r
- return;\r
- }\r
- else\r
- {\r
- if(COND_VS())\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
- return;\r
- }\r
- USE_CYCLES(CYC_BCC_NOTAKE_B);\r
- }\r
-}\r
-\r
-\r
-void m68k_op_bpl_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_PL())\r
- {\r
- uint offset = OPER_I_32();\r
- REG_PC -= 4;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_32(offset);\r
- return;\r
- }\r
- REG_PC += 4;\r
- return;\r
- }\r
- else\r
- {\r
- if(COND_PL())\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
- return;\r
- }\r
- USE_CYCLES(CYC_BCC_NOTAKE_B);\r
- }\r
-}\r
-\r
-\r
-void m68k_op_bmi_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_MI())\r
- {\r
- uint offset = OPER_I_32();\r
- REG_PC -= 4;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_32(offset);\r
- return;\r
- }\r
- REG_PC += 4;\r
- return;\r
- }\r
- else\r
- {\r
- if(COND_MI())\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
- return;\r
- }\r
- USE_CYCLES(CYC_BCC_NOTAKE_B);\r
- }\r
-}\r
-\r
-\r
-void m68k_op_bge_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_GE())\r
- {\r
- uint offset = OPER_I_32();\r
- REG_PC -= 4;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_32(offset);\r
- return;\r
- }\r
- REG_PC += 4;\r
- return;\r
- }\r
- else\r
- {\r
- if(COND_GE())\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
- return;\r
- }\r
- USE_CYCLES(CYC_BCC_NOTAKE_B);\r
- }\r
-}\r
-\r
-\r
-void m68k_op_blt_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_LT())\r
- {\r
- uint offset = OPER_I_32();\r
- REG_PC -= 4;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_32(offset);\r
- return;\r
- }\r
- REG_PC += 4;\r
- return;\r
- }\r
- else\r
- {\r
- if(COND_LT())\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
- return;\r
- }\r
- USE_CYCLES(CYC_BCC_NOTAKE_B);\r
- }\r
-}\r
-\r
-\r
-void m68k_op_bgt_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_GT())\r
- {\r
- uint offset = OPER_I_32();\r
- REG_PC -= 4;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_32(offset);\r
- return;\r
- }\r
- REG_PC += 4;\r
- return;\r
- }\r
- else\r
- {\r
- if(COND_GT())\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
- return;\r
- }\r
- USE_CYCLES(CYC_BCC_NOTAKE_B);\r
- }\r
-}\r
-\r
-\r
-void m68k_op_ble_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_LE())\r
- {\r
- uint offset = OPER_I_32();\r
- REG_PC -= 4;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_32(offset);\r
- return;\r
- }\r
- REG_PC += 4;\r
- return;\r
- }\r
- else\r
- {\r
- if(COND_LE())\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
- return;\r
- }\r
- USE_CYCLES(CYC_BCC_NOTAKE_B);\r
- }\r
-}\r
-\r
-\r
-void m68k_op_bchg_32_r_d(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint mask = 1 << (DX & 0x1f);\r
-\r
- FLAG_Z = *r_dst & mask;\r
- *r_dst ^= mask;\r
-}\r
-\r
-\r
-void m68k_op_bchg_8_r_ai(void)\r
-{\r
- uint ea = EA_AY_AI_8();\r
- uint src = m68ki_read_8(ea);\r
- uint mask = 1 << (DX & 7);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src ^ mask);\r
-}\r
-\r
-\r
-void m68k_op_bchg_8_r_pi(void)\r
-{\r
- uint ea = EA_AY_PI_8();\r
- uint src = m68ki_read_8(ea);\r
- uint mask = 1 << (DX & 7);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src ^ mask);\r
-}\r
-\r
-\r
-void m68k_op_bchg_8_r_pi7(void)\r
-{\r
- uint ea = EA_A7_PI_8();\r
- uint src = m68ki_read_8(ea);\r
- uint mask = 1 << (DX & 7);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src ^ mask);\r
-}\r
-\r
-\r
-void m68k_op_bchg_8_r_pd(void)\r
-{\r
- uint ea = EA_AY_PD_8();\r
- uint src = m68ki_read_8(ea);\r
- uint mask = 1 << (DX & 7);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src ^ mask);\r
-}\r
-\r
-\r
-void m68k_op_bchg_8_r_pd7(void)\r
-{\r
- uint ea = EA_A7_PD_8();\r
- uint src = m68ki_read_8(ea);\r
- uint mask = 1 << (DX & 7);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src ^ mask);\r
-}\r
-\r
-\r
-void m68k_op_bchg_8_r_di(void)\r
-{\r
- uint ea = EA_AY_DI_8();\r
- uint src = m68ki_read_8(ea);\r
- uint mask = 1 << (DX & 7);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src ^ mask);\r
-}\r
-\r
-\r
-void m68k_op_bchg_8_r_ix(void)\r
-{\r
- uint ea = EA_AY_IX_8();\r
- uint src = m68ki_read_8(ea);\r
- uint mask = 1 << (DX & 7);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src ^ mask);\r
-}\r
-\r
-\r
-void m68k_op_bchg_8_r_aw(void)\r
-{\r
- uint ea = EA_AW_8();\r
- uint src = m68ki_read_8(ea);\r
- uint mask = 1 << (DX & 7);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src ^ mask);\r
-}\r
-\r
-\r
-void m68k_op_bchg_8_r_al(void)\r
-{\r
- uint ea = EA_AL_8();\r
- uint src = m68ki_read_8(ea);\r
- uint mask = 1 << (DX & 7);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src ^ mask);\r
-}\r
-\r
-\r
-void m68k_op_bchg_32_s_d(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint mask = 1 << (OPER_I_8() & 0x1f);\r
-\r
- FLAG_Z = *r_dst & mask;\r
- *r_dst ^= mask;\r
-}\r
-\r
-\r
-void m68k_op_bchg_8_s_ai(void)\r
-{\r
- uint mask = 1 << (OPER_I_8() & 7);\r
- uint ea = EA_AY_AI_8();\r
- uint src = m68ki_read_8(ea);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src ^ mask);\r
-}\r
-\r
-\r
-void m68k_op_bchg_8_s_pi(void)\r
-{\r
- uint mask = 1 << (OPER_I_8() & 7);\r
- uint ea = EA_AY_PI_8();\r
- uint src = m68ki_read_8(ea);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src ^ mask);\r
-}\r
-\r
-\r
-void m68k_op_bchg_8_s_pi7(void)\r
-{\r
- uint mask = 1 << (OPER_I_8() & 7);\r
- uint ea = EA_A7_PI_8();\r
- uint src = m68ki_read_8(ea);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src ^ mask);\r
-}\r
-\r
-\r
-void m68k_op_bchg_8_s_pd(void)\r
-{\r
- uint mask = 1 << (OPER_I_8() & 7);\r
- uint ea = EA_AY_PD_8();\r
- uint src = m68ki_read_8(ea);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src ^ mask);\r
-}\r
-\r
-\r
-void m68k_op_bchg_8_s_pd7(void)\r
-{\r
- uint mask = 1 << (OPER_I_8() & 7);\r
- uint ea = EA_A7_PD_8();\r
- uint src = m68ki_read_8(ea);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src ^ mask);\r
-}\r
-\r
-\r
-void m68k_op_bchg_8_s_di(void)\r
-{\r
- uint mask = 1 << (OPER_I_8() & 7);\r
- uint ea = EA_AY_DI_8();\r
- uint src = m68ki_read_8(ea);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src ^ mask);\r
-}\r
-\r
-\r
-void m68k_op_bchg_8_s_ix(void)\r
-{\r
- uint mask = 1 << (OPER_I_8() & 7);\r
- uint ea = EA_AY_IX_8();\r
- uint src = m68ki_read_8(ea);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src ^ mask);\r
-}\r
-\r
-\r
-void m68k_op_bchg_8_s_aw(void)\r
-{\r
- uint mask = 1 << (OPER_I_8() & 7);\r
- uint ea = EA_AW_8();\r
- uint src = m68ki_read_8(ea);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src ^ mask);\r
-}\r
-\r
-\r
-void m68k_op_bchg_8_s_al(void)\r
-{\r
- uint mask = 1 << (OPER_I_8() & 7);\r
- uint ea = EA_AL_8();\r
- uint src = m68ki_read_8(ea);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src ^ mask);\r
-}\r
-\r
-\r
-void m68k_op_bclr_32_r_d(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint mask = 1 << (DX & 0x1f);\r
-\r
- FLAG_Z = *r_dst & mask;\r
- *r_dst &= ~mask;\r
-}\r
-\r
-\r
-void m68k_op_bclr_8_r_ai(void)\r
-{\r
- uint ea = EA_AY_AI_8();\r
- uint src = m68ki_read_8(ea);\r
- uint mask = 1 << (DX & 7);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src & ~mask);\r
-}\r
-\r
-\r
-void m68k_op_bclr_8_r_pi(void)\r
-{\r
- uint ea = EA_AY_PI_8();\r
- uint src = m68ki_read_8(ea);\r
- uint mask = 1 << (DX & 7);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src & ~mask);\r
-}\r
-\r
-\r
-void m68k_op_bclr_8_r_pi7(void)\r
-{\r
- uint ea = EA_A7_PI_8();\r
- uint src = m68ki_read_8(ea);\r
- uint mask = 1 << (DX & 7);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src & ~mask);\r
-}\r
-\r
-\r
-void m68k_op_bclr_8_r_pd(void)\r
-{\r
- uint ea = EA_AY_PD_8();\r
- uint src = m68ki_read_8(ea);\r
- uint mask = 1 << (DX & 7);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src & ~mask);\r
-}\r
-\r
-\r
-void m68k_op_bclr_8_r_pd7(void)\r
-{\r
- uint ea = EA_A7_PD_8();\r
- uint src = m68ki_read_8(ea);\r
- uint mask = 1 << (DX & 7);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src & ~mask);\r
-}\r
-\r
-\r
-void m68k_op_bclr_8_r_di(void)\r
-{\r
- uint ea = EA_AY_DI_8();\r
- uint src = m68ki_read_8(ea);\r
- uint mask = 1 << (DX & 7);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src & ~mask);\r
-}\r
-\r
-\r
-void m68k_op_bclr_8_r_ix(void)\r
-{\r
- uint ea = EA_AY_IX_8();\r
- uint src = m68ki_read_8(ea);\r
- uint mask = 1 << (DX & 7);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src & ~mask);\r
-}\r
-\r
-\r
-void m68k_op_bclr_8_r_aw(void)\r
-{\r
- uint ea = EA_AW_8();\r
- uint src = m68ki_read_8(ea);\r
- uint mask = 1 << (DX & 7);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src & ~mask);\r
-}\r
-\r
-\r
-void m68k_op_bclr_8_r_al(void)\r
-{\r
- uint ea = EA_AL_8();\r
- uint src = m68ki_read_8(ea);\r
- uint mask = 1 << (DX & 7);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src & ~mask);\r
-}\r
-\r
-\r
-void m68k_op_bclr_32_s_d(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint mask = 1 << (OPER_I_8() & 0x1f);\r
-\r
- FLAG_Z = *r_dst & mask;\r
- *r_dst &= ~mask;\r
-}\r
-\r
-\r
-void m68k_op_bclr_8_s_ai(void)\r
-{\r
- uint mask = 1 << (OPER_I_8() & 7);\r
- uint ea = EA_AY_AI_8();\r
- uint src = m68ki_read_8(ea);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src & ~mask);\r
-}\r
-\r
-\r
-void m68k_op_bclr_8_s_pi(void)\r
-{\r
- uint mask = 1 << (OPER_I_8() & 7);\r
- uint ea = EA_AY_PI_8();\r
- uint src = m68ki_read_8(ea);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src & ~mask);\r
-}\r
-\r
-\r
-void m68k_op_bclr_8_s_pi7(void)\r
-{\r
- uint mask = 1 << (OPER_I_8() & 7);\r
- uint ea = EA_A7_PI_8();\r
- uint src = m68ki_read_8(ea);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src & ~mask);\r
-}\r
-\r
-\r
-void m68k_op_bclr_8_s_pd(void)\r
-{\r
- uint mask = 1 << (OPER_I_8() & 7);\r
- uint ea = EA_AY_PD_8();\r
- uint src = m68ki_read_8(ea);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src & ~mask);\r
-}\r
-\r
-\r
-void m68k_op_bclr_8_s_pd7(void)\r
-{\r
- uint mask = 1 << (OPER_I_8() & 7);\r
- uint ea = EA_A7_PD_8();\r
- uint src = m68ki_read_8(ea);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src & ~mask);\r
-}\r
-\r
-\r
-void m68k_op_bclr_8_s_di(void)\r
-{\r
- uint mask = 1 << (OPER_I_8() & 7);\r
- uint ea = EA_AY_DI_8();\r
- uint src = m68ki_read_8(ea);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src & ~mask);\r
-}\r
-\r
-\r
-void m68k_op_bclr_8_s_ix(void)\r
-{\r
- uint mask = 1 << (OPER_I_8() & 7);\r
- uint ea = EA_AY_IX_8();\r
- uint src = m68ki_read_8(ea);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src & ~mask);\r
-}\r
-\r
-\r
-void m68k_op_bclr_8_s_aw(void)\r
-{\r
- uint mask = 1 << (OPER_I_8() & 7);\r
- uint ea = EA_AW_8();\r
- uint src = m68ki_read_8(ea);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src & ~mask);\r
-}\r
-\r
-\r
-void m68k_op_bclr_8_s_al(void)\r
-{\r
- uint mask = 1 << (OPER_I_8() & 7);\r
- uint ea = EA_AL_8();\r
- uint src = m68ki_read_8(ea);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src & ~mask);\r
-}\r
-\r
-\r
-void m68k_op_bfchg_32_d(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint* data = &DY;\r
- uint64 mask;\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = REG_D[offset&7];\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- offset &= 31;\r
- width = ((width-1) & 31) + 1;\r
-\r
- mask = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask = ROR_32(mask, offset);\r
-\r
- FLAG_N = NFLAG_32(*data<<offset);\r
- FLAG_Z = *data & mask;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- *data ^= mask;\r
-\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfchg_32_ai(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint mask_base;\r
- uint data_long;\r
- uint mask_long;\r
- uint data_byte = 0;\r
- uint mask_byte = 0;\r
- uint ea = EA_AY_AI_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask_long = mask_base >> offset;\r
-\r
- data_long = m68ki_read_32(ea);\r
- FLAG_N = NFLAG_32(data_long << offset);\r
- FLAG_Z = data_long & mask_long;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, data_long ^ mask_long);\r
-\r
- if((width + offset) > 32)\r
- {\r
- mask_byte = MASK_OUT_ABOVE_8(mask_base);\r
- data_byte = m68ki_read_8(ea+4);\r
- FLAG_Z |= (data_byte & mask_byte);\r
- m68ki_write_8(ea+4, data_byte ^ mask_byte);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfchg_32_di(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint mask_base;\r
- uint data_long;\r
- uint mask_long;\r
- uint data_byte = 0;\r
- uint mask_byte = 0;\r
- uint ea = EA_AY_DI_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask_long = mask_base >> offset;\r
-\r
- data_long = m68ki_read_32(ea);\r
- FLAG_N = NFLAG_32(data_long << offset);\r
- FLAG_Z = data_long & mask_long;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, data_long ^ mask_long);\r
-\r
- if((width + offset) > 32)\r
- {\r
- mask_byte = MASK_OUT_ABOVE_8(mask_base);\r
- data_byte = m68ki_read_8(ea+4);\r
- FLAG_Z |= (data_byte & mask_byte);\r
- m68ki_write_8(ea+4, data_byte ^ mask_byte);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfchg_32_ix(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint mask_base;\r
- uint data_long;\r
- uint mask_long;\r
- uint data_byte = 0;\r
- uint mask_byte = 0;\r
- uint ea = EA_AY_IX_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask_long = mask_base >> offset;\r
-\r
- data_long = m68ki_read_32(ea);\r
- FLAG_N = NFLAG_32(data_long << offset);\r
- FLAG_Z = data_long & mask_long;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, data_long ^ mask_long);\r
-\r
- if((width + offset) > 32)\r
- {\r
- mask_byte = MASK_OUT_ABOVE_8(mask_base);\r
- data_byte = m68ki_read_8(ea+4);\r
- FLAG_Z |= (data_byte & mask_byte);\r
- m68ki_write_8(ea+4, data_byte ^ mask_byte);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfchg_32_aw(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint mask_base;\r
- uint data_long;\r
- uint mask_long;\r
- uint data_byte = 0;\r
- uint mask_byte = 0;\r
- uint ea = EA_AW_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask_long = mask_base >> offset;\r
-\r
- data_long = m68ki_read_32(ea);\r
- FLAG_N = NFLAG_32(data_long << offset);\r
- FLAG_Z = data_long & mask_long;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, data_long ^ mask_long);\r
-\r
- if((width + offset) > 32)\r
- {\r
- mask_byte = MASK_OUT_ABOVE_8(mask_base);\r
- data_byte = m68ki_read_8(ea+4);\r
- FLAG_Z |= (data_byte & mask_byte);\r
- m68ki_write_8(ea+4, data_byte ^ mask_byte);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfchg_32_al(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint mask_base;\r
- uint data_long;\r
- uint mask_long;\r
- uint data_byte = 0;\r
- uint mask_byte = 0;\r
- uint ea = EA_AL_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask_long = mask_base >> offset;\r
-\r
- data_long = m68ki_read_32(ea);\r
- FLAG_N = NFLAG_32(data_long << offset);\r
- FLAG_Z = data_long & mask_long;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, data_long ^ mask_long);\r
-\r
- if((width + offset) > 32)\r
- {\r
- mask_byte = MASK_OUT_ABOVE_8(mask_base);\r
- data_byte = m68ki_read_8(ea+4);\r
- FLAG_Z |= (data_byte & mask_byte);\r
- m68ki_write_8(ea+4, data_byte ^ mask_byte);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfclr_32_d(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint* data = &DY;\r
- uint64 mask;\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = REG_D[offset&7];\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
-\r
- offset &= 31;\r
- width = ((width-1) & 31) + 1;\r
-\r
-\r
- mask = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask = ROR_32(mask, offset);\r
-\r
- FLAG_N = NFLAG_32(*data<<offset);\r
- FLAG_Z = *data & mask;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- *data &= ~mask;\r
-\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfclr_32_ai(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint mask_base;\r
- uint data_long;\r
- uint mask_long;\r
- uint data_byte = 0;\r
- uint mask_byte = 0;\r
- uint ea = EA_AY_AI_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask_long = mask_base >> offset;\r
-\r
- data_long = m68ki_read_32(ea);\r
- FLAG_N = NFLAG_32(data_long << offset);\r
- FLAG_Z = data_long & mask_long;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, data_long & ~mask_long);\r
-\r
- if((width + offset) > 32)\r
- {\r
- mask_byte = MASK_OUT_ABOVE_8(mask_base);\r
- data_byte = m68ki_read_8(ea+4);\r
- FLAG_Z |= (data_byte & mask_byte);\r
- m68ki_write_8(ea+4, data_byte & ~mask_byte);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfclr_32_di(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint mask_base;\r
- uint data_long;\r
- uint mask_long;\r
- uint data_byte = 0;\r
- uint mask_byte = 0;\r
- uint ea = EA_AY_DI_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask_long = mask_base >> offset;\r
-\r
- data_long = m68ki_read_32(ea);\r
- FLAG_N = NFLAG_32(data_long << offset);\r
- FLAG_Z = data_long & mask_long;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, data_long & ~mask_long);\r
-\r
- if((width + offset) > 32)\r
- {\r
- mask_byte = MASK_OUT_ABOVE_8(mask_base);\r
- data_byte = m68ki_read_8(ea+4);\r
- FLAG_Z |= (data_byte & mask_byte);\r
- m68ki_write_8(ea+4, data_byte & ~mask_byte);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfclr_32_ix(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint mask_base;\r
- uint data_long;\r
- uint mask_long;\r
- uint data_byte = 0;\r
- uint mask_byte = 0;\r
- uint ea = EA_AY_IX_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask_long = mask_base >> offset;\r
-\r
- data_long = m68ki_read_32(ea);\r
- FLAG_N = NFLAG_32(data_long << offset);\r
- FLAG_Z = data_long & mask_long;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, data_long & ~mask_long);\r
-\r
- if((width + offset) > 32)\r
- {\r
- mask_byte = MASK_OUT_ABOVE_8(mask_base);\r
- data_byte = m68ki_read_8(ea+4);\r
- FLAG_Z |= (data_byte & mask_byte);\r
- m68ki_write_8(ea+4, data_byte & ~mask_byte);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfclr_32_aw(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint mask_base;\r
- uint data_long;\r
- uint mask_long;\r
- uint data_byte = 0;\r
- uint mask_byte = 0;\r
- uint ea = EA_AW_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask_long = mask_base >> offset;\r
-\r
- data_long = m68ki_read_32(ea);\r
- FLAG_N = NFLAG_32(data_long << offset);\r
- FLAG_Z = data_long & mask_long;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, data_long & ~mask_long);\r
-\r
- if((width + offset) > 32)\r
- {\r
- mask_byte = MASK_OUT_ABOVE_8(mask_base);\r
- data_byte = m68ki_read_8(ea+4);\r
- FLAG_Z |= (data_byte & mask_byte);\r
- m68ki_write_8(ea+4, data_byte & ~mask_byte);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfclr_32_al(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint mask_base;\r
- uint data_long;\r
- uint mask_long;\r
- uint data_byte = 0;\r
- uint mask_byte = 0;\r
- uint ea = EA_AL_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask_long = mask_base >> offset;\r
-\r
- data_long = m68ki_read_32(ea);\r
- FLAG_N = NFLAG_32(data_long << offset);\r
- FLAG_Z = data_long & mask_long;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, data_long & ~mask_long);\r
-\r
- if((width + offset) > 32)\r
- {\r
- mask_byte = MASK_OUT_ABOVE_8(mask_base);\r
- data_byte = m68ki_read_8(ea+4);\r
- FLAG_Z |= (data_byte & mask_byte);\r
- m68ki_write_8(ea+4, data_byte & ~mask_byte);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfexts_32_d(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint64 data = DY;\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = REG_D[offset&7];\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- offset &= 31;\r
- width = ((width-1) & 31) + 1;\r
-\r
- data = ROL_32(data, offset);\r
- FLAG_N = NFLAG_32(data);\r
- data = MAKE_INT_32(data) >> (32 - width);\r
-\r
- FLAG_Z = data;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- REG_D[(word2>>12)&7] = data;\r
-\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfexts_32_ai(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint data;\r
- uint ea = EA_AY_AI_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- data = m68ki_read_32(ea);\r
-\r
- data = MASK_OUT_ABOVE_32(data<<offset);\r
-\r
- if((offset+width) > 32)\r
- data |= (m68ki_read_8(ea+4) << offset) >> 8;\r
-\r
- FLAG_N = NFLAG_32(data);\r
- data = MAKE_INT_32(data) >> (32 - width);\r
-\r
- FLAG_Z = data;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- REG_D[(word2 >> 12) & 7] = data;\r
-\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfexts_32_di(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint data;\r
- uint ea = EA_AY_DI_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- data = m68ki_read_32(ea);\r
-\r
- data = MASK_OUT_ABOVE_32(data<<offset);\r
-\r
- if((offset+width) > 32)\r
- data |= (m68ki_read_8(ea+4) << offset) >> 8;\r
-\r
- FLAG_N = NFLAG_32(data);\r
- data = MAKE_INT_32(data) >> (32 - width);\r
-\r
- FLAG_Z = data;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- REG_D[(word2 >> 12) & 7] = data;\r
-\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfexts_32_ix(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint data;\r
- uint ea = EA_AY_IX_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- data = m68ki_read_32(ea);\r
-\r
- data = MASK_OUT_ABOVE_32(data<<offset);\r
-\r
- if((offset+width) > 32)\r
- data |= (m68ki_read_8(ea+4) << offset) >> 8;\r
-\r
- FLAG_N = NFLAG_32(data);\r
- data = MAKE_INT_32(data) >> (32 - width);\r
-\r
- FLAG_Z = data;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- REG_D[(word2 >> 12) & 7] = data;\r
-\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfexts_32_aw(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint data;\r
- uint ea = EA_AW_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- data = m68ki_read_32(ea);\r
-\r
- data = MASK_OUT_ABOVE_32(data<<offset);\r
-\r
- if((offset+width) > 32)\r
- data |= (m68ki_read_8(ea+4) << offset) >> 8;\r
-\r
- FLAG_N = NFLAG_32(data);\r
- data = MAKE_INT_32(data) >> (32 - width);\r
-\r
- FLAG_Z = data;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- REG_D[(word2 >> 12) & 7] = data;\r
-\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfexts_32_al(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint data;\r
- uint ea = EA_AL_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- data = m68ki_read_32(ea);\r
-\r
- data = MASK_OUT_ABOVE_32(data<<offset);\r
-\r
- if((offset+width) > 32)\r
- data |= (m68ki_read_8(ea+4) << offset) >> 8;\r
-\r
- FLAG_N = NFLAG_32(data);\r
- data = MAKE_INT_32(data) >> (32 - width);\r
-\r
- FLAG_Z = data;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- REG_D[(word2 >> 12) & 7] = data;\r
-\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfexts_32_pcdi(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint data;\r
- uint ea = EA_PCDI_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- data = m68ki_read_32(ea);\r
-\r
- data = MASK_OUT_ABOVE_32(data<<offset);\r
-\r
- if((offset+width) > 32)\r
- data |= (m68ki_read_8(ea+4) << offset) >> 8;\r
-\r
- FLAG_N = NFLAG_32(data);\r
- data = MAKE_INT_32(data) >> (32 - width);\r
-\r
- FLAG_Z = data;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- REG_D[(word2 >> 12) & 7] = data;\r
-\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfexts_32_pcix(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint data;\r
- uint ea = EA_PCIX_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- data = m68ki_read_32(ea);\r
-\r
- data = MASK_OUT_ABOVE_32(data<<offset);\r
-\r
- if((offset+width) > 32)\r
- data |= (m68ki_read_8(ea+4) << offset) >> 8;\r
-\r
- FLAG_N = NFLAG_32(data);\r
- data = MAKE_INT_32(data) >> (32 - width);\r
-\r
- FLAG_Z = data;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- REG_D[(word2 >> 12) & 7] = data;\r
-\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfextu_32_d(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint64 data = DY;\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = REG_D[offset&7];\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- offset &= 31;\r
- width = ((width-1) & 31) + 1;\r
-\r
- data = ROL_32(data, offset);\r
- FLAG_N = NFLAG_32(data);\r
- data >>= 32 - width;\r
-\r
- FLAG_Z = data;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- REG_D[(word2>>12)&7] = data;\r
-\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfextu_32_ai(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint data;\r
- uint ea = EA_AY_AI_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- data = m68ki_read_32(ea);\r
- data = MASK_OUT_ABOVE_32(data<<offset);\r
-\r
- if((offset+width) > 32)\r
- data |= (m68ki_read_8(ea+4) << offset) >> 8;\r
-\r
- FLAG_N = NFLAG_32(data);\r
- data >>= (32 - width);\r
-\r
- FLAG_Z = data;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- REG_D[(word2 >> 12) & 7] = data;\r
-\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfextu_32_di(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint data;\r
- uint ea = EA_AY_DI_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- data = m68ki_read_32(ea);\r
- data = MASK_OUT_ABOVE_32(data<<offset);\r
-\r
- if((offset+width) > 32)\r
- data |= (m68ki_read_8(ea+4) << offset) >> 8;\r
-\r
- FLAG_N = NFLAG_32(data);\r
- data >>= (32 - width);\r
-\r
- FLAG_Z = data;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- REG_D[(word2 >> 12) & 7] = data;\r
-\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfextu_32_ix(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint data;\r
- uint ea = EA_AY_IX_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- data = m68ki_read_32(ea);\r
- data = MASK_OUT_ABOVE_32(data<<offset);\r
-\r
- if((offset+width) > 32)\r
- data |= (m68ki_read_8(ea+4) << offset) >> 8;\r
-\r
- FLAG_N = NFLAG_32(data);\r
- data >>= (32 - width);\r
-\r
- FLAG_Z = data;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- REG_D[(word2 >> 12) & 7] = data;\r
-\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfextu_32_aw(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint data;\r
- uint ea = EA_AW_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- data = m68ki_read_32(ea);\r
- data = MASK_OUT_ABOVE_32(data<<offset);\r
-\r
- if((offset+width) > 32)\r
- data |= (m68ki_read_8(ea+4) << offset) >> 8;\r
-\r
- FLAG_N = NFLAG_32(data);\r
- data >>= (32 - width);\r
-\r
- FLAG_Z = data;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- REG_D[(word2 >> 12) & 7] = data;\r
-\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfextu_32_al(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint data;\r
- uint ea = EA_AL_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- data = m68ki_read_32(ea);\r
- data = MASK_OUT_ABOVE_32(data<<offset);\r
-\r
- if((offset+width) > 32)\r
- data |= (m68ki_read_8(ea+4) << offset) >> 8;\r
-\r
- FLAG_N = NFLAG_32(data);\r
- data >>= (32 - width);\r
-\r
- FLAG_Z = data;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- REG_D[(word2 >> 12) & 7] = data;\r
-\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfextu_32_pcdi(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint data;\r
- uint ea = EA_PCDI_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- data = m68ki_read_32(ea);\r
- data = MASK_OUT_ABOVE_32(data<<offset);\r
-\r
- if((offset+width) > 32)\r
- data |= (m68ki_read_8(ea+4) << offset) >> 8;\r
-\r
- FLAG_N = NFLAG_32(data);\r
- data >>= (32 - width);\r
-\r
- FLAG_Z = data;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- REG_D[(word2 >> 12) & 7] = data;\r
-\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfextu_32_pcix(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint data;\r
- uint ea = EA_PCIX_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- data = m68ki_read_32(ea);\r
- data = MASK_OUT_ABOVE_32(data<<offset);\r
-\r
- if((offset+width) > 32)\r
- data |= (m68ki_read_8(ea+4) << offset) >> 8;\r
-\r
- FLAG_N = NFLAG_32(data);\r
- data >>= (32 - width);\r
-\r
- FLAG_Z = data;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- REG_D[(word2 >> 12) & 7] = data;\r
-\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfffo_32_d(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint64 data = DY;\r
- uint bit;\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = REG_D[offset&7];\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- offset &= 31;\r
- width = ((width-1) & 31) + 1;\r
-\r
- data = ROL_32(data, offset);\r
- FLAG_N = NFLAG_32(data);\r
- data >>= 32 - width;\r
-\r
- FLAG_Z = data;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- for(bit = 1<<(width-1);bit && !(data & bit);bit>>= 1)\r
- offset++;\r
-\r
- REG_D[(word2>>12)&7] = offset;\r
-\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfffo_32_ai(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- sint local_offset;\r
- uint width = word2;\r
- uint data;\r
- uint bit;\r
- uint ea = EA_AY_AI_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- local_offset = offset % 8;\r
- if(local_offset < 0)\r
- {\r
- local_offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- data = m68ki_read_32(ea);\r
- data = MASK_OUT_ABOVE_32(data<<local_offset);\r
-\r
- if((local_offset+width) > 32)\r
- data |= (m68ki_read_8(ea+4) << local_offset) >> 8;\r
-\r
- FLAG_N = NFLAG_32(data);\r
- data >>= (32 - width);\r
-\r
- FLAG_Z = data;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- for(bit = 1<<(width-1);bit && !(data & bit);bit>>= 1)\r
- offset++;\r
-\r
- REG_D[(word2>>12)&7] = offset;\r
-\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfffo_32_di(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- sint local_offset;\r
- uint width = word2;\r
- uint data;\r
- uint bit;\r
- uint ea = EA_AY_DI_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- local_offset = offset % 8;\r
- if(local_offset < 0)\r
- {\r
- local_offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- data = m68ki_read_32(ea);\r
- data = MASK_OUT_ABOVE_32(data<<local_offset);\r
-\r
- if((local_offset+width) > 32)\r
- data |= (m68ki_read_8(ea+4) << local_offset) >> 8;\r
-\r
- FLAG_N = NFLAG_32(data);\r
- data >>= (32 - width);\r
-\r
- FLAG_Z = data;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- for(bit = 1<<(width-1);bit && !(data & bit);bit>>= 1)\r
- offset++;\r
-\r
- REG_D[(word2>>12)&7] = offset;\r
-\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfffo_32_ix(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- sint local_offset;\r
- uint width = word2;\r
- uint data;\r
- uint bit;\r
- uint ea = EA_AY_IX_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- local_offset = offset % 8;\r
- if(local_offset < 0)\r
- {\r
- local_offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- data = m68ki_read_32(ea);\r
- data = MASK_OUT_ABOVE_32(data<<local_offset);\r
-\r
- if((local_offset+width) > 32)\r
- data |= (m68ki_read_8(ea+4) << local_offset) >> 8;\r
-\r
- FLAG_N = NFLAG_32(data);\r
- data >>= (32 - width);\r
-\r
- FLAG_Z = data;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- for(bit = 1<<(width-1);bit && !(data & bit);bit>>= 1)\r
- offset++;\r
-\r
- REG_D[(word2>>12)&7] = offset;\r
-\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfffo_32_aw(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- sint local_offset;\r
- uint width = word2;\r
- uint data;\r
- uint bit;\r
- uint ea = EA_AW_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- local_offset = offset % 8;\r
- if(local_offset < 0)\r
- {\r
- local_offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- data = m68ki_read_32(ea);\r
- data = MASK_OUT_ABOVE_32(data<<local_offset);\r
-\r
- if((local_offset+width) > 32)\r
- data |= (m68ki_read_8(ea+4) << local_offset) >> 8;\r
-\r
- FLAG_N = NFLAG_32(data);\r
- data >>= (32 - width);\r
-\r
- FLAG_Z = data;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- for(bit = 1<<(width-1);bit && !(data & bit);bit>>= 1)\r
- offset++;\r
-\r
- REG_D[(word2>>12)&7] = offset;\r
-\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfffo_32_al(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- sint local_offset;\r
- uint width = word2;\r
- uint data;\r
- uint bit;\r
- uint ea = EA_AL_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- local_offset = offset % 8;\r
- if(local_offset < 0)\r
- {\r
- local_offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- data = m68ki_read_32(ea);\r
- data = MASK_OUT_ABOVE_32(data<<local_offset);\r
-\r
- if((local_offset+width) > 32)\r
- data |= (m68ki_read_8(ea+4) << local_offset) >> 8;\r
-\r
- FLAG_N = NFLAG_32(data);\r
- data >>= (32 - width);\r
-\r
- FLAG_Z = data;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- for(bit = 1<<(width-1);bit && !(data & bit);bit>>= 1)\r
- offset++;\r
-\r
- REG_D[(word2>>12)&7] = offset;\r
-\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfffo_32_pcdi(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- sint local_offset;\r
- uint width = word2;\r
- uint data;\r
- uint bit;\r
- uint ea = EA_PCDI_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- local_offset = offset % 8;\r
- if(local_offset < 0)\r
- {\r
- local_offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- data = m68ki_read_32(ea);\r
- data = MASK_OUT_ABOVE_32(data<<local_offset);\r
-\r
- if((local_offset+width) > 32)\r
- data |= (m68ki_read_8(ea+4) << local_offset) >> 8;\r
-\r
- FLAG_N = NFLAG_32(data);\r
- data >>= (32 - width);\r
-\r
- FLAG_Z = data;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- for(bit = 1<<(width-1);bit && !(data & bit);bit>>= 1)\r
- offset++;\r
-\r
- REG_D[(word2>>12)&7] = offset;\r
-\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfffo_32_pcix(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- sint local_offset;\r
- uint width = word2;\r
- uint data;\r
- uint bit;\r
- uint ea = EA_PCIX_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- local_offset = offset % 8;\r
- if(local_offset < 0)\r
- {\r
- local_offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- data = m68ki_read_32(ea);\r
- data = MASK_OUT_ABOVE_32(data<<local_offset);\r
-\r
- if((local_offset+width) > 32)\r
- data |= (m68ki_read_8(ea+4) << local_offset) >> 8;\r
-\r
- FLAG_N = NFLAG_32(data);\r
- data >>= (32 - width);\r
-\r
- FLAG_Z = data;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- for(bit = 1<<(width-1);bit && !(data & bit);bit>>= 1)\r
- offset++;\r
-\r
- REG_D[(word2>>12)&7] = offset;\r
-\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfins_32_d(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint* data = &DY;\r
- uint64 mask;\r
- uint64 insert = REG_D[(word2>>12)&7];\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = REG_D[offset&7];\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
-\r
- offset &= 31;\r
- width = ((width-1) & 31) + 1;\r
-\r
-\r
- mask = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask = ROR_32(mask, offset);\r
-\r
- insert = MASK_OUT_ABOVE_32(insert << (32 - width));\r
- FLAG_N = NFLAG_32(insert);\r
- FLAG_Z = insert;\r
- insert = ROR_32(insert, offset);\r
-\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- *data &= ~mask;\r
- *data |= insert;\r
-\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfins_32_ai(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint insert_base = REG_D[(word2>>12)&7];\r
- uint insert_long;\r
- uint insert_byte;\r
- uint mask_base;\r
- uint data_long;\r
- uint mask_long;\r
- uint data_byte = 0;\r
- uint mask_byte = 0;\r
- uint ea = EA_AY_AI_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask_long = mask_base >> offset;\r
-\r
- insert_base = MASK_OUT_ABOVE_32(insert_base << (32 - width));\r
- FLAG_N = NFLAG_32(insert_base);\r
- FLAG_Z = insert_base;\r
- insert_long = insert_base >> offset;\r
-\r
- data_long = m68ki_read_32(ea);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, (data_long & ~mask_long) | insert_long);\r
-\r
- if((width + offset) > 32)\r
- {\r
- mask_byte = MASK_OUT_ABOVE_8(mask_base);\r
- insert_byte = MASK_OUT_ABOVE_8(insert_base);\r
- data_byte = m68ki_read_8(ea+4);\r
- FLAG_Z |= (data_byte & mask_byte);\r
- m68ki_write_8(ea+4, (data_byte & ~mask_byte) | insert_byte);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfins_32_di(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint insert_base = REG_D[(word2>>12)&7];\r
- uint insert_long;\r
- uint insert_byte;\r
- uint mask_base;\r
- uint data_long;\r
- uint mask_long;\r
- uint data_byte = 0;\r
- uint mask_byte = 0;\r
- uint ea = EA_AY_DI_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask_long = mask_base >> offset;\r
-\r
- insert_base = MASK_OUT_ABOVE_32(insert_base << (32 - width));\r
- FLAG_N = NFLAG_32(insert_base);\r
- FLAG_Z = insert_base;\r
- insert_long = insert_base >> offset;\r
-\r
- data_long = m68ki_read_32(ea);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, (data_long & ~mask_long) | insert_long);\r
-\r
- if((width + offset) > 32)\r
- {\r
- mask_byte = MASK_OUT_ABOVE_8(mask_base);\r
- insert_byte = MASK_OUT_ABOVE_8(insert_base);\r
- data_byte = m68ki_read_8(ea+4);\r
- FLAG_Z |= (data_byte & mask_byte);\r
- m68ki_write_8(ea+4, (data_byte & ~mask_byte) | insert_byte);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfins_32_ix(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint insert_base = REG_D[(word2>>12)&7];\r
- uint insert_long;\r
- uint insert_byte;\r
- uint mask_base;\r
- uint data_long;\r
- uint mask_long;\r
- uint data_byte = 0;\r
- uint mask_byte = 0;\r
- uint ea = EA_AY_IX_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask_long = mask_base >> offset;\r
-\r
- insert_base = MASK_OUT_ABOVE_32(insert_base << (32 - width));\r
- FLAG_N = NFLAG_32(insert_base);\r
- FLAG_Z = insert_base;\r
- insert_long = insert_base >> offset;\r
-\r
- data_long = m68ki_read_32(ea);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, (data_long & ~mask_long) | insert_long);\r
-\r
- if((width + offset) > 32)\r
- {\r
- mask_byte = MASK_OUT_ABOVE_8(mask_base);\r
- insert_byte = MASK_OUT_ABOVE_8(insert_base);\r
- data_byte = m68ki_read_8(ea+4);\r
- FLAG_Z |= (data_byte & mask_byte);\r
- m68ki_write_8(ea+4, (data_byte & ~mask_byte) | insert_byte);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfins_32_aw(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint insert_base = REG_D[(word2>>12)&7];\r
- uint insert_long;\r
- uint insert_byte;\r
- uint mask_base;\r
- uint data_long;\r
- uint mask_long;\r
- uint data_byte = 0;\r
- uint mask_byte = 0;\r
- uint ea = EA_AW_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask_long = mask_base >> offset;\r
-\r
- insert_base = MASK_OUT_ABOVE_32(insert_base << (32 - width));\r
- FLAG_N = NFLAG_32(insert_base);\r
- FLAG_Z = insert_base;\r
- insert_long = insert_base >> offset;\r
-\r
- data_long = m68ki_read_32(ea);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, (data_long & ~mask_long) | insert_long);\r
-\r
- if((width + offset) > 32)\r
- {\r
- mask_byte = MASK_OUT_ABOVE_8(mask_base);\r
- insert_byte = MASK_OUT_ABOVE_8(insert_base);\r
- data_byte = m68ki_read_8(ea+4);\r
- FLAG_Z |= (data_byte & mask_byte);\r
- m68ki_write_8(ea+4, (data_byte & ~mask_byte) | insert_byte);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfins_32_al(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint insert_base = REG_D[(word2>>12)&7];\r
- uint insert_long;\r
- uint insert_byte;\r
- uint mask_base;\r
- uint data_long;\r
- uint mask_long;\r
- uint data_byte = 0;\r
- uint mask_byte = 0;\r
- uint ea = EA_AL_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
- mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask_long = mask_base >> offset;\r
-\r
- insert_base = MASK_OUT_ABOVE_32(insert_base << (32 - width));\r
- FLAG_N = NFLAG_32(insert_base);\r
- FLAG_Z = insert_base;\r
- insert_long = insert_base >> offset;\r
-\r
- data_long = m68ki_read_32(ea);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, (data_long & ~mask_long) | insert_long);\r
-\r
- if((width + offset) > 32)\r
- {\r
- mask_byte = MASK_OUT_ABOVE_8(mask_base);\r
- insert_byte = MASK_OUT_ABOVE_8(insert_base);\r
- data_byte = m68ki_read_8(ea+4);\r
- FLAG_Z |= (data_byte & mask_byte);\r
- m68ki_write_8(ea+4, (data_byte & ~mask_byte) | insert_byte);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfset_32_d(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint* data = &DY;\r
- uint64 mask;\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = REG_D[offset&7];\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
-\r
- offset &= 31;\r
- width = ((width-1) & 31) + 1;\r
-\r
-\r
- mask = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask = ROR_32(mask, offset);\r
-\r
- FLAG_N = NFLAG_32(*data<<offset);\r
- FLAG_Z = *data & mask;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- *data |= mask;\r
-\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfset_32_ai(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint mask_base;\r
- uint data_long;\r
- uint mask_long;\r
- uint data_byte = 0;\r
- uint mask_byte = 0;\r
- uint ea = EA_AY_AI_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
-\r
- mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask_long = mask_base >> offset;\r
-\r
- data_long = m68ki_read_32(ea);\r
- FLAG_N = NFLAG_32(data_long << offset);\r
- FLAG_Z = data_long & mask_long;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, data_long | mask_long);\r
-\r
- if((width + offset) > 32)\r
- {\r
- mask_byte = MASK_OUT_ABOVE_8(mask_base);\r
- data_byte = m68ki_read_8(ea+4);\r
- FLAG_Z |= (data_byte & mask_byte);\r
- m68ki_write_8(ea+4, data_byte | mask_byte);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfset_32_di(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint mask_base;\r
- uint data_long;\r
- uint mask_long;\r
- uint data_byte = 0;\r
- uint mask_byte = 0;\r
- uint ea = EA_AY_DI_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
-\r
- mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask_long = mask_base >> offset;\r
-\r
- data_long = m68ki_read_32(ea);\r
- FLAG_N = NFLAG_32(data_long << offset);\r
- FLAG_Z = data_long & mask_long;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, data_long | mask_long);\r
-\r
- if((width + offset) > 32)\r
- {\r
- mask_byte = MASK_OUT_ABOVE_8(mask_base);\r
- data_byte = m68ki_read_8(ea+4);\r
- FLAG_Z |= (data_byte & mask_byte);\r
- m68ki_write_8(ea+4, data_byte | mask_byte);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfset_32_ix(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint mask_base;\r
- uint data_long;\r
- uint mask_long;\r
- uint data_byte = 0;\r
- uint mask_byte = 0;\r
- uint ea = EA_AY_IX_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
-\r
- mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask_long = mask_base >> offset;\r
-\r
- data_long = m68ki_read_32(ea);\r
- FLAG_N = NFLAG_32(data_long << offset);\r
- FLAG_Z = data_long & mask_long;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, data_long | mask_long);\r
-\r
- if((width + offset) > 32)\r
- {\r
- mask_byte = MASK_OUT_ABOVE_8(mask_base);\r
- data_byte = m68ki_read_8(ea+4);\r
- FLAG_Z |= (data_byte & mask_byte);\r
- m68ki_write_8(ea+4, data_byte | mask_byte);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfset_32_aw(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint mask_base;\r
- uint data_long;\r
- uint mask_long;\r
- uint data_byte = 0;\r
- uint mask_byte = 0;\r
- uint ea = EA_AW_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
-\r
- mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask_long = mask_base >> offset;\r
-\r
- data_long = m68ki_read_32(ea);\r
- FLAG_N = NFLAG_32(data_long << offset);\r
- FLAG_Z = data_long & mask_long;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, data_long | mask_long);\r
-\r
- if((width + offset) > 32)\r
- {\r
- mask_byte = MASK_OUT_ABOVE_8(mask_base);\r
- data_byte = m68ki_read_8(ea+4);\r
- FLAG_Z |= (data_byte & mask_byte);\r
- m68ki_write_8(ea+4, data_byte | mask_byte);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bfset_32_al(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint mask_base;\r
- uint data_long;\r
- uint mask_long;\r
- uint data_byte = 0;\r
- uint mask_byte = 0;\r
- uint ea = EA_AL_8();\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
-\r
- mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask_long = mask_base >> offset;\r
-\r
- data_long = m68ki_read_32(ea);\r
- FLAG_N = NFLAG_32(data_long << offset);\r
- FLAG_Z = data_long & mask_long;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- m68ki_write_32(ea, data_long | mask_long);\r
-\r
- if((width + offset) > 32)\r
- {\r
- mask_byte = MASK_OUT_ABOVE_8(mask_base);\r
- data_byte = m68ki_read_8(ea+4);\r
- FLAG_Z |= (data_byte & mask_byte);\r
- m68ki_write_8(ea+4, data_byte | mask_byte);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bftst_32_d(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint* data = &DY;\r
- uint64 mask;\r
-\r
-\r
- if(BIT_B(word2))\r
- offset = REG_D[offset&7];\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
-\r
- offset &= 31;\r
- width = ((width-1) & 31) + 1;\r
-\r
-\r
- mask = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask = ROR_32(mask, offset);\r
-\r
- FLAG_N = NFLAG_32(*data<<offset);\r
- FLAG_Z = *data & mask;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bftst_32_ai(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint mask_base;\r
- uint data_long;\r
- uint mask_long;\r
- uint data_byte = 0;\r
- uint mask_byte = 0;\r
- uint ea = EA_AY_AI_8();\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
-\r
- mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask_long = mask_base >> offset;\r
-\r
- data_long = m68ki_read_32(ea);\r
- FLAG_N = ((data_long & (0x80000000 >> offset))<<offset)>>24;\r
- FLAG_Z = data_long & mask_long;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- if((width + offset) > 32)\r
- {\r
- mask_byte = MASK_OUT_ABOVE_8(mask_base);\r
- data_byte = m68ki_read_8(ea+4);\r
- FLAG_Z |= (data_byte & mask_byte);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bftst_32_di(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint mask_base;\r
- uint data_long;\r
- uint mask_long;\r
- uint data_byte = 0;\r
- uint mask_byte = 0;\r
- uint ea = EA_AY_DI_8();\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
-\r
- mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask_long = mask_base >> offset;\r
-\r
- data_long = m68ki_read_32(ea);\r
- FLAG_N = ((data_long & (0x80000000 >> offset))<<offset)>>24;\r
- FLAG_Z = data_long & mask_long;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- if((width + offset) > 32)\r
- {\r
- mask_byte = MASK_OUT_ABOVE_8(mask_base);\r
- data_byte = m68ki_read_8(ea+4);\r
- FLAG_Z |= (data_byte & mask_byte);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bftst_32_ix(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint mask_base;\r
- uint data_long;\r
- uint mask_long;\r
- uint data_byte = 0;\r
- uint mask_byte = 0;\r
- uint ea = EA_AY_IX_8();\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
-\r
- mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask_long = mask_base >> offset;\r
-\r
- data_long = m68ki_read_32(ea);\r
- FLAG_N = ((data_long & (0x80000000 >> offset))<<offset)>>24;\r
- FLAG_Z = data_long & mask_long;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- if((width + offset) > 32)\r
- {\r
- mask_byte = MASK_OUT_ABOVE_8(mask_base);\r
- data_byte = m68ki_read_8(ea+4);\r
- FLAG_Z |= (data_byte & mask_byte);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bftst_32_aw(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint mask_base;\r
- uint data_long;\r
- uint mask_long;\r
- uint data_byte = 0;\r
- uint mask_byte = 0;\r
- uint ea = EA_AW_8();\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
-\r
- mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask_long = mask_base >> offset;\r
-\r
- data_long = m68ki_read_32(ea);\r
- FLAG_N = ((data_long & (0x80000000 >> offset))<<offset)>>24;\r
- FLAG_Z = data_long & mask_long;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- if((width + offset) > 32)\r
- {\r
- mask_byte = MASK_OUT_ABOVE_8(mask_base);\r
- data_byte = m68ki_read_8(ea+4);\r
- FLAG_Z |= (data_byte & mask_byte);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bftst_32_al(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint mask_base;\r
- uint data_long;\r
- uint mask_long;\r
- uint data_byte = 0;\r
- uint mask_byte = 0;\r
- uint ea = EA_AL_8();\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
-\r
- mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask_long = mask_base >> offset;\r
-\r
- data_long = m68ki_read_32(ea);\r
- FLAG_N = ((data_long & (0x80000000 >> offset))<<offset)>>24;\r
- FLAG_Z = data_long & mask_long;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- if((width + offset) > 32)\r
- {\r
- mask_byte = MASK_OUT_ABOVE_8(mask_base);\r
- data_byte = m68ki_read_8(ea+4);\r
- FLAG_Z |= (data_byte & mask_byte);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bftst_32_pcdi(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint mask_base;\r
- uint data_long;\r
- uint mask_long;\r
- uint data_byte = 0;\r
- uint mask_byte = 0;\r
- uint ea = EA_PCDI_8();\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
-\r
- mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask_long = mask_base >> offset;\r
-\r
- data_long = m68ki_read_32(ea);\r
- FLAG_N = ((data_long & (0x80000000 >> offset))<<offset)>>24;\r
- FLAG_Z = data_long & mask_long;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- if((width + offset) > 32)\r
- {\r
- mask_byte = MASK_OUT_ABOVE_8(mask_base);\r
- data_byte = m68ki_read_8(ea+4);\r
- FLAG_Z |= (data_byte & mask_byte);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bftst_32_pcix(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- sint offset = (word2>>6)&31;\r
- uint width = word2;\r
- uint mask_base;\r
- uint data_long;\r
- uint mask_long;\r
- uint data_byte = 0;\r
- uint mask_byte = 0;\r
- uint ea = EA_PCIX_8();\r
-\r
- if(BIT_B(word2))\r
- offset = MAKE_INT_32(REG_D[offset&7]);\r
- if(BIT_5(word2))\r
- width = REG_D[width&7];\r
-\r
- /* Offset is signed so we have to use ugly math =( */\r
- ea += offset / 8;\r
- offset %= 8;\r
- if(offset < 0)\r
- {\r
- offset += 8;\r
- ea--;\r
- }\r
- width = ((width-1) & 31) + 1;\r
-\r
-\r
- mask_base = MASK_OUT_ABOVE_32(0xffffffff << (32 - width));\r
- mask_long = mask_base >> offset;\r
-\r
- data_long = m68ki_read_32(ea);\r
- FLAG_N = ((data_long & (0x80000000 >> offset))<<offset)>>24;\r
- FLAG_Z = data_long & mask_long;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- if((width + offset) > 32)\r
- {\r
- mask_byte = MASK_OUT_ABOVE_8(mask_base);\r
- data_byte = m68ki_read_8(ea+4);\r
- FLAG_Z |= (data_byte & mask_byte);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bkpt(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- m68ki_bkpt_ack(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE) ? REG_IR & 7 : 0); /* auto-disable (see m68kcpu.h) */\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_bra_8(void)\r
-{\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
-// if(REG_PC == REG_PPC)\r
-// USE_ALL_CYCLES();\r
-}\r
-\r
-\r
-void m68k_op_bra_16(void)\r
-{\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
-// if(REG_PC == REG_PPC)\r
-// USE_ALL_CYCLES();\r
-}\r
-\r
-\r
-void m68k_op_bra_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint offset = OPER_I_32();\r
- REG_PC -= 4;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_32(offset);\r
- if(REG_PC == REG_PPC)\r
- USE_ALL_CYCLES();\r
- return;\r
- }\r
- else\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
-// if(REG_PC == REG_PPC)\r
-// USE_ALL_CYCLES();\r
- }\r
-}\r
-\r
-\r
-void m68k_op_bset_32_r_d(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint mask = 1 << (DX & 0x1f);\r
-\r
- FLAG_Z = *r_dst & mask;\r
- *r_dst |= mask;\r
-}\r
-\r
-\r
-void m68k_op_bset_8_r_ai(void)\r
-{\r
- uint ea = EA_AY_AI_8();\r
- uint src = m68ki_read_8(ea);\r
- uint mask = 1 << (DX & 7);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src | mask);\r
-}\r
-\r
-\r
-void m68k_op_bset_8_r_pi(void)\r
-{\r
- uint ea = EA_AY_PI_8();\r
- uint src = m68ki_read_8(ea);\r
- uint mask = 1 << (DX & 7);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src | mask);\r
-}\r
-\r
-\r
-void m68k_op_bset_8_r_pi7(void)\r
-{\r
- uint ea = EA_A7_PI_8();\r
- uint src = m68ki_read_8(ea);\r
- uint mask = 1 << (DX & 7);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src | mask);\r
-}\r
-\r
-\r
-void m68k_op_bset_8_r_pd(void)\r
-{\r
- uint ea = EA_AY_PD_8();\r
- uint src = m68ki_read_8(ea);\r
- uint mask = 1 << (DX & 7);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src | mask);\r
-}\r
-\r
-\r
-void m68k_op_bset_8_r_pd7(void)\r
-{\r
- uint ea = EA_A7_PD_8();\r
- uint src = m68ki_read_8(ea);\r
- uint mask = 1 << (DX & 7);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src | mask);\r
-}\r
-\r
-\r
-void m68k_op_bset_8_r_di(void)\r
-{\r
- uint ea = EA_AY_DI_8();\r
- uint src = m68ki_read_8(ea);\r
- uint mask = 1 << (DX & 7);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src | mask);\r
-}\r
-\r
-\r
-void m68k_op_bset_8_r_ix(void)\r
-{\r
- uint ea = EA_AY_IX_8();\r
- uint src = m68ki_read_8(ea);\r
- uint mask = 1 << (DX & 7);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src | mask);\r
-}\r
-\r
-\r
-void m68k_op_bset_8_r_aw(void)\r
-{\r
- uint ea = EA_AW_8();\r
- uint src = m68ki_read_8(ea);\r
- uint mask = 1 << (DX & 7);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src | mask);\r
-}\r
-\r
-\r
-void m68k_op_bset_8_r_al(void)\r
-{\r
- uint ea = EA_AL_8();\r
- uint src = m68ki_read_8(ea);\r
- uint mask = 1 << (DX & 7);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src | mask);\r
-}\r
-\r
-\r
-void m68k_op_bset_32_s_d(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint mask = 1 << (OPER_I_8() & 0x1f);\r
-\r
- FLAG_Z = *r_dst & mask;\r
- *r_dst |= mask;\r
-}\r
-\r
-\r
-void m68k_op_bset_8_s_ai(void)\r
-{\r
- uint mask = 1 << (OPER_I_8() & 7);\r
- uint ea = EA_AY_AI_8();\r
- uint src = m68ki_read_8(ea);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src | mask);\r
-}\r
-\r
-\r
-void m68k_op_bset_8_s_pi(void)\r
-{\r
- uint mask = 1 << (OPER_I_8() & 7);\r
- uint ea = EA_AY_PI_8();\r
- uint src = m68ki_read_8(ea);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src | mask);\r
-}\r
-\r
-\r
-void m68k_op_bset_8_s_pi7(void)\r
-{\r
- uint mask = 1 << (OPER_I_8() & 7);\r
- uint ea = EA_A7_PI_8();\r
- uint src = m68ki_read_8(ea);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src | mask);\r
-}\r
-\r
-\r
-void m68k_op_bset_8_s_pd(void)\r
-{\r
- uint mask = 1 << (OPER_I_8() & 7);\r
- uint ea = EA_AY_PD_8();\r
- uint src = m68ki_read_8(ea);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src | mask);\r
-}\r
-\r
-\r
-void m68k_op_bset_8_s_pd7(void)\r
-{\r
- uint mask = 1 << (OPER_I_8() & 7);\r
- uint ea = EA_A7_PD_8();\r
- uint src = m68ki_read_8(ea);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src | mask);\r
-}\r
-\r
-\r
-void m68k_op_bset_8_s_di(void)\r
-{\r
- uint mask = 1 << (OPER_I_8() & 7);\r
- uint ea = EA_AY_DI_8();\r
- uint src = m68ki_read_8(ea);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src | mask);\r
-}\r
-\r
-\r
-void m68k_op_bset_8_s_ix(void)\r
-{\r
- uint mask = 1 << (OPER_I_8() & 7);\r
- uint ea = EA_AY_IX_8();\r
- uint src = m68ki_read_8(ea);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src | mask);\r
-}\r
-\r
-\r
-void m68k_op_bset_8_s_aw(void)\r
-{\r
- uint mask = 1 << (OPER_I_8() & 7);\r
- uint ea = EA_AW_8();\r
- uint src = m68ki_read_8(ea);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src | mask);\r
-}\r
-\r
-\r
-void m68k_op_bset_8_s_al(void)\r
-{\r
- uint mask = 1 << (OPER_I_8() & 7);\r
- uint ea = EA_AL_8();\r
- uint src = m68ki_read_8(ea);\r
-\r
- FLAG_Z = src & mask;\r
- m68ki_write_8(ea, src | mask);\r
-}\r
-\r
-\r
-void m68k_op_bsr_8(void)\r
-{\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_push_32(REG_PC);\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
-}\r
-\r
-\r
-void m68k_op_bsr_16(void)\r
-{\r
- uint offset = OPER_I_16();\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_push_32(REG_PC);\r
- REG_PC -= 2;\r
- m68ki_branch_16(offset);\r
-}\r
-\r
-\r
-void m68k_op_bsr_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint offset = OPER_I_32();\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_push_32(REG_PC);\r
- REG_PC -= 4;\r
- m68ki_branch_32(offset);\r
- return;\r
- }\r
- else\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_push_32(REG_PC);\r
- m68ki_branch_8(MASK_OUT_ABOVE_8(REG_IR));\r
- }\r
-}\r
-\r
-\r
-void m68k_op_btst_32_r_d(void)\r
-{\r
- FLAG_Z = DY & (1 << (DX & 0x1f));\r
-}\r
-\r
-\r
-void m68k_op_btst_8_r_ai(void)\r
-{\r
- FLAG_Z = OPER_AY_AI_8() & (1 << (DX & 7));\r
-}\r
-\r
-\r
-void m68k_op_btst_8_r_pi(void)\r
-{\r
- FLAG_Z = OPER_AY_PI_8() & (1 << (DX & 7));\r
-}\r
-\r
-\r
-void m68k_op_btst_8_r_pi7(void)\r
-{\r
- FLAG_Z = OPER_A7_PI_8() & (1 << (DX & 7));\r
-}\r
-\r
-\r
-void m68k_op_btst_8_r_pd(void)\r
-{\r
- FLAG_Z = OPER_AY_PD_8() & (1 << (DX & 7));\r
-}\r
-\r
-\r
-void m68k_op_btst_8_r_pd7(void)\r
-{\r
- FLAG_Z = OPER_A7_PD_8() & (1 << (DX & 7));\r
-}\r
-\r
-\r
-void m68k_op_btst_8_r_di(void)\r
-{\r
- FLAG_Z = OPER_AY_DI_8() & (1 << (DX & 7));\r
-}\r
-\r
-\r
-void m68k_op_btst_8_r_ix(void)\r
-{\r
- FLAG_Z = OPER_AY_IX_8() & (1 << (DX & 7));\r
-}\r
-\r
-\r
-void m68k_op_btst_8_r_aw(void)\r
-{\r
- FLAG_Z = OPER_AW_8() & (1 << (DX & 7));\r
-}\r
-\r
-\r
-void m68k_op_btst_8_r_al(void)\r
-{\r
- FLAG_Z = OPER_AL_8() & (1 << (DX & 7));\r
-}\r
-\r
-\r
-void m68k_op_btst_8_r_pcdi(void)\r
-{\r
- FLAG_Z = OPER_PCDI_8() & (1 << (DX & 7));\r
-}\r
-\r
-\r
-void m68k_op_btst_8_r_pcix(void)\r
-{\r
- FLAG_Z = OPER_PCIX_8() & (1 << (DX & 7));\r
-}\r
-\r
-\r
-void m68k_op_btst_8_r_i(void)\r
-{\r
- FLAG_Z = OPER_I_8() & (1 << (DX & 7));\r
-}\r
-\r
-\r
-void m68k_op_btst_32_s_d(void)\r
-{\r
- FLAG_Z = DY & (1 << (OPER_I_8() & 0x1f));\r
-}\r
-\r
-\r
-void m68k_op_btst_8_s_ai(void)\r
-{\r
- uint bit = OPER_I_8() & 7;\r
-\r
- FLAG_Z = OPER_AY_AI_8() & (1 << bit);\r
-}\r
-\r
-\r
-void m68k_op_btst_8_s_pi(void)\r
-{\r
- uint bit = OPER_I_8() & 7;\r
-\r
- FLAG_Z = OPER_AY_PI_8() & (1 << bit);\r
-}\r
-\r
-\r
-void m68k_op_btst_8_s_pi7(void)\r
-{\r
- uint bit = OPER_I_8() & 7;\r
-\r
- FLAG_Z = OPER_A7_PI_8() & (1 << bit);\r
-}\r
-\r
-\r
-void m68k_op_btst_8_s_pd(void)\r
-{\r
- uint bit = OPER_I_8() & 7;\r
-\r
- FLAG_Z = OPER_AY_PD_8() & (1 << bit);\r
-}\r
-\r
-\r
-void m68k_op_btst_8_s_pd7(void)\r
-{\r
- uint bit = OPER_I_8() & 7;\r
-\r
- FLAG_Z = OPER_A7_PD_8() & (1 << bit);\r
-}\r
-\r
-\r
-void m68k_op_btst_8_s_di(void)\r
-{\r
- uint bit = OPER_I_8() & 7;\r
-\r
- FLAG_Z = OPER_AY_DI_8() & (1 << bit);\r
-}\r
-\r
-\r
-void m68k_op_btst_8_s_ix(void)\r
-{\r
- uint bit = OPER_I_8() & 7;\r
-\r
- FLAG_Z = OPER_AY_IX_8() & (1 << bit);\r
-}\r
-\r
-\r
-void m68k_op_btst_8_s_aw(void)\r
-{\r
- uint bit = OPER_I_8() & 7;\r
-\r
- FLAG_Z = OPER_AW_8() & (1 << bit);\r
-}\r
-\r
-\r
-void m68k_op_btst_8_s_al(void)\r
-{\r
- uint bit = OPER_I_8() & 7;\r
-\r
- FLAG_Z = OPER_AL_8() & (1 << bit);\r
-}\r
-\r
-\r
-void m68k_op_btst_8_s_pcdi(void)\r
-{\r
- uint bit = OPER_I_8() & 7;\r
-\r
- FLAG_Z = OPER_PCDI_8() & (1 << bit);\r
-}\r
-\r
-\r
-void m68k_op_btst_8_s_pcix(void)\r
-{\r
- uint bit = OPER_I_8() & 7;\r
-\r
- FLAG_Z = OPER_PCIX_8() & (1 << bit);\r
-}\r
-\r
-\r
-void m68k_op_callm_32_ai(void)\r
-{\r
- /* note: watch out for pcrelative modes */\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- {\r
- uint ea = EA_AY_AI_32();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- REG_PC += 2;\r
-(void)ea; /* just to avoid an 'unused variable' warning */\r
- M68K_DO_LOG((M68K_LOG_FILEHANDLE "%s at %08x: called unimplemented instruction %04x (%s)\n",\r
- m68ki_cpu_names[CPU_TYPE], ADDRESS_68K(REG_PC - 2), REG_IR,\r
- m68k_disassemble_quick(ADDRESS_68K(REG_PC - 2))));\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_callm_32_di(void)\r
-{\r
- /* note: watch out for pcrelative modes */\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- {\r
- uint ea = EA_AY_DI_32();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- REG_PC += 2;\r
-(void)ea; /* just to avoid an 'unused variable' warning */\r
- M68K_DO_LOG((M68K_LOG_FILEHANDLE "%s at %08x: called unimplemented instruction %04x (%s)\n",\r
- m68ki_cpu_names[CPU_TYPE], ADDRESS_68K(REG_PC - 2), REG_IR,\r
- m68k_disassemble_quick(ADDRESS_68K(REG_PC - 2))));\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_callm_32_ix(void)\r
-{\r
- /* note: watch out for pcrelative modes */\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- {\r
- uint ea = EA_AY_IX_32();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- REG_PC += 2;\r
-(void)ea; /* just to avoid an 'unused variable' warning */\r
- M68K_DO_LOG((M68K_LOG_FILEHANDLE "%s at %08x: called unimplemented instruction %04x (%s)\n",\r
- m68ki_cpu_names[CPU_TYPE], ADDRESS_68K(REG_PC - 2), REG_IR,\r
- m68k_disassemble_quick(ADDRESS_68K(REG_PC - 2))));\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_callm_32_aw(void)\r
-{\r
- /* note: watch out for pcrelative modes */\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- {\r
- uint ea = EA_AW_32();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- REG_PC += 2;\r
-(void)ea; /* just to avoid an 'unused variable' warning */\r
- M68K_DO_LOG((M68K_LOG_FILEHANDLE "%s at %08x: called unimplemented instruction %04x (%s)\n",\r
- m68ki_cpu_names[CPU_TYPE], ADDRESS_68K(REG_PC - 2), REG_IR,\r
- m68k_disassemble_quick(ADDRESS_68K(REG_PC - 2))));\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_callm_32_al(void)\r
-{\r
- /* note: watch out for pcrelative modes */\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- {\r
- uint ea = EA_AL_32();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- REG_PC += 2;\r
-(void)ea; /* just to avoid an 'unused variable' warning */\r
- M68K_DO_LOG((M68K_LOG_FILEHANDLE "%s at %08x: called unimplemented instruction %04x (%s)\n",\r
- m68ki_cpu_names[CPU_TYPE], ADDRESS_68K(REG_PC - 2), REG_IR,\r
- m68k_disassemble_quick(ADDRESS_68K(REG_PC - 2))));\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_callm_32_pcdi(void)\r
-{\r
- /* note: watch out for pcrelative modes */\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- {\r
- uint ea = EA_PCDI_32();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- REG_PC += 2;\r
-(void)ea; /* just to avoid an 'unused variable' warning */\r
- M68K_DO_LOG((M68K_LOG_FILEHANDLE "%s at %08x: called unimplemented instruction %04x (%s)\n",\r
- m68ki_cpu_names[CPU_TYPE], ADDRESS_68K(REG_PC - 2), REG_IR,\r
- m68k_disassemble_quick(ADDRESS_68K(REG_PC - 2))));\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_callm_32_pcix(void)\r
-{\r
- /* note: watch out for pcrelative modes */\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- {\r
- uint ea = EA_PCIX_32();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- REG_PC += 2;\r
-(void)ea; /* just to avoid an 'unused variable' warning */\r
- M68K_DO_LOG((M68K_LOG_FILEHANDLE "%s at %08x: called unimplemented instruction %04x (%s)\n",\r
- m68ki_cpu_names[CPU_TYPE], ADDRESS_68K(REG_PC - 2), REG_IR,\r
- m68k_disassemble_quick(ADDRESS_68K(REG_PC - 2))));\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cas_8_ai(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_AI_8();\r
- uint dest = m68ki_read_8(ea);\r
- uint* compare = ®_D[word2 & 7];\r
- uint res = dest - MASK_OUT_ABOVE_8(*compare);\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(*compare, dest, res);\r
- FLAG_C = CFLAG_8(res);\r
-\r
- if(COND_NE())\r
- *compare = MASK_OUT_BELOW_8(*compare) | dest;\r
- else\r
- {\r
- USE_CYCLES(3);\r
- m68ki_write_8(ea, MASK_OUT_ABOVE_8(REG_D[(word2 >> 6) & 7]));\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cas_8_pi(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_PI_8();\r
- uint dest = m68ki_read_8(ea);\r
- uint* compare = ®_D[word2 & 7];\r
- uint res = dest - MASK_OUT_ABOVE_8(*compare);\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(*compare, dest, res);\r
- FLAG_C = CFLAG_8(res);\r
-\r
- if(COND_NE())\r
- *compare = MASK_OUT_BELOW_8(*compare) | dest;\r
- else\r
- {\r
- USE_CYCLES(3);\r
- m68ki_write_8(ea, MASK_OUT_ABOVE_8(REG_D[(word2 >> 6) & 7]));\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cas_8_pi7(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_A7_PI_8();\r
- uint dest = m68ki_read_8(ea);\r
- uint* compare = ®_D[word2 & 7];\r
- uint res = dest - MASK_OUT_ABOVE_8(*compare);\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(*compare, dest, res);\r
- FLAG_C = CFLAG_8(res);\r
-\r
- if(COND_NE())\r
- *compare = MASK_OUT_BELOW_8(*compare) | dest;\r
- else\r
- {\r
- USE_CYCLES(3);\r
- m68ki_write_8(ea, MASK_OUT_ABOVE_8(REG_D[(word2 >> 6) & 7]));\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cas_8_pd(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_PD_8();\r
- uint dest = m68ki_read_8(ea);\r
- uint* compare = ®_D[word2 & 7];\r
- uint res = dest - MASK_OUT_ABOVE_8(*compare);\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(*compare, dest, res);\r
- FLAG_C = CFLAG_8(res);\r
-\r
- if(COND_NE())\r
- *compare = MASK_OUT_BELOW_8(*compare) | dest;\r
- else\r
- {\r
- USE_CYCLES(3);\r
- m68ki_write_8(ea, MASK_OUT_ABOVE_8(REG_D[(word2 >> 6) & 7]));\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cas_8_pd7(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_A7_PD_8();\r
- uint dest = m68ki_read_8(ea);\r
- uint* compare = ®_D[word2 & 7];\r
- uint res = dest - MASK_OUT_ABOVE_8(*compare);\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(*compare, dest, res);\r
- FLAG_C = CFLAG_8(res);\r
-\r
- if(COND_NE())\r
- *compare = MASK_OUT_BELOW_8(*compare) | dest;\r
- else\r
- {\r
- USE_CYCLES(3);\r
- m68ki_write_8(ea, MASK_OUT_ABOVE_8(REG_D[(word2 >> 6) & 7]));\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cas_8_di(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_DI_8();\r
- uint dest = m68ki_read_8(ea);\r
- uint* compare = ®_D[word2 & 7];\r
- uint res = dest - MASK_OUT_ABOVE_8(*compare);\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(*compare, dest, res);\r
- FLAG_C = CFLAG_8(res);\r
-\r
- if(COND_NE())\r
- *compare = MASK_OUT_BELOW_8(*compare) | dest;\r
- else\r
- {\r
- USE_CYCLES(3);\r
- m68ki_write_8(ea, MASK_OUT_ABOVE_8(REG_D[(word2 >> 6) & 7]));\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cas_8_ix(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_IX_8();\r
- uint dest = m68ki_read_8(ea);\r
- uint* compare = ®_D[word2 & 7];\r
- uint res = dest - MASK_OUT_ABOVE_8(*compare);\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(*compare, dest, res);\r
- FLAG_C = CFLAG_8(res);\r
-\r
- if(COND_NE())\r
- *compare = MASK_OUT_BELOW_8(*compare) | dest;\r
- else\r
- {\r
- USE_CYCLES(3);\r
- m68ki_write_8(ea, MASK_OUT_ABOVE_8(REG_D[(word2 >> 6) & 7]));\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cas_8_aw(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AW_8();\r
- uint dest = m68ki_read_8(ea);\r
- uint* compare = ®_D[word2 & 7];\r
- uint res = dest - MASK_OUT_ABOVE_8(*compare);\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(*compare, dest, res);\r
- FLAG_C = CFLAG_8(res);\r
-\r
- if(COND_NE())\r
- *compare = MASK_OUT_BELOW_8(*compare) | dest;\r
- else\r
- {\r
- USE_CYCLES(3);\r
- m68ki_write_8(ea, MASK_OUT_ABOVE_8(REG_D[(word2 >> 6) & 7]));\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cas_8_al(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AL_8();\r
- uint dest = m68ki_read_8(ea);\r
- uint* compare = ®_D[word2 & 7];\r
- uint res = dest - MASK_OUT_ABOVE_8(*compare);\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(*compare, dest, res);\r
- FLAG_C = CFLAG_8(res);\r
-\r
- if(COND_NE())\r
- *compare = MASK_OUT_BELOW_8(*compare) | dest;\r
- else\r
- {\r
- USE_CYCLES(3);\r
- m68ki_write_8(ea, MASK_OUT_ABOVE_8(REG_D[(word2 >> 6) & 7]));\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cas_16_ai(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_AI_16();\r
- uint dest = m68ki_read_16(ea);\r
- uint* compare = ®_D[word2 & 7];\r
- uint res = dest - MASK_OUT_ABOVE_16(*compare);\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(*compare, dest, res);\r
- FLAG_C = CFLAG_16(res);\r
-\r
- if(COND_NE())\r
- *compare = MASK_OUT_BELOW_16(*compare) | dest;\r
- else\r
- {\r
- USE_CYCLES(3);\r
- m68ki_write_16(ea, MASK_OUT_ABOVE_16(REG_D[(word2 >> 6) & 7]));\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cas_16_pi(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_PI_16();\r
- uint dest = m68ki_read_16(ea);\r
- uint* compare = ®_D[word2 & 7];\r
- uint res = dest - MASK_OUT_ABOVE_16(*compare);\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(*compare, dest, res);\r
- FLAG_C = CFLAG_16(res);\r
-\r
- if(COND_NE())\r
- *compare = MASK_OUT_BELOW_16(*compare) | dest;\r
- else\r
- {\r
- USE_CYCLES(3);\r
- m68ki_write_16(ea, MASK_OUT_ABOVE_16(REG_D[(word2 >> 6) & 7]));\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cas_16_pd(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_PD_16();\r
- uint dest = m68ki_read_16(ea);\r
- uint* compare = ®_D[word2 & 7];\r
- uint res = dest - MASK_OUT_ABOVE_16(*compare);\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(*compare, dest, res);\r
- FLAG_C = CFLAG_16(res);\r
-\r
- if(COND_NE())\r
- *compare = MASK_OUT_BELOW_16(*compare) | dest;\r
- else\r
- {\r
- USE_CYCLES(3);\r
- m68ki_write_16(ea, MASK_OUT_ABOVE_16(REG_D[(word2 >> 6) & 7]));\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cas_16_di(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_DI_16();\r
- uint dest = m68ki_read_16(ea);\r
- uint* compare = ®_D[word2 & 7];\r
- uint res = dest - MASK_OUT_ABOVE_16(*compare);\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(*compare, dest, res);\r
- FLAG_C = CFLAG_16(res);\r
-\r
- if(COND_NE())\r
- *compare = MASK_OUT_BELOW_16(*compare) | dest;\r
- else\r
- {\r
- USE_CYCLES(3);\r
- m68ki_write_16(ea, MASK_OUT_ABOVE_16(REG_D[(word2 >> 6) & 7]));\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cas_16_ix(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_IX_16();\r
- uint dest = m68ki_read_16(ea);\r
- uint* compare = ®_D[word2 & 7];\r
- uint res = dest - MASK_OUT_ABOVE_16(*compare);\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(*compare, dest, res);\r
- FLAG_C = CFLAG_16(res);\r
-\r
- if(COND_NE())\r
- *compare = MASK_OUT_BELOW_16(*compare) | dest;\r
- else\r
- {\r
- USE_CYCLES(3);\r
- m68ki_write_16(ea, MASK_OUT_ABOVE_16(REG_D[(word2 >> 6) & 7]));\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cas_16_aw(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AW_16();\r
- uint dest = m68ki_read_16(ea);\r
- uint* compare = ®_D[word2 & 7];\r
- uint res = dest - MASK_OUT_ABOVE_16(*compare);\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(*compare, dest, res);\r
- FLAG_C = CFLAG_16(res);\r
-\r
- if(COND_NE())\r
- *compare = MASK_OUT_BELOW_16(*compare) | dest;\r
- else\r
- {\r
- USE_CYCLES(3);\r
- m68ki_write_16(ea, MASK_OUT_ABOVE_16(REG_D[(word2 >> 6) & 7]));\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cas_16_al(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AL_16();\r
- uint dest = m68ki_read_16(ea);\r
- uint* compare = ®_D[word2 & 7];\r
- uint res = dest - MASK_OUT_ABOVE_16(*compare);\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(*compare, dest, res);\r
- FLAG_C = CFLAG_16(res);\r
-\r
- if(COND_NE())\r
- *compare = MASK_OUT_BELOW_16(*compare) | dest;\r
- else\r
- {\r
- USE_CYCLES(3);\r
- m68ki_write_16(ea, MASK_OUT_ABOVE_16(REG_D[(word2 >> 6) & 7]));\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cas_32_ai(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_AI_32();\r
- uint dest = m68ki_read_32(ea);\r
- uint* compare = ®_D[word2 & 7];\r
- uint res = dest - *compare;\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(*compare, dest, res);\r
- FLAG_C = CFLAG_SUB_32(*compare, dest, res);\r
-\r
- if(COND_NE())\r
- *compare = dest;\r
- else\r
- {\r
- USE_CYCLES(3);\r
- m68ki_write_32(ea, REG_D[(word2 >> 6) & 7]);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cas_32_pi(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_PI_32();\r
- uint dest = m68ki_read_32(ea);\r
- uint* compare = ®_D[word2 & 7];\r
- uint res = dest - *compare;\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(*compare, dest, res);\r
- FLAG_C = CFLAG_SUB_32(*compare, dest, res);\r
-\r
- if(COND_NE())\r
- *compare = dest;\r
- else\r
- {\r
- USE_CYCLES(3);\r
- m68ki_write_32(ea, REG_D[(word2 >> 6) & 7]);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cas_32_pd(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_PD_32();\r
- uint dest = m68ki_read_32(ea);\r
- uint* compare = ®_D[word2 & 7];\r
- uint res = dest - *compare;\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(*compare, dest, res);\r
- FLAG_C = CFLAG_SUB_32(*compare, dest, res);\r
-\r
- if(COND_NE())\r
- *compare = dest;\r
- else\r
- {\r
- USE_CYCLES(3);\r
- m68ki_write_32(ea, REG_D[(word2 >> 6) & 7]);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cas_32_di(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_DI_32();\r
- uint dest = m68ki_read_32(ea);\r
- uint* compare = ®_D[word2 & 7];\r
- uint res = dest - *compare;\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(*compare, dest, res);\r
- FLAG_C = CFLAG_SUB_32(*compare, dest, res);\r
-\r
- if(COND_NE())\r
- *compare = dest;\r
- else\r
- {\r
- USE_CYCLES(3);\r
- m68ki_write_32(ea, REG_D[(word2 >> 6) & 7]);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cas_32_ix(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_IX_32();\r
- uint dest = m68ki_read_32(ea);\r
- uint* compare = ®_D[word2 & 7];\r
- uint res = dest - *compare;\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(*compare, dest, res);\r
- FLAG_C = CFLAG_SUB_32(*compare, dest, res);\r
-\r
- if(COND_NE())\r
- *compare = dest;\r
- else\r
- {\r
- USE_CYCLES(3);\r
- m68ki_write_32(ea, REG_D[(word2 >> 6) & 7]);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cas_32_aw(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AW_32();\r
- uint dest = m68ki_read_32(ea);\r
- uint* compare = ®_D[word2 & 7];\r
- uint res = dest - *compare;\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(*compare, dest, res);\r
- FLAG_C = CFLAG_SUB_32(*compare, dest, res);\r
-\r
- if(COND_NE())\r
- *compare = dest;\r
- else\r
- {\r
- USE_CYCLES(3);\r
- m68ki_write_32(ea, REG_D[(word2 >> 6) & 7]);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cas_32_al(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AL_32();\r
- uint dest = m68ki_read_32(ea);\r
- uint* compare = ®_D[word2 & 7];\r
- uint res = dest - *compare;\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(*compare, dest, res);\r
- FLAG_C = CFLAG_SUB_32(*compare, dest, res);\r
-\r
- if(COND_NE())\r
- *compare = dest;\r
- else\r
- {\r
- USE_CYCLES(3);\r
- m68ki_write_32(ea, REG_D[(word2 >> 6) & 7]);\r
- }\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cas2_16(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_32();\r
- uint* compare1 = ®_D[(word2 >> 16) & 7];\r
- uint ea1 = REG_DA[(word2 >> 28) & 15];\r
- uint dest1 = m68ki_read_16(ea1);\r
- uint res1 = dest1 - MASK_OUT_ABOVE_16(*compare1);\r
- uint* compare2 = ®_D[word2 & 7];\r
- uint ea2 = REG_DA[(word2 >> 12) & 15];\r
- uint dest2 = m68ki_read_16(ea2);\r
- uint res2;\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- FLAG_N = NFLAG_16(res1);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res1);\r
- FLAG_V = VFLAG_SUB_16(*compare1, dest1, res1);\r
- FLAG_C = CFLAG_16(res1);\r
-\r
- if(COND_EQ())\r
- {\r
- res2 = dest2 - MASK_OUT_ABOVE_16(*compare2);\r
-\r
- FLAG_N = NFLAG_16(res2);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res2);\r
- FLAG_V = VFLAG_SUB_16(*compare2, dest2, res2);\r
- FLAG_C = CFLAG_16(res2);\r
-\r
- if(COND_EQ())\r
- {\r
- USE_CYCLES(3);\r
- m68ki_write_16(ea1, REG_D[(word2 >> 22) & 7]);\r
- m68ki_write_16(ea2, REG_D[(word2 >> 6) & 7]);\r
- return;\r
- }\r
- }\r
- *compare1 = BIT_1F(word2) ? MAKE_INT_16(dest1) : MASK_OUT_BELOW_16(*compare1) | dest1;\r
- *compare2 = BIT_F(word2) ? MAKE_INT_16(dest2) : MASK_OUT_BELOW_16(*compare2) | dest2;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cas2_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_32();\r
- uint* compare1 = ®_D[(word2 >> 16) & 7];\r
- uint ea1 = REG_DA[(word2 >> 28) & 15];\r
- uint dest1 = m68ki_read_32(ea1);\r
- uint res1 = dest1 - *compare1;\r
- uint* compare2 = ®_D[word2 & 7];\r
- uint ea2 = REG_DA[(word2 >> 12) & 15];\r
- uint dest2 = m68ki_read_32(ea2);\r
- uint res2;\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- FLAG_N = NFLAG_32(res1);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res1);\r
- FLAG_V = VFLAG_SUB_32(*compare1, dest1, res1);\r
- FLAG_C = CFLAG_SUB_32(*compare1, dest1, res1);\r
-\r
- if(COND_EQ())\r
- {\r
- res2 = dest2 - *compare2;\r
-\r
- FLAG_N = NFLAG_32(res2);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res2);\r
- FLAG_V = VFLAG_SUB_32(*compare2, dest2, res2);\r
- FLAG_C = CFLAG_SUB_32(*compare2, dest2, res2);\r
-\r
- if(COND_EQ())\r
- {\r
- USE_CYCLES(3);\r
- m68ki_write_32(ea1, REG_D[(word2 >> 22) & 7]);\r
- m68ki_write_32(ea2, REG_D[(word2 >> 6) & 7]);\r
- return;\r
- }\r
- }\r
- *compare1 = dest1;\r
- *compare2 = dest2;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk_16_d(void)\r
-{\r
- sint src = MAKE_INT_16(DX);\r
- sint bound = MAKE_INT_16(DY);\r
-\r
- FLAG_Z = ZFLAG_16(src); /* Undocumented */\r
- FLAG_V = VFLAG_CLEAR; /* Undocumented */\r
- FLAG_C = CFLAG_CLEAR; /* Undocumented */\r
-\r
- if(src >= 0 && src <= bound)\r
- {\r
- return;\r
- }\r
- FLAG_N = (src < 0)<<7;\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
-}\r
-\r
-\r
-void m68k_op_chk_16_ai(void)\r
-{\r
- sint src = MAKE_INT_16(DX);\r
- sint bound = MAKE_INT_16(OPER_AY_AI_16());\r
-\r
- FLAG_Z = ZFLAG_16(src); /* Undocumented */\r
- FLAG_V = VFLAG_CLEAR; /* Undocumented */\r
- FLAG_C = CFLAG_CLEAR; /* Undocumented */\r
-\r
- if(src >= 0 && src <= bound)\r
- {\r
- return;\r
- }\r
- FLAG_N = (src < 0)<<7;\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
-}\r
-\r
-\r
-void m68k_op_chk_16_pi(void)\r
-{\r
- sint src = MAKE_INT_16(DX);\r
- sint bound = MAKE_INT_16(OPER_AY_PI_16());\r
-\r
- FLAG_Z = ZFLAG_16(src); /* Undocumented */\r
- FLAG_V = VFLAG_CLEAR; /* Undocumented */\r
- FLAG_C = CFLAG_CLEAR; /* Undocumented */\r
-\r
- if(src >= 0 && src <= bound)\r
- {\r
- return;\r
- }\r
- FLAG_N = (src < 0)<<7;\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
-}\r
-\r
-\r
-void m68k_op_chk_16_pd(void)\r
-{\r
- sint src = MAKE_INT_16(DX);\r
- sint bound = MAKE_INT_16(OPER_AY_PD_16());\r
-\r
- FLAG_Z = ZFLAG_16(src); /* Undocumented */\r
- FLAG_V = VFLAG_CLEAR; /* Undocumented */\r
- FLAG_C = CFLAG_CLEAR; /* Undocumented */\r
-\r
- if(src >= 0 && src <= bound)\r
- {\r
- return;\r
- }\r
- FLAG_N = (src < 0)<<7;\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
-}\r
-\r
-\r
-void m68k_op_chk_16_di(void)\r
-{\r
- sint src = MAKE_INT_16(DX);\r
- sint bound = MAKE_INT_16(OPER_AY_DI_16());\r
-\r
- FLAG_Z = ZFLAG_16(src); /* Undocumented */\r
- FLAG_V = VFLAG_CLEAR; /* Undocumented */\r
- FLAG_C = CFLAG_CLEAR; /* Undocumented */\r
-\r
- if(src >= 0 && src <= bound)\r
- {\r
- return;\r
- }\r
- FLAG_N = (src < 0)<<7;\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
-}\r
-\r
-\r
-void m68k_op_chk_16_ix(void)\r
-{\r
- sint src = MAKE_INT_16(DX);\r
- sint bound = MAKE_INT_16(OPER_AY_IX_16());\r
-\r
- FLAG_Z = ZFLAG_16(src); /* Undocumented */\r
- FLAG_V = VFLAG_CLEAR; /* Undocumented */\r
- FLAG_C = CFLAG_CLEAR; /* Undocumented */\r
-\r
- if(src >= 0 && src <= bound)\r
- {\r
- return;\r
- }\r
- FLAG_N = (src < 0)<<7;\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
-}\r
-\r
-\r
-void m68k_op_chk_16_aw(void)\r
-{\r
- sint src = MAKE_INT_16(DX);\r
- sint bound = MAKE_INT_16(OPER_AW_16());\r
-\r
- FLAG_Z = ZFLAG_16(src); /* Undocumented */\r
- FLAG_V = VFLAG_CLEAR; /* Undocumented */\r
- FLAG_C = CFLAG_CLEAR; /* Undocumented */\r
-\r
- if(src >= 0 && src <= bound)\r
- {\r
- return;\r
- }\r
- FLAG_N = (src < 0)<<7;\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
-}\r
-\r
-\r
-void m68k_op_chk_16_al(void)\r
-{\r
- sint src = MAKE_INT_16(DX);\r
- sint bound = MAKE_INT_16(OPER_AL_16());\r
-\r
- FLAG_Z = ZFLAG_16(src); /* Undocumented */\r
- FLAG_V = VFLAG_CLEAR; /* Undocumented */\r
- FLAG_C = CFLAG_CLEAR; /* Undocumented */\r
-\r
- if(src >= 0 && src <= bound)\r
- {\r
- return;\r
- }\r
- FLAG_N = (src < 0)<<7;\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
-}\r
-\r
-\r
-void m68k_op_chk_16_pcdi(void)\r
-{\r
- sint src = MAKE_INT_16(DX);\r
- sint bound = MAKE_INT_16(OPER_PCDI_16());\r
-\r
- FLAG_Z = ZFLAG_16(src); /* Undocumented */\r
- FLAG_V = VFLAG_CLEAR; /* Undocumented */\r
- FLAG_C = CFLAG_CLEAR; /* Undocumented */\r
-\r
- if(src >= 0 && src <= bound)\r
- {\r
- return;\r
- }\r
- FLAG_N = (src < 0)<<7;\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
-}\r
-\r
-\r
-void m68k_op_chk_16_pcix(void)\r
-{\r
- sint src = MAKE_INT_16(DX);\r
- sint bound = MAKE_INT_16(OPER_PCIX_16());\r
-\r
- FLAG_Z = ZFLAG_16(src); /* Undocumented */\r
- FLAG_V = VFLAG_CLEAR; /* Undocumented */\r
- FLAG_C = CFLAG_CLEAR; /* Undocumented */\r
-\r
- if(src >= 0 && src <= bound)\r
- {\r
- return;\r
- }\r
- FLAG_N = (src < 0)<<7;\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
-}\r
-\r
-\r
-void m68k_op_chk_16_i(void)\r
-{\r
- sint src = MAKE_INT_16(DX);\r
- sint bound = MAKE_INT_16(OPER_I_16());\r
-\r
- FLAG_Z = ZFLAG_16(src); /* Undocumented */\r
- FLAG_V = VFLAG_CLEAR; /* Undocumented */\r
- FLAG_C = CFLAG_CLEAR; /* Undocumented */\r
-\r
- if(src >= 0 && src <= bound)\r
- {\r
- return;\r
- }\r
- FLAG_N = (src < 0)<<7;\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
-}\r
-\r
-\r
-void m68k_op_chk_32_d(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- sint src = MAKE_INT_32(DX);\r
- sint bound = MAKE_INT_32(DY);\r
-\r
- FLAG_Z = ZFLAG_32(src); /* Undocumented */\r
- FLAG_V = VFLAG_CLEAR; /* Undocumented */\r
- FLAG_C = CFLAG_CLEAR; /* Undocumented */\r
-\r
- if(src >= 0 && src <= bound)\r
- {\r
- return;\r
- }\r
- FLAG_N = (src < 0)<<7;\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk_32_ai(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- sint src = MAKE_INT_32(DX);\r
- sint bound = MAKE_INT_32(OPER_AY_AI_32());\r
-\r
- FLAG_Z = ZFLAG_32(src); /* Undocumented */\r
- FLAG_V = VFLAG_CLEAR; /* Undocumented */\r
- FLAG_C = CFLAG_CLEAR; /* Undocumented */\r
-\r
- if(src >= 0 && src <= bound)\r
- {\r
- return;\r
- }\r
- FLAG_N = (src < 0)<<7;\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk_32_pi(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- sint src = MAKE_INT_32(DX);\r
- sint bound = MAKE_INT_32(OPER_AY_PI_32());\r
-\r
- FLAG_Z = ZFLAG_32(src); /* Undocumented */\r
- FLAG_V = VFLAG_CLEAR; /* Undocumented */\r
- FLAG_C = CFLAG_CLEAR; /* Undocumented */\r
-\r
- if(src >= 0 && src <= bound)\r
- {\r
- return;\r
- }\r
- FLAG_N = (src < 0)<<7;\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk_32_pd(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- sint src = MAKE_INT_32(DX);\r
- sint bound = MAKE_INT_32(OPER_AY_PD_32());\r
-\r
- FLAG_Z = ZFLAG_32(src); /* Undocumented */\r
- FLAG_V = VFLAG_CLEAR; /* Undocumented */\r
- FLAG_C = CFLAG_CLEAR; /* Undocumented */\r
-\r
- if(src >= 0 && src <= bound)\r
- {\r
- return;\r
- }\r
- FLAG_N = (src < 0)<<7;\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk_32_di(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- sint src = MAKE_INT_32(DX);\r
- sint bound = MAKE_INT_32(OPER_AY_DI_32());\r
-\r
- FLAG_Z = ZFLAG_32(src); /* Undocumented */\r
- FLAG_V = VFLAG_CLEAR; /* Undocumented */\r
- FLAG_C = CFLAG_CLEAR; /* Undocumented */\r
-\r
- if(src >= 0 && src <= bound)\r
- {\r
- return;\r
- }\r
- FLAG_N = (src < 0)<<7;\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk_32_ix(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- sint src = MAKE_INT_32(DX);\r
- sint bound = MAKE_INT_32(OPER_AY_IX_32());\r
-\r
- FLAG_Z = ZFLAG_32(src); /* Undocumented */\r
- FLAG_V = VFLAG_CLEAR; /* Undocumented */\r
- FLAG_C = CFLAG_CLEAR; /* Undocumented */\r
-\r
- if(src >= 0 && src <= bound)\r
- {\r
- return;\r
- }\r
- FLAG_N = (src < 0)<<7;\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk_32_aw(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- sint src = MAKE_INT_32(DX);\r
- sint bound = MAKE_INT_32(OPER_AW_32());\r
-\r
- FLAG_Z = ZFLAG_32(src); /* Undocumented */\r
- FLAG_V = VFLAG_CLEAR; /* Undocumented */\r
- FLAG_C = CFLAG_CLEAR; /* Undocumented */\r
-\r
- if(src >= 0 && src <= bound)\r
- {\r
- return;\r
- }\r
- FLAG_N = (src < 0)<<7;\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk_32_al(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- sint src = MAKE_INT_32(DX);\r
- sint bound = MAKE_INT_32(OPER_AL_32());\r
-\r
- FLAG_Z = ZFLAG_32(src); /* Undocumented */\r
- FLAG_V = VFLAG_CLEAR; /* Undocumented */\r
- FLAG_C = CFLAG_CLEAR; /* Undocumented */\r
-\r
- if(src >= 0 && src <= bound)\r
- {\r
- return;\r
- }\r
- FLAG_N = (src < 0)<<7;\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk_32_pcdi(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- sint src = MAKE_INT_32(DX);\r
- sint bound = MAKE_INT_32(OPER_PCDI_32());\r
-\r
- FLAG_Z = ZFLAG_32(src); /* Undocumented */\r
- FLAG_V = VFLAG_CLEAR; /* Undocumented */\r
- FLAG_C = CFLAG_CLEAR; /* Undocumented */\r
-\r
- if(src >= 0 && src <= bound)\r
- {\r
- return;\r
- }\r
- FLAG_N = (src < 0)<<7;\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk_32_pcix(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- sint src = MAKE_INT_32(DX);\r
- sint bound = MAKE_INT_32(OPER_PCIX_32());\r
-\r
- FLAG_Z = ZFLAG_32(src); /* Undocumented */\r
- FLAG_V = VFLAG_CLEAR; /* Undocumented */\r
- FLAG_C = CFLAG_CLEAR; /* Undocumented */\r
-\r
- if(src >= 0 && src <= bound)\r
- {\r
- return;\r
- }\r
- FLAG_N = (src < 0)<<7;\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk_32_i(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- sint src = MAKE_INT_32(DX);\r
- sint bound = MAKE_INT_32(OPER_I_32());\r
-\r
- FLAG_Z = ZFLAG_32(src); /* Undocumented */\r
- FLAG_V = VFLAG_CLEAR; /* Undocumented */\r
- FLAG_C = CFLAG_CLEAR; /* Undocumented */\r
-\r
- if(src >= 0 && src <= bound)\r
- {\r
- return;\r
- }\r
- FLAG_N = (src < 0)<<7;\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk2cmp2_8_pcdi(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint compare = REG_DA[(word2 >> 12) & 15]&0xff;\r
- uint ea = EA_PCDI_8();\r
- uint lower_bound = m68ki_read_pcrel_8(ea);\r
- uint upper_bound = m68ki_read_pcrel_8(ea + 1);\r
-\r
- if(!BIT_F(word2))\r
- FLAG_C = MAKE_INT_8(compare) - MAKE_INT_8(lower_bound);\r
- else\r
- FLAG_C = compare - lower_bound;\r
- FLAG_Z = !((upper_bound==compare) | (lower_bound==compare));\r
- if(COND_CS())\r
- {\r
- if(BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
-\r
- FLAG_C = upper_bound - compare;\r
- if(COND_CS() && BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk2cmp2_8_pcix(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint compare = REG_DA[(word2 >> 12) & 15]&0xff;\r
- uint ea = EA_PCIX_8();\r
- uint lower_bound = m68ki_read_pcrel_8(ea);\r
- uint upper_bound = m68ki_read_pcrel_8(ea + 1);\r
-\r
- if(!BIT_F(word2))\r
- FLAG_C = MAKE_INT_8(compare) - MAKE_INT_8(lower_bound);\r
- else\r
- FLAG_C = compare - lower_bound;\r
- FLAG_Z = !((upper_bound==compare) | (lower_bound==compare));\r
- if(COND_CS())\r
- {\r
- if(BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
-\r
- FLAG_C = upper_bound - compare;\r
- if(COND_CS() && BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk2cmp2_8_ai(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint compare = REG_DA[(word2 >> 12) & 15]&0xff;\r
- uint ea = EA_AY_AI_8();\r
- uint lower_bound = m68ki_read_8(ea);\r
- uint upper_bound = m68ki_read_8(ea + 1);\r
-\r
- if(!BIT_F(word2))\r
- FLAG_C = MAKE_INT_8(compare) - MAKE_INT_8(lower_bound);\r
- else\r
- FLAG_C = compare - lower_bound;\r
- FLAG_Z = !((upper_bound==compare) | (lower_bound==compare));\r
- if(COND_CS())\r
- {\r
- if(BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
-\r
- FLAG_C = upper_bound - compare;\r
- if(COND_CS() && BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk2cmp2_8_di(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint compare = REG_DA[(word2 >> 12) & 15]&0xff;\r
- uint ea = EA_AY_DI_8();\r
- uint lower_bound = m68ki_read_8(ea);\r
- uint upper_bound = m68ki_read_8(ea + 1);\r
-\r
- if(!BIT_F(word2))\r
- FLAG_C = MAKE_INT_8(compare) - MAKE_INT_8(lower_bound);\r
- else\r
- FLAG_C = compare - lower_bound;\r
- FLAG_Z = !((upper_bound==compare) | (lower_bound==compare));\r
- if(COND_CS())\r
- {\r
- if(BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
-\r
- FLAG_C = upper_bound - compare;\r
- if(COND_CS() && BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk2cmp2_8_ix(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint compare = REG_DA[(word2 >> 12) & 15]&0xff;\r
- uint ea = EA_AY_IX_8();\r
- uint lower_bound = m68ki_read_8(ea);\r
- uint upper_bound = m68ki_read_8(ea + 1);\r
-\r
- if(!BIT_F(word2))\r
- FLAG_C = MAKE_INT_8(compare) - MAKE_INT_8(lower_bound);\r
- else\r
- FLAG_C = compare - lower_bound;\r
- FLAG_Z = !((upper_bound==compare) | (lower_bound==compare));\r
- if(COND_CS())\r
- {\r
- if(BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
-\r
- FLAG_C = upper_bound - compare;\r
- if(COND_CS() && BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk2cmp2_8_aw(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint compare = REG_DA[(word2 >> 12) & 15]&0xff;\r
- uint ea = EA_AW_8();\r
- uint lower_bound = m68ki_read_8(ea);\r
- uint upper_bound = m68ki_read_8(ea + 1);\r
-\r
- if(!BIT_F(word2))\r
- FLAG_C = MAKE_INT_8(compare) - MAKE_INT_8(lower_bound);\r
- else\r
- FLAG_C = compare - lower_bound;\r
- FLAG_Z = !((upper_bound==compare) | (lower_bound==compare));\r
- if(COND_CS())\r
- {\r
- if(BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
-\r
- FLAG_C = upper_bound - compare;\r
- if(COND_CS() && BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk2cmp2_8_al(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint compare = REG_DA[(word2 >> 12) & 15]&0xff;\r
- uint ea = EA_AL_8();\r
- uint lower_bound = m68ki_read_8(ea);\r
- uint upper_bound = m68ki_read_8(ea + 1);\r
-\r
- if(!BIT_F(word2))\r
- FLAG_C = MAKE_INT_8(compare) - MAKE_INT_8(lower_bound);\r
- else\r
- FLAG_C = compare - lower_bound;\r
- FLAG_Z = !((upper_bound==compare) | (lower_bound==compare));\r
- if(COND_CS())\r
- {\r
- if(BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
-\r
- FLAG_C = upper_bound - compare;\r
- if(COND_CS() && BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk2cmp2_16_pcdi(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint compare = REG_DA[(word2 >> 12) & 15]&0xffff;\r
- uint ea = EA_PCDI_16();\r
- uint lower_bound = m68ki_read_pcrel_16(ea);\r
- uint upper_bound = m68ki_read_pcrel_16(ea + 2);\r
-\r
- if(!BIT_F(word2))\r
- FLAG_C = MAKE_INT_16(compare) - MAKE_INT_16(lower_bound);\r
- else\r
- FLAG_C = compare - lower_bound;\r
- FLAG_Z = !((upper_bound==compare) | (lower_bound==compare));\r
- FLAG_C = CFLAG_16(FLAG_C);\r
- if(COND_CS())\r
- {\r
- if(BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
-\r
- if(!BIT_F(word2))\r
- FLAG_C = MAKE_INT_16(upper_bound) - MAKE_INT_16(compare);\r
- else\r
- FLAG_C = upper_bound - compare;\r
- FLAG_C = CFLAG_16(FLAG_C);\r
- if(COND_CS() && BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk2cmp2_16_pcix(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint compare = REG_DA[(word2 >> 12) & 15]&0xffff;\r
- uint ea = EA_PCIX_16();\r
- uint lower_bound = m68ki_read_pcrel_16(ea);\r
- uint upper_bound = m68ki_read_pcrel_16(ea + 2);\r
-\r
- if(!BIT_F(word2))\r
- FLAG_C = MAKE_INT_16(compare) - MAKE_INT_16(lower_bound);\r
- else\r
- FLAG_C = compare - lower_bound;\r
- FLAG_Z = !((upper_bound==compare) | (lower_bound==compare));\r
- FLAG_C = CFLAG_16(FLAG_C);\r
- if(COND_CS())\r
- {\r
- if(BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
-\r
- if(!BIT_F(word2))\r
- FLAG_C = MAKE_INT_16(upper_bound) - MAKE_INT_16(compare);\r
- else\r
- FLAG_C = upper_bound - compare;\r
- FLAG_C = CFLAG_16(FLAG_C);\r
- if(COND_CS() && BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk2cmp2_16_ai(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint compare = REG_DA[(word2 >> 12) & 15]&0xffff;\r
- uint ea = EA_AY_AI_16();\r
- uint lower_bound = m68ki_read_16(ea);\r
- uint upper_bound = m68ki_read_16(ea + 2);\r
-\r
- if(!BIT_F(word2))\r
- FLAG_C = MAKE_INT_16(compare) - MAKE_INT_16(lower_bound);\r
- else\r
- FLAG_C = compare - lower_bound;\r
-\r
- FLAG_Z = !((upper_bound==compare) | (lower_bound==compare));\r
- FLAG_C = CFLAG_16(FLAG_C);\r
- if(COND_CS())\r
- {\r
- if(BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- if(!BIT_F(word2))\r
- FLAG_C = MAKE_INT_16(upper_bound) - MAKE_INT_16(compare);\r
- else\r
- FLAG_C = upper_bound - compare;\r
-\r
- FLAG_C = CFLAG_16(FLAG_C);\r
- if(COND_CS() && BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk2cmp2_16_di(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint compare = REG_DA[(word2 >> 12) & 15]&0xffff;\r
- uint ea = EA_AY_DI_16();\r
- uint lower_bound = m68ki_read_16(ea);\r
- uint upper_bound = m68ki_read_16(ea + 2);\r
-\r
- if(!BIT_F(word2))\r
- FLAG_C = MAKE_INT_16(compare) - MAKE_INT_16(lower_bound);\r
- else\r
- FLAG_C = compare - lower_bound;\r
-\r
- FLAG_Z = !((upper_bound==compare) | (lower_bound==compare));\r
- FLAG_C = CFLAG_16(FLAG_C);\r
- if(COND_CS())\r
- {\r
- if(BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- if(!BIT_F(word2))\r
- FLAG_C = MAKE_INT_16(upper_bound) - MAKE_INT_16(compare);\r
- else\r
- FLAG_C = upper_bound - compare;\r
-\r
- FLAG_C = CFLAG_16(FLAG_C);\r
- if(COND_CS() && BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk2cmp2_16_ix(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint compare = REG_DA[(word2 >> 12) & 15]&0xffff;\r
- uint ea = EA_AY_IX_16();\r
- uint lower_bound = m68ki_read_16(ea);\r
- uint upper_bound = m68ki_read_16(ea + 2);\r
-\r
- if(!BIT_F(word2))\r
- FLAG_C = MAKE_INT_16(compare) - MAKE_INT_16(lower_bound);\r
- else\r
- FLAG_C = compare - lower_bound;\r
-\r
- FLAG_Z = !((upper_bound==compare) | (lower_bound==compare));\r
- FLAG_C = CFLAG_16(FLAG_C);\r
- if(COND_CS())\r
- {\r
- if(BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- if(!BIT_F(word2))\r
- FLAG_C = MAKE_INT_16(upper_bound) - MAKE_INT_16(compare);\r
- else\r
- FLAG_C = upper_bound - compare;\r
-\r
- FLAG_C = CFLAG_16(FLAG_C);\r
- if(COND_CS() && BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk2cmp2_16_aw(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint compare = REG_DA[(word2 >> 12) & 15]&0xffff;\r
- uint ea = EA_AW_16();\r
- uint lower_bound = m68ki_read_16(ea);\r
- uint upper_bound = m68ki_read_16(ea + 2);\r
-\r
- if(!BIT_F(word2))\r
- FLAG_C = MAKE_INT_16(compare) - MAKE_INT_16(lower_bound);\r
- else\r
- FLAG_C = compare - lower_bound;\r
-\r
- FLAG_Z = !((upper_bound==compare) | (lower_bound==compare));\r
- FLAG_C = CFLAG_16(FLAG_C);\r
- if(COND_CS())\r
- {\r
- if(BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- if(!BIT_F(word2))\r
- FLAG_C = MAKE_INT_16(upper_bound) - MAKE_INT_16(compare);\r
- else\r
- FLAG_C = upper_bound - compare;\r
-\r
- FLAG_C = CFLAG_16(FLAG_C);\r
- if(COND_CS() && BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk2cmp2_16_al(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint compare = REG_DA[(word2 >> 12) & 15]&0xffff;\r
- uint ea = EA_AL_16();\r
- uint lower_bound = m68ki_read_16(ea);\r
- uint upper_bound = m68ki_read_16(ea + 2);\r
-\r
- if(!BIT_F(word2))\r
- FLAG_C = MAKE_INT_16(compare) - MAKE_INT_16(lower_bound);\r
- else\r
- FLAG_C = compare - lower_bound;\r
-\r
- FLAG_Z = !((upper_bound==compare) | (lower_bound==compare));\r
- FLAG_C = CFLAG_16(FLAG_C);\r
- if(COND_CS())\r
- {\r
- if(BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- if(!BIT_F(word2))\r
- FLAG_C = MAKE_INT_16(upper_bound) - MAKE_INT_16(compare);\r
- else\r
- FLAG_C = upper_bound - compare;\r
-\r
- FLAG_C = CFLAG_16(FLAG_C);\r
- if(COND_CS() && BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk2cmp2_32_pcdi(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint compare = REG_DA[(word2 >> 12) & 15];\r
- uint ea = EA_PCDI_32();\r
- uint lower_bound = m68ki_read_pcrel_32(ea);\r
- uint upper_bound = m68ki_read_pcrel_32(ea + 4);\r
-\r
- FLAG_C = compare - lower_bound;\r
- FLAG_Z = !((upper_bound==compare) | (lower_bound==compare));\r
- FLAG_C = CFLAG_SUB_32(lower_bound, compare, FLAG_C);\r
- if(COND_CS())\r
- {\r
- if(BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
-\r
- FLAG_C = upper_bound - compare;\r
- FLAG_C = CFLAG_SUB_32(compare, upper_bound, FLAG_C);\r
- if(COND_CS() && BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk2cmp2_32_pcix(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint compare = REG_DA[(word2 >> 12) & 15];\r
- uint ea = EA_PCIX_32();\r
- uint lower_bound = m68ki_read_pcrel_32(ea);\r
- uint upper_bound = m68ki_read_pcrel_32(ea + 4);\r
-\r
- FLAG_C = compare - lower_bound;\r
- FLAG_Z = !((upper_bound==compare) | (lower_bound==compare));\r
- FLAG_C = CFLAG_SUB_32(lower_bound, compare, FLAG_C);\r
- if(COND_CS())\r
- {\r
- if(BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
-\r
- FLAG_C = upper_bound - compare;\r
- FLAG_C = CFLAG_SUB_32(compare, upper_bound, FLAG_C);\r
- if(COND_CS() && BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk2cmp2_32_ai(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint compare = REG_DA[(word2 >> 12) & 15];\r
- uint ea = EA_AY_AI_32();\r
- uint lower_bound = m68ki_read_32(ea);\r
- uint upper_bound = m68ki_read_32(ea + 4);\r
-\r
- FLAG_C = compare - lower_bound;\r
- FLAG_Z = !((upper_bound==compare) | (lower_bound==compare));\r
- FLAG_C = CFLAG_SUB_32(lower_bound, compare, FLAG_C);\r
- if(COND_CS())\r
- {\r
- if(BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
-\r
- FLAG_C = upper_bound - compare;\r
- FLAG_C = CFLAG_SUB_32(compare, upper_bound, FLAG_C);\r
- if(COND_CS() && BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk2cmp2_32_di(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint compare = REG_DA[(word2 >> 12) & 15];\r
- uint ea = EA_AY_DI_32();\r
- uint lower_bound = m68ki_read_32(ea);\r
- uint upper_bound = m68ki_read_32(ea + 4);\r
-\r
- FLAG_C = compare - lower_bound;\r
- FLAG_Z = !((upper_bound==compare) | (lower_bound==compare));\r
- FLAG_C = CFLAG_SUB_32(lower_bound, compare, FLAG_C);\r
- if(COND_CS())\r
- {\r
- if(BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
-\r
- FLAG_C = upper_bound - compare;\r
- FLAG_C = CFLAG_SUB_32(compare, upper_bound, FLAG_C);\r
- if(COND_CS() && BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk2cmp2_32_ix(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint compare = REG_DA[(word2 >> 12) & 15];\r
- uint ea = EA_AY_IX_32();\r
- uint lower_bound = m68ki_read_32(ea);\r
- uint upper_bound = m68ki_read_32(ea + 4);\r
-\r
- FLAG_C = compare - lower_bound;\r
- FLAG_Z = !((upper_bound==compare) | (lower_bound==compare));\r
- FLAG_C = CFLAG_SUB_32(lower_bound, compare, FLAG_C);\r
- if(COND_CS())\r
- {\r
- if(BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
-\r
- FLAG_C = upper_bound - compare;\r
- FLAG_C = CFLAG_SUB_32(compare, upper_bound, FLAG_C);\r
- if(COND_CS() && BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk2cmp2_32_aw(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint compare = REG_DA[(word2 >> 12) & 15];\r
- uint ea = EA_AW_32();\r
- uint lower_bound = m68ki_read_32(ea);\r
- uint upper_bound = m68ki_read_32(ea + 4);\r
-\r
- FLAG_C = compare - lower_bound;\r
- FLAG_Z = !((upper_bound==compare) | (lower_bound==compare));\r
- FLAG_C = CFLAG_SUB_32(lower_bound, compare, FLAG_C);\r
- if(COND_CS())\r
- {\r
- if(BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
-\r
- FLAG_C = upper_bound - compare;\r
- FLAG_C = CFLAG_SUB_32(compare, upper_bound, FLAG_C);\r
- if(COND_CS() && BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_chk2cmp2_32_al(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint compare = REG_DA[(word2 >> 12) & 15];\r
- uint ea = EA_AL_32();\r
- uint lower_bound = m68ki_read_32(ea);\r
- uint upper_bound = m68ki_read_32(ea + 4);\r
-\r
- FLAG_C = compare - lower_bound;\r
- FLAG_Z = !((upper_bound==compare) | (lower_bound==compare));\r
- FLAG_C = CFLAG_SUB_32(lower_bound, compare, FLAG_C);\r
- if(COND_CS())\r
- {\r
- if(BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
-\r
- FLAG_C = upper_bound - compare;\r
- FLAG_C = CFLAG_SUB_32(compare, upper_bound, FLAG_C);\r
- if(COND_CS() && BIT_B(word2))\r
- m68ki_exception_trap(EXCEPTION_CHK);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_clr_8_d(void)\r
-{\r
- DY &= 0xffffff00;\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
-}\r
-\r
-\r
-void m68k_op_clr_8_ai(void)\r
-{\r
- m68ki_write_8(EA_AY_AI_8(), 0);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
-}\r
-\r
-\r
-void m68k_op_clr_8_pi(void)\r
-{\r
- m68ki_write_8(EA_AY_PI_8(), 0);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
-}\r
-\r
-\r
-void m68k_op_clr_8_pi7(void)\r
-{\r
- m68ki_write_8(EA_A7_PI_8(), 0);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
-}\r
-\r
-\r
-void m68k_op_clr_8_pd(void)\r
-{\r
- m68ki_write_8(EA_AY_PD_8(), 0);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
-}\r
-\r
-\r
-void m68k_op_clr_8_pd7(void)\r
-{\r
- m68ki_write_8(EA_A7_PD_8(), 0);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
-}\r
-\r
-\r
-void m68k_op_clr_8_di(void)\r
-{\r
- m68ki_write_8(EA_AY_DI_8(), 0);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
-}\r
-\r
-\r
-void m68k_op_clr_8_ix(void)\r
-{\r
- m68ki_write_8(EA_AY_IX_8(), 0);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
-}\r
-\r
-\r
-void m68k_op_clr_8_aw(void)\r
-{\r
- m68ki_write_8(EA_AW_8(), 0);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
-}\r
-\r
-\r
-void m68k_op_clr_8_al(void)\r
-{\r
- m68ki_write_8(EA_AL_8(), 0);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
-}\r
-\r
-\r
-void m68k_op_clr_16_d(void)\r
-{\r
- DY &= 0xffff0000;\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
-}\r
-\r
-\r
-void m68k_op_clr_16_ai(void)\r
-{\r
- m68ki_write_16(EA_AY_AI_16(), 0);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
-}\r
-\r
-\r
-void m68k_op_clr_16_pi(void)\r
-{\r
- m68ki_write_16(EA_AY_PI_16(), 0);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
-}\r
-\r
-\r
-void m68k_op_clr_16_pd(void)\r
-{\r
- m68ki_write_16(EA_AY_PD_16(), 0);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
-}\r
-\r
-\r
-void m68k_op_clr_16_di(void)\r
-{\r
- m68ki_write_16(EA_AY_DI_16(), 0);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
-}\r
-\r
-\r
-void m68k_op_clr_16_ix(void)\r
-{\r
- m68ki_write_16(EA_AY_IX_16(), 0);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
-}\r
-\r
-\r
-void m68k_op_clr_16_aw(void)\r
-{\r
- m68ki_write_16(EA_AW_16(), 0);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
-}\r
-\r
-\r
-void m68k_op_clr_16_al(void)\r
-{\r
- m68ki_write_16(EA_AL_16(), 0);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
-}\r
-\r
-\r
-void m68k_op_clr_32_d(void)\r
-{\r
- DY = 0;\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
-}\r
-\r
-\r
-void m68k_op_clr_32_ai(void)\r
-{\r
- m68ki_write_32(EA_AY_AI_32(), 0);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
-}\r
-\r
-\r
-void m68k_op_clr_32_pi(void)\r
-{\r
- m68ki_write_32(EA_AY_PI_32(), 0);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
-}\r
-\r
-\r
-void m68k_op_clr_32_pd(void)\r
-{\r
- m68ki_write_32(EA_AY_PD_32(), 0);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
-}\r
-\r
-\r
-void m68k_op_clr_32_di(void)\r
-{\r
- m68ki_write_32(EA_AY_DI_32(), 0);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
-}\r
-\r
-\r
-void m68k_op_clr_32_ix(void)\r
-{\r
- m68ki_write_32(EA_AY_IX_32(), 0);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
-}\r
-\r
-\r
-void m68k_op_clr_32_aw(void)\r
-{\r
- m68ki_write_32(EA_AW_32(), 0);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
-}\r
-\r
-\r
-void m68k_op_clr_32_al(void)\r
-{\r
- m68ki_write_32(EA_AL_32(), 0);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
-}\r
-\r
-\r
-void m68k_op_cmp_8_d(void)\r
-{\r
- uint src = MASK_OUT_ABOVE_8(DY);\r
- uint dst = MASK_OUT_ABOVE_8(DX);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_C = CFLAG_8(res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_8_ai(void)\r
-{\r
- uint src = OPER_AY_AI_8();\r
- uint dst = MASK_OUT_ABOVE_8(DX);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_C = CFLAG_8(res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_8_pi(void)\r
-{\r
- uint src = OPER_AY_PI_8();\r
- uint dst = MASK_OUT_ABOVE_8(DX);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_C = CFLAG_8(res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_8_pi7(void)\r
-{\r
- uint src = OPER_A7_PI_8();\r
- uint dst = MASK_OUT_ABOVE_8(DX);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_C = CFLAG_8(res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_8_pd(void)\r
-{\r
- uint src = OPER_AY_PD_8();\r
- uint dst = MASK_OUT_ABOVE_8(DX);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_C = CFLAG_8(res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_8_pd7(void)\r
-{\r
- uint src = OPER_A7_PD_8();\r
- uint dst = MASK_OUT_ABOVE_8(DX);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_C = CFLAG_8(res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_8_di(void)\r
-{\r
- uint src = OPER_AY_DI_8();\r
- uint dst = MASK_OUT_ABOVE_8(DX);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_C = CFLAG_8(res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_8_ix(void)\r
-{\r
- uint src = OPER_AY_IX_8();\r
- uint dst = MASK_OUT_ABOVE_8(DX);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_C = CFLAG_8(res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_8_aw(void)\r
-{\r
- uint src = OPER_AW_8();\r
- uint dst = MASK_OUT_ABOVE_8(DX);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_C = CFLAG_8(res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_8_al(void)\r
-{\r
- uint src = OPER_AL_8();\r
- uint dst = MASK_OUT_ABOVE_8(DX);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_C = CFLAG_8(res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_8_pcdi(void)\r
-{\r
- uint src = OPER_PCDI_8();\r
- uint dst = MASK_OUT_ABOVE_8(DX);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_C = CFLAG_8(res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_8_pcix(void)\r
-{\r
- uint src = OPER_PCIX_8();\r
- uint dst = MASK_OUT_ABOVE_8(DX);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_C = CFLAG_8(res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_8_i(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint dst = MASK_OUT_ABOVE_8(DX);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_C = CFLAG_8(res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_16_d(void)\r
-{\r
- uint src = MASK_OUT_ABOVE_16(DY);\r
- uint dst = MASK_OUT_ABOVE_16(DX);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_C = CFLAG_16(res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_16_a(void)\r
-{\r
- uint src = MASK_OUT_ABOVE_16(AY);\r
- uint dst = MASK_OUT_ABOVE_16(DX);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_C = CFLAG_16(res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_16_ai(void)\r
-{\r
- uint src = OPER_AY_AI_16();\r
- uint dst = MASK_OUT_ABOVE_16(DX);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_C = CFLAG_16(res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_16_pi(void)\r
-{\r
- uint src = OPER_AY_PI_16();\r
- uint dst = MASK_OUT_ABOVE_16(DX);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_C = CFLAG_16(res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_16_pd(void)\r
-{\r
- uint src = OPER_AY_PD_16();\r
- uint dst = MASK_OUT_ABOVE_16(DX);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_C = CFLAG_16(res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_16_di(void)\r
-{\r
- uint src = OPER_AY_DI_16();\r
- uint dst = MASK_OUT_ABOVE_16(DX);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_C = CFLAG_16(res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_16_ix(void)\r
-{\r
- uint src = OPER_AY_IX_16();\r
- uint dst = MASK_OUT_ABOVE_16(DX);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_C = CFLAG_16(res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_16_aw(void)\r
-{\r
- uint src = OPER_AW_16();\r
- uint dst = MASK_OUT_ABOVE_16(DX);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_C = CFLAG_16(res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_16_al(void)\r
-{\r
- uint src = OPER_AL_16();\r
- uint dst = MASK_OUT_ABOVE_16(DX);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_C = CFLAG_16(res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_16_pcdi(void)\r
-{\r
- uint src = OPER_PCDI_16();\r
- uint dst = MASK_OUT_ABOVE_16(DX);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_C = CFLAG_16(res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_16_pcix(void)\r
-{\r
- uint src = OPER_PCIX_16();\r
- uint dst = MASK_OUT_ABOVE_16(DX);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_C = CFLAG_16(res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_16_i(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint dst = MASK_OUT_ABOVE_16(DX);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_C = CFLAG_16(res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_32_d(void)\r
-{\r
- uint src = DY;\r
- uint dst = DX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_32_a(void)\r
-{\r
- uint src = AY;\r
- uint dst = DX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_32_ai(void)\r
-{\r
- uint src = OPER_AY_AI_32();\r
- uint dst = DX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_32_pi(void)\r
-{\r
- uint src = OPER_AY_PI_32();\r
- uint dst = DX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_32_pd(void)\r
-{\r
- uint src = OPER_AY_PD_32();\r
- uint dst = DX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_32_di(void)\r
-{\r
- uint src = OPER_AY_DI_32();\r
- uint dst = DX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_32_ix(void)\r
-{\r
- uint src = OPER_AY_IX_32();\r
- uint dst = DX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_32_aw(void)\r
-{\r
- uint src = OPER_AW_32();\r
- uint dst = DX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_32_al(void)\r
-{\r
- uint src = OPER_AL_32();\r
- uint dst = DX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_32_pcdi(void)\r
-{\r
- uint src = OPER_PCDI_32();\r
- uint dst = DX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_32_pcix(void)\r
-{\r
- uint src = OPER_PCIX_32();\r
- uint dst = DX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmp_32_i(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint dst = DX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpa_16_d(void)\r
-{\r
- uint src = MAKE_INT_16(DY);\r
- uint dst = AX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpa_16_a(void)\r
-{\r
- uint src = MAKE_INT_16(AY);\r
- uint dst = AX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpa_16_ai(void)\r
-{\r
- uint src = MAKE_INT_16(OPER_AY_AI_16());\r
- uint dst = AX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpa_16_pi(void)\r
-{\r
- uint src = MAKE_INT_16(OPER_AY_PI_16());\r
- uint dst = AX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpa_16_pd(void)\r
-{\r
- uint src = MAKE_INT_16(OPER_AY_PD_16());\r
- uint dst = AX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpa_16_di(void)\r
-{\r
- uint src = MAKE_INT_16(OPER_AY_DI_16());\r
- uint dst = AX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpa_16_ix(void)\r
-{\r
- uint src = MAKE_INT_16(OPER_AY_IX_16());\r
- uint dst = AX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpa_16_aw(void)\r
-{\r
- uint src = MAKE_INT_16(OPER_AW_16());\r
- uint dst = AX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpa_16_al(void)\r
-{\r
- uint src = MAKE_INT_16(OPER_AL_16());\r
- uint dst = AX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpa_16_pcdi(void)\r
-{\r
- uint src = MAKE_INT_16(OPER_PCDI_16());\r
- uint dst = AX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpa_16_pcix(void)\r
-{\r
- uint src = MAKE_INT_16(OPER_PCIX_16());\r
- uint dst = AX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpa_16_i(void)\r
-{\r
- uint src = MAKE_INT_16(OPER_I_16());\r
- uint dst = AX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpa_32_d(void)\r
-{\r
- uint src = DY;\r
- uint dst = AX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpa_32_a(void)\r
-{\r
- uint src = AY;\r
- uint dst = AX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpa_32_ai(void)\r
-{\r
- uint src = OPER_AY_AI_32();\r
- uint dst = AX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpa_32_pi(void)\r
-{\r
- uint src = OPER_AY_PI_32();\r
- uint dst = AX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpa_32_pd(void)\r
-{\r
- uint src = OPER_AY_PD_32();\r
- uint dst = AX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpa_32_di(void)\r
-{\r
- uint src = OPER_AY_DI_32();\r
- uint dst = AX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpa_32_ix(void)\r
-{\r
- uint src = OPER_AY_IX_32();\r
- uint dst = AX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpa_32_aw(void)\r
-{\r
- uint src = OPER_AW_32();\r
- uint dst = AX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpa_32_al(void)\r
-{\r
- uint src = OPER_AL_32();\r
- uint dst = AX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpa_32_pcdi(void)\r
-{\r
- uint src = OPER_PCDI_32();\r
- uint dst = AX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpa_32_pcix(void)\r
-{\r
- uint src = OPER_PCIX_32();\r
- uint dst = AX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpa_32_i(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint dst = AX;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpi_8_d(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint dst = MASK_OUT_ABOVE_8(DY);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_C = CFLAG_8(res);\r
-}\r
-\r
-\r
-void m68k_op_cmpi_8_ai(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint dst = OPER_AY_AI_8();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_C = CFLAG_8(res);\r
-}\r
-\r
-\r
-void m68k_op_cmpi_8_pi(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint dst = OPER_AY_PI_8();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_C = CFLAG_8(res);\r
-}\r
-\r
-\r
-void m68k_op_cmpi_8_pi7(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint dst = OPER_A7_PI_8();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_C = CFLAG_8(res);\r
-}\r
-\r
-\r
-void m68k_op_cmpi_8_pd(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint dst = OPER_AY_PD_8();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_C = CFLAG_8(res);\r
-}\r
-\r
-\r
-void m68k_op_cmpi_8_pd7(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint dst = OPER_A7_PD_8();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_C = CFLAG_8(res);\r
-}\r
-\r
-\r
-void m68k_op_cmpi_8_di(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint dst = OPER_AY_DI_8();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_C = CFLAG_8(res);\r
-}\r
-\r
-\r
-void m68k_op_cmpi_8_ix(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint dst = OPER_AY_IX_8();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_C = CFLAG_8(res);\r
-}\r
-\r
-\r
-void m68k_op_cmpi_8_aw(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint dst = OPER_AW_8();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_C = CFLAG_8(res);\r
-}\r
-\r
-\r
-void m68k_op_cmpi_8_al(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint dst = OPER_AL_8();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_C = CFLAG_8(res);\r
-}\r
-\r
-\r
-void m68k_op_cmpi_8_pcdi(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint src = OPER_I_8();\r
- uint dst = OPER_PCDI_8();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_C = CFLAG_8(res);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cmpi_8_pcix(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint src = OPER_I_8();\r
- uint dst = OPER_PCIX_8();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_C = CFLAG_8(res);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cmpi_16_d(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint dst = MASK_OUT_ABOVE_16(DY);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_C = CFLAG_16(res);\r
-}\r
-\r
-\r
-void m68k_op_cmpi_16_ai(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint dst = OPER_AY_AI_16();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_C = CFLAG_16(res);\r
-}\r
-\r
-\r
-void m68k_op_cmpi_16_pi(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint dst = OPER_AY_PI_16();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_C = CFLAG_16(res);\r
-}\r
-\r
-\r
-void m68k_op_cmpi_16_pd(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint dst = OPER_AY_PD_16();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_C = CFLAG_16(res);\r
-}\r
-\r
-\r
-void m68k_op_cmpi_16_di(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint dst = OPER_AY_DI_16();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_C = CFLAG_16(res);\r
-}\r
-\r
-\r
-void m68k_op_cmpi_16_ix(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint dst = OPER_AY_IX_16();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_C = CFLAG_16(res);\r
-}\r
-\r
-\r
-void m68k_op_cmpi_16_aw(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint dst = OPER_AW_16();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_C = CFLAG_16(res);\r
-}\r
-\r
-\r
-void m68k_op_cmpi_16_al(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint dst = OPER_AL_16();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_C = CFLAG_16(res);\r
-}\r
-\r
-\r
-void m68k_op_cmpi_16_pcdi(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint src = OPER_I_16();\r
- uint dst = OPER_PCDI_16();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_C = CFLAG_16(res);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cmpi_16_pcix(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint src = OPER_I_16();\r
- uint dst = OPER_PCIX_16();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_C = CFLAG_16(res);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cmpi_32_d(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint dst = DY;\r
- uint res = dst - src;\r
-\r
- m68ki_cmpild_callback(src, REG_IR & 7); /* auto-disable (see m68kcpu.h) */\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpi_32_ai(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint dst = OPER_AY_AI_32();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpi_32_pi(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint dst = OPER_AY_PI_32();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpi_32_pd(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint dst = OPER_AY_PD_32();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpi_32_di(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint dst = OPER_AY_DI_32();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpi_32_ix(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint dst = OPER_AY_IX_32();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpi_32_aw(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint dst = OPER_AW_32();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpi_32_al(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint dst = OPER_AL_32();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cmpi_32_pcdi(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint src = OPER_I_32();\r
- uint dst = OPER_PCDI_32();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cmpi_32_pcix(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint src = OPER_I_32();\r
- uint dst = OPER_PCIX_32();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_cmpm_8_ax7(void)\r
-{\r
- uint src = OPER_AY_PI_8();\r
- uint dst = OPER_A7_PI_8();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_C = CFLAG_8(res);\r
-}\r
-\r
-\r
-void m68k_op_cmpm_8_ay7(void)\r
-{\r
- uint src = OPER_A7_PI_8();\r
- uint dst = OPER_AX_PI_8();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_C = CFLAG_8(res);\r
-}\r
-\r
-\r
-void m68k_op_cmpm_8_axy7(void)\r
-{\r
- uint src = OPER_A7_PI_8();\r
- uint dst = OPER_A7_PI_8();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_C = CFLAG_8(res);\r
-}\r
-\r
-\r
-void m68k_op_cmpm_8(void)\r
-{\r
- uint src = OPER_AY_PI_8();\r
- uint dst = OPER_AX_PI_8();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_C = CFLAG_8(res);\r
-}\r
-\r
-\r
-void m68k_op_cmpm_16(void)\r
-{\r
- uint src = OPER_AY_PI_16();\r
- uint dst = OPER_AX_PI_16();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_C = CFLAG_16(res);\r
-}\r
-\r
-\r
-void m68k_op_cmpm_32(void)\r
-{\r
- uint src = OPER_AY_PI_32();\r
- uint dst = OPER_AX_PI_32();\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_C = CFLAG_SUB_32(src, dst, res);\r
-}\r
-\r
-\r
-void m68k_op_cpbcc_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- M68K_DO_LOG((M68K_LOG_FILEHANDLE "%s at %08x: called unimplemented instruction %04x (%s)\n",\r
- m68ki_cpu_names[CPU_TYPE], ADDRESS_68K(REG_PC - 2), REG_IR,\r
- m68k_disassemble_quick(ADDRESS_68K(REG_PC - 2))));\r
- return;\r
- }\r
- m68ki_exception_1111();\r
-}\r
-\r
-\r
-void m68k_op_cpdbcc_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- M68K_DO_LOG((M68K_LOG_FILEHANDLE "%s at %08x: called unimplemented instruction %04x (%s)\n",\r
- m68ki_cpu_names[CPU_TYPE], ADDRESS_68K(REG_PC - 2), REG_IR,\r
- m68k_disassemble_quick(ADDRESS_68K(REG_PC - 2))));\r
- return;\r
- }\r
- m68ki_exception_1111();\r
-}\r
-\r
-\r
-void m68k_op_cpgen_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- M68K_DO_LOG((M68K_LOG_FILEHANDLE "%s at %08x: called unimplemented instruction %04x (%s)\n",\r
- m68ki_cpu_names[CPU_TYPE], ADDRESS_68K(REG_PC - 2), REG_IR,\r
- m68k_disassemble_quick(ADDRESS_68K(REG_PC - 2))));\r
- return;\r
- }\r
- m68ki_exception_1111();\r
-}\r
-\r
-\r
-void m68k_op_cpscc_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- M68K_DO_LOG((M68K_LOG_FILEHANDLE "%s at %08x: called unimplemented instruction %04x (%s)\n",\r
- m68ki_cpu_names[CPU_TYPE], ADDRESS_68K(REG_PC - 2), REG_IR,\r
- m68k_disassemble_quick(ADDRESS_68K(REG_PC - 2))));\r
- return;\r
- }\r
- m68ki_exception_1111();\r
-}\r
-\r
-\r
-void m68k_op_cptrapcc_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- M68K_DO_LOG((M68K_LOG_FILEHANDLE "%s at %08x: called unimplemented instruction %04x (%s)\n",\r
- m68ki_cpu_names[CPU_TYPE], ADDRESS_68K(REG_PC - 2), REG_IR,\r
- m68k_disassemble_quick(ADDRESS_68K(REG_PC - 2))));\r
- return;\r
- }\r
- m68ki_exception_1111();\r
-}\r
-\r
-\r
-/* ======================================================================== */\r
-/* ============================== END OF FILE ============================= */\r
-/* ======================================================================== */\r
-\r
-\r
+++ /dev/null
-#include "m68kcpu.h"\r
-\r
-/* ======================================================================== */\r
-/* ========================= INSTRUCTION HANDLERS ========================= */\r
-/* ======================================================================== */\r
-\r
-\r
-void m68k_op_dbt_16(void)\r
-{\r
- REG_PC += 2;\r
-}\r
-\r
-\r
-void m68k_op_dbf_16(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint res = MASK_OUT_ABOVE_16(*r_dst - 1);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
- if(res != 0xffff)\r
- {\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
- USE_CYCLES(CYC_DBCC_F_NOEXP);\r
- return;\r
- }\r
- REG_PC += 2;\r
- USE_CYCLES(CYC_DBCC_F_EXP);\r
-}\r
-\r
-\r
-void m68k_op_dbhi_16(void)\r
-{\r
- if(COND_NOT_HI())\r
- {\r
- uint* r_dst = &DY;\r
- uint res = MASK_OUT_ABOVE_16(*r_dst - 1);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
- if(res != 0xffff)\r
- {\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
- USE_CYCLES(CYC_DBCC_F_NOEXP);\r
- return;\r
- }\r
- REG_PC += 2;\r
- USE_CYCLES(CYC_DBCC_F_EXP);\r
- return;\r
- }\r
- REG_PC += 2;\r
-}\r
-\r
-\r
-void m68k_op_dbls_16(void)\r
-{\r
- if(COND_NOT_LS())\r
- {\r
- uint* r_dst = &DY;\r
- uint res = MASK_OUT_ABOVE_16(*r_dst - 1);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
- if(res != 0xffff)\r
- {\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
- USE_CYCLES(CYC_DBCC_F_NOEXP);\r
- return;\r
- }\r
- REG_PC += 2;\r
- USE_CYCLES(CYC_DBCC_F_EXP);\r
- return;\r
- }\r
- REG_PC += 2;\r
-}\r
-\r
-\r
-void m68k_op_dbcc_16(void)\r
-{\r
- if(COND_NOT_CC())\r
- {\r
- uint* r_dst = &DY;\r
- uint res = MASK_OUT_ABOVE_16(*r_dst - 1);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
- if(res != 0xffff)\r
- {\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
- USE_CYCLES(CYC_DBCC_F_NOEXP);\r
- return;\r
- }\r
- REG_PC += 2;\r
- USE_CYCLES(CYC_DBCC_F_EXP);\r
- return;\r
- }\r
- REG_PC += 2;\r
-}\r
-\r
-\r
-void m68k_op_dbcs_16(void)\r
-{\r
- if(COND_NOT_CS())\r
- {\r
- uint* r_dst = &DY;\r
- uint res = MASK_OUT_ABOVE_16(*r_dst - 1);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
- if(res != 0xffff)\r
- {\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
- USE_CYCLES(CYC_DBCC_F_NOEXP);\r
- return;\r
- }\r
- REG_PC += 2;\r
- USE_CYCLES(CYC_DBCC_F_EXP);\r
- return;\r
- }\r
- REG_PC += 2;\r
-}\r
-\r
-\r
-void m68k_op_dbne_16(void)\r
-{\r
- if(COND_NOT_NE())\r
- {\r
- uint* r_dst = &DY;\r
- uint res = MASK_OUT_ABOVE_16(*r_dst - 1);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
- if(res != 0xffff)\r
- {\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
- USE_CYCLES(CYC_DBCC_F_NOEXP);\r
- return;\r
- }\r
- REG_PC += 2;\r
- USE_CYCLES(CYC_DBCC_F_EXP);\r
- return;\r
- }\r
- REG_PC += 2;\r
-}\r
-\r
-\r
-void m68k_op_dbeq_16(void)\r
-{\r
- if(COND_NOT_EQ())\r
- {\r
- uint* r_dst = &DY;\r
- uint res = MASK_OUT_ABOVE_16(*r_dst - 1);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
- if(res != 0xffff)\r
- {\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
- USE_CYCLES(CYC_DBCC_F_NOEXP);\r
- return;\r
- }\r
- REG_PC += 2;\r
- USE_CYCLES(CYC_DBCC_F_EXP);\r
- return;\r
- }\r
- REG_PC += 2;\r
-}\r
-\r
-\r
-void m68k_op_dbvc_16(void)\r
-{\r
- if(COND_NOT_VC())\r
- {\r
- uint* r_dst = &DY;\r
- uint res = MASK_OUT_ABOVE_16(*r_dst - 1);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
- if(res != 0xffff)\r
- {\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
- USE_CYCLES(CYC_DBCC_F_NOEXP);\r
- return;\r
- }\r
- REG_PC += 2;\r
- USE_CYCLES(CYC_DBCC_F_EXP);\r
- return;\r
- }\r
- REG_PC += 2;\r
-}\r
-\r
-\r
-void m68k_op_dbvs_16(void)\r
-{\r
- if(COND_NOT_VS())\r
- {\r
- uint* r_dst = &DY;\r
- uint res = MASK_OUT_ABOVE_16(*r_dst - 1);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
- if(res != 0xffff)\r
- {\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
- USE_CYCLES(CYC_DBCC_F_NOEXP);\r
- return;\r
- }\r
- REG_PC += 2;\r
- USE_CYCLES(CYC_DBCC_F_EXP);\r
- return;\r
- }\r
- REG_PC += 2;\r
-}\r
-\r
-\r
-void m68k_op_dbpl_16(void)\r
-{\r
- if(COND_NOT_PL())\r
- {\r
- uint* r_dst = &DY;\r
- uint res = MASK_OUT_ABOVE_16(*r_dst - 1);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
- if(res != 0xffff)\r
- {\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
- USE_CYCLES(CYC_DBCC_F_NOEXP);\r
- return;\r
- }\r
- REG_PC += 2;\r
- USE_CYCLES(CYC_DBCC_F_EXP);\r
- return;\r
- }\r
- REG_PC += 2;\r
-}\r
-\r
-\r
-void m68k_op_dbmi_16(void)\r
-{\r
- if(COND_NOT_MI())\r
- {\r
- uint* r_dst = &DY;\r
- uint res = MASK_OUT_ABOVE_16(*r_dst - 1);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
- if(res != 0xffff)\r
- {\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
- USE_CYCLES(CYC_DBCC_F_NOEXP);\r
- return;\r
- }\r
- REG_PC += 2;\r
- USE_CYCLES(CYC_DBCC_F_EXP);\r
- return;\r
- }\r
- REG_PC += 2;\r
-}\r
-\r
-\r
-void m68k_op_dbge_16(void)\r
-{\r
- if(COND_NOT_GE())\r
- {\r
- uint* r_dst = &DY;\r
- uint res = MASK_OUT_ABOVE_16(*r_dst - 1);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
- if(res != 0xffff)\r
- {\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
- USE_CYCLES(CYC_DBCC_F_NOEXP);\r
- return;\r
- }\r
- REG_PC += 2;\r
- USE_CYCLES(CYC_DBCC_F_EXP);\r
- return;\r
- }\r
- REG_PC += 2;\r
-}\r
-\r
-\r
-void m68k_op_dblt_16(void)\r
-{\r
- if(COND_NOT_LT())\r
- {\r
- uint* r_dst = &DY;\r
- uint res = MASK_OUT_ABOVE_16(*r_dst - 1);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
- if(res != 0xffff)\r
- {\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
- USE_CYCLES(CYC_DBCC_F_NOEXP);\r
- return;\r
- }\r
- REG_PC += 2;\r
- USE_CYCLES(CYC_DBCC_F_EXP);\r
- return;\r
- }\r
- REG_PC += 2;\r
-}\r
-\r
-\r
-void m68k_op_dbgt_16(void)\r
-{\r
- if(COND_NOT_GT())\r
- {\r
- uint* r_dst = &DY;\r
- uint res = MASK_OUT_ABOVE_16(*r_dst - 1);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
- if(res != 0xffff)\r
- {\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
- USE_CYCLES(CYC_DBCC_F_NOEXP);\r
- return;\r
- }\r
- REG_PC += 2;\r
- USE_CYCLES(CYC_DBCC_F_EXP);\r
- return;\r
- }\r
- REG_PC += 2;\r
-}\r
-\r
-\r
-void m68k_op_dble_16(void)\r
-{\r
- if(COND_NOT_LE())\r
- {\r
- uint* r_dst = &DY;\r
- uint res = MASK_OUT_ABOVE_16(*r_dst - 1);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
- if(res != 0xffff)\r
- {\r
- uint offset = OPER_I_16();\r
- REG_PC -= 2;\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_branch_16(offset);\r
- USE_CYCLES(CYC_DBCC_F_NOEXP);\r
- return;\r
- }\r
- REG_PC += 2;\r
- USE_CYCLES(CYC_DBCC_F_EXP);\r
- return;\r
- }\r
- REG_PC += 2;\r
-}\r
-\r
-\r
-void m68k_op_divs_16_d(void)\r
-{\r
- uint* r_dst = &DX;\r
- sint src = MAKE_INT_16(DY);\r
- sint quotient;\r
- sint remainder;\r
-\r
- if(src != 0)\r
- {\r
- if((uint32)*r_dst == 0x80000000 && src == -1)\r
- {\r
- FLAG_Z = 0;\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = 0;\r
- return;\r
- }\r
-\r
- quotient = MAKE_INT_32(*r_dst) / src;\r
- remainder = MAKE_INT_32(*r_dst) % src;\r
-\r
- if(quotient == MAKE_INT_16(quotient))\r
- {\r
- FLAG_Z = quotient;\r
- FLAG_N = NFLAG_16(quotient);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));\r
- return;\r
- }\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
-}\r
-\r
-\r
-void m68k_op_divs_16_ai(void)\r
-{\r
- uint* r_dst = &DX;\r
- sint src = MAKE_INT_16(OPER_AY_AI_16());\r
- sint quotient;\r
- sint remainder;\r
-\r
- if(src != 0)\r
- {\r
- if((uint32)*r_dst == 0x80000000 && src == -1)\r
- {\r
- FLAG_Z = 0;\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = 0;\r
- return;\r
- }\r
-\r
- quotient = MAKE_INT_32(*r_dst) / src;\r
- remainder = MAKE_INT_32(*r_dst) % src;\r
-\r
- if(quotient == MAKE_INT_16(quotient))\r
- {\r
- FLAG_Z = quotient;\r
- FLAG_N = NFLAG_16(quotient);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));\r
- return;\r
- }\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
-}\r
-\r
-\r
-void m68k_op_divs_16_pi(void)\r
-{\r
- uint* r_dst = &DX;\r
- sint src = MAKE_INT_16(OPER_AY_PI_16());\r
- sint quotient;\r
- sint remainder;\r
-\r
- if(src != 0)\r
- {\r
- if((uint32)*r_dst == 0x80000000 && src == -1)\r
- {\r
- FLAG_Z = 0;\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = 0;\r
- return;\r
- }\r
-\r
- quotient = MAKE_INT_32(*r_dst) / src;\r
- remainder = MAKE_INT_32(*r_dst) % src;\r
-\r
- if(quotient == MAKE_INT_16(quotient))\r
- {\r
- FLAG_Z = quotient;\r
- FLAG_N = NFLAG_16(quotient);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));\r
- return;\r
- }\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
-}\r
-\r
-\r
-void m68k_op_divs_16_pd(void)\r
-{\r
- uint* r_dst = &DX;\r
- sint src = MAKE_INT_16(OPER_AY_PD_16());\r
- sint quotient;\r
- sint remainder;\r
-\r
- if(src != 0)\r
- {\r
- if((uint32)*r_dst == 0x80000000 && src == -1)\r
- {\r
- FLAG_Z = 0;\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = 0;\r
- return;\r
- }\r
-\r
- quotient = MAKE_INT_32(*r_dst) / src;\r
- remainder = MAKE_INT_32(*r_dst) % src;\r
-\r
- if(quotient == MAKE_INT_16(quotient))\r
- {\r
- FLAG_Z = quotient;\r
- FLAG_N = NFLAG_16(quotient);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));\r
- return;\r
- }\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
-}\r
-\r
-\r
-void m68k_op_divs_16_di(void)\r
-{\r
- uint* r_dst = &DX;\r
- sint src = MAKE_INT_16(OPER_AY_DI_16());\r
- sint quotient;\r
- sint remainder;\r
-\r
- if(src != 0)\r
- {\r
- if((uint32)*r_dst == 0x80000000 && src == -1)\r
- {\r
- FLAG_Z = 0;\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = 0;\r
- return;\r
- }\r
-\r
- quotient = MAKE_INT_32(*r_dst) / src;\r
- remainder = MAKE_INT_32(*r_dst) % src;\r
-\r
- if(quotient == MAKE_INT_16(quotient))\r
- {\r
- FLAG_Z = quotient;\r
- FLAG_N = NFLAG_16(quotient);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));\r
- return;\r
- }\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
-}\r
-\r
-\r
-void m68k_op_divs_16_ix(void)\r
-{\r
- uint* r_dst = &DX;\r
- sint src = MAKE_INT_16(OPER_AY_IX_16());\r
- sint quotient;\r
- sint remainder;\r
-\r
- if(src != 0)\r
- {\r
- if((uint32)*r_dst == 0x80000000 && src == -1)\r
- {\r
- FLAG_Z = 0;\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = 0;\r
- return;\r
- }\r
-\r
- quotient = MAKE_INT_32(*r_dst) / src;\r
- remainder = MAKE_INT_32(*r_dst) % src;\r
-\r
- if(quotient == MAKE_INT_16(quotient))\r
- {\r
- FLAG_Z = quotient;\r
- FLAG_N = NFLAG_16(quotient);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));\r
- return;\r
- }\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
-}\r
-\r
-\r
-void m68k_op_divs_16_aw(void)\r
-{\r
- uint* r_dst = &DX;\r
- sint src = MAKE_INT_16(OPER_AW_16());\r
- sint quotient;\r
- sint remainder;\r
-\r
- if(src != 0)\r
- {\r
- if((uint32)*r_dst == 0x80000000 && src == -1)\r
- {\r
- FLAG_Z = 0;\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = 0;\r
- return;\r
- }\r
-\r
- quotient = MAKE_INT_32(*r_dst) / src;\r
- remainder = MAKE_INT_32(*r_dst) % src;\r
-\r
- if(quotient == MAKE_INT_16(quotient))\r
- {\r
- FLAG_Z = quotient;\r
- FLAG_N = NFLAG_16(quotient);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));\r
- return;\r
- }\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
-}\r
-\r
-\r
-void m68k_op_divs_16_al(void)\r
-{\r
- uint* r_dst = &DX;\r
- sint src = MAKE_INT_16(OPER_AL_16());\r
- sint quotient;\r
- sint remainder;\r
-\r
- if(src != 0)\r
- {\r
- if((uint32)*r_dst == 0x80000000 && src == -1)\r
- {\r
- FLAG_Z = 0;\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = 0;\r
- return;\r
- }\r
-\r
- quotient = MAKE_INT_32(*r_dst) / src;\r
- remainder = MAKE_INT_32(*r_dst) % src;\r
-\r
- if(quotient == MAKE_INT_16(quotient))\r
- {\r
- FLAG_Z = quotient;\r
- FLAG_N = NFLAG_16(quotient);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));\r
- return;\r
- }\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
-}\r
-\r
-\r
-void m68k_op_divs_16_pcdi(void)\r
-{\r
- uint* r_dst = &DX;\r
- sint src = MAKE_INT_16(OPER_PCDI_16());\r
- sint quotient;\r
- sint remainder;\r
-\r
- if(src != 0)\r
- {\r
- if((uint32)*r_dst == 0x80000000 && src == -1)\r
- {\r
- FLAG_Z = 0;\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = 0;\r
- return;\r
- }\r
-\r
- quotient = MAKE_INT_32(*r_dst) / src;\r
- remainder = MAKE_INT_32(*r_dst) % src;\r
-\r
- if(quotient == MAKE_INT_16(quotient))\r
- {\r
- FLAG_Z = quotient;\r
- FLAG_N = NFLAG_16(quotient);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));\r
- return;\r
- }\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
-}\r
-\r
-\r
-void m68k_op_divs_16_pcix(void)\r
-{\r
- uint* r_dst = &DX;\r
- sint src = MAKE_INT_16(OPER_PCIX_16());\r
- sint quotient;\r
- sint remainder;\r
-\r
- if(src != 0)\r
- {\r
- if((uint32)*r_dst == 0x80000000 && src == -1)\r
- {\r
- FLAG_Z = 0;\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = 0;\r
- return;\r
- }\r
-\r
- quotient = MAKE_INT_32(*r_dst) / src;\r
- remainder = MAKE_INT_32(*r_dst) % src;\r
-\r
- if(quotient == MAKE_INT_16(quotient))\r
- {\r
- FLAG_Z = quotient;\r
- FLAG_N = NFLAG_16(quotient);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));\r
- return;\r
- }\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
-}\r
-\r
-\r
-void m68k_op_divs_16_i(void)\r
-{\r
- uint* r_dst = &DX;\r
- sint src = MAKE_INT_16(OPER_I_16());\r
- sint quotient;\r
- sint remainder;\r
-\r
- if(src != 0)\r
- {\r
- if((uint32)*r_dst == 0x80000000 && src == -1)\r
- {\r
- FLAG_Z = 0;\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = 0;\r
- return;\r
- }\r
-\r
- quotient = MAKE_INT_32(*r_dst) / src;\r
- remainder = MAKE_INT_32(*r_dst) % src;\r
-\r
- if(quotient == MAKE_INT_16(quotient))\r
- {\r
- FLAG_Z = quotient;\r
- FLAG_N = NFLAG_16(quotient);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));\r
- return;\r
- }\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
-}\r
-\r
-\r
-void m68k_op_divu_16_d(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = MASK_OUT_ABOVE_16(DY);\r
-\r
- if(src != 0)\r
- {\r
- uint quotient = *r_dst / src;\r
- uint remainder = *r_dst % src;\r
-\r
- if(quotient < 0x10000)\r
- {\r
- FLAG_Z = quotient;\r
- FLAG_N = NFLAG_16(quotient);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));\r
- return;\r
- }\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
-}\r
-\r
-\r
-void m68k_op_divu_16_ai(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_AI_16();\r
-\r
- if(src != 0)\r
- {\r
- uint quotient = *r_dst / src;\r
- uint remainder = *r_dst % src;\r
-\r
- if(quotient < 0x10000)\r
- {\r
- FLAG_Z = quotient;\r
- FLAG_N = NFLAG_16(quotient);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));\r
- return;\r
- }\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
-}\r
-\r
-\r
-void m68k_op_divu_16_pi(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_PI_16();\r
-\r
- if(src != 0)\r
- {\r
- uint quotient = *r_dst / src;\r
- uint remainder = *r_dst % src;\r
-\r
- if(quotient < 0x10000)\r
- {\r
- FLAG_Z = quotient;\r
- FLAG_N = NFLAG_16(quotient);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));\r
- return;\r
- }\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
-}\r
-\r
-\r
-void m68k_op_divu_16_pd(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_PD_16();\r
-\r
- if(src != 0)\r
- {\r
- uint quotient = *r_dst / src;\r
- uint remainder = *r_dst % src;\r
-\r
- if(quotient < 0x10000)\r
- {\r
- FLAG_Z = quotient;\r
- FLAG_N = NFLAG_16(quotient);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));\r
- return;\r
- }\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
-}\r
-\r
-\r
-void m68k_op_divu_16_di(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_DI_16();\r
-\r
- if(src != 0)\r
- {\r
- uint quotient = *r_dst / src;\r
- uint remainder = *r_dst % src;\r
-\r
- if(quotient < 0x10000)\r
- {\r
- FLAG_Z = quotient;\r
- FLAG_N = NFLAG_16(quotient);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));\r
- return;\r
- }\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
-}\r
-\r
-\r
-void m68k_op_divu_16_ix(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_IX_16();\r
-\r
- if(src != 0)\r
- {\r
- uint quotient = *r_dst / src;\r
- uint remainder = *r_dst % src;\r
-\r
- if(quotient < 0x10000)\r
- {\r
- FLAG_Z = quotient;\r
- FLAG_N = NFLAG_16(quotient);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));\r
- return;\r
- }\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
-}\r
-\r
-\r
-void m68k_op_divu_16_aw(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AW_16();\r
-\r
- if(src != 0)\r
- {\r
- uint quotient = *r_dst / src;\r
- uint remainder = *r_dst % src;\r
-\r
- if(quotient < 0x10000)\r
- {\r
- FLAG_Z = quotient;\r
- FLAG_N = NFLAG_16(quotient);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));\r
- return;\r
- }\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
-}\r
-\r
-\r
-void m68k_op_divu_16_al(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AL_16();\r
-\r
- if(src != 0)\r
- {\r
- uint quotient = *r_dst / src;\r
- uint remainder = *r_dst % src;\r
-\r
- if(quotient < 0x10000)\r
- {\r
- FLAG_Z = quotient;\r
- FLAG_N = NFLAG_16(quotient);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));\r
- return;\r
- }\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
-}\r
-\r
-\r
-void m68k_op_divu_16_pcdi(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_PCDI_16();\r
-\r
- if(src != 0)\r
- {\r
- uint quotient = *r_dst / src;\r
- uint remainder = *r_dst % src;\r
-\r
- if(quotient < 0x10000)\r
- {\r
- FLAG_Z = quotient;\r
- FLAG_N = NFLAG_16(quotient);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));\r
- return;\r
- }\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
-}\r
-\r
-\r
-void m68k_op_divu_16_pcix(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_PCIX_16();\r
-\r
- if(src != 0)\r
- {\r
- uint quotient = *r_dst / src;\r
- uint remainder = *r_dst % src;\r
-\r
- if(quotient < 0x10000)\r
- {\r
- FLAG_Z = quotient;\r
- FLAG_N = NFLAG_16(quotient);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));\r
- return;\r
- }\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
-}\r
-\r
-\r
-void m68k_op_divu_16_i(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_I_16();\r
-\r
- if(src != 0)\r
- {\r
- uint quotient = *r_dst / src;\r
- uint remainder = *r_dst % src;\r
-\r
- if(quotient < 0x10000)\r
- {\r
- FLAG_Z = quotient;\r
- FLAG_N = NFLAG_16(quotient);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst = MASK_OUT_ABOVE_32(MASK_OUT_ABOVE_16(quotient) | (remainder << 16));\r
- return;\r
- }\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
-}\r
-\r
-\r
-void m68k_op_divl_32_d(void)\r
-{\r
-#if M68K_USE_64_BIT\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint64 divisor = DY;\r
- uint64 dividend = 0;\r
- uint64 quotient = 0;\r
- uint64 remainder = 0;\r
-\r
- if(divisor != 0)\r
- {\r
- if(BIT_A(word2)) /* 64 bit */\r
- {\r
- dividend = REG_D[word2 & 7];\r
- dividend <<= 32;\r
- dividend |= REG_D[(word2 >> 12) & 7];\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- quotient = (uint64)((sint64)dividend / (sint64)((sint32)divisor));\r
- remainder = (uint64)((sint64)dividend % (sint64)((sint32)divisor));\r
- if((sint64)quotient != (sint64)((sint32)quotient))\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- }\r
- else /* unsigned */\r
- {\r
- quotient = dividend / divisor;\r
- if(quotient > 0xffffffff)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- remainder = dividend % divisor;\r
- }\r
- }\r
- else /* 32 bit */\r
- {\r
- dividend = REG_D[(word2 >> 12) & 7];\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- quotient = (uint64)((sint64)((sint32)dividend) / (sint64)((sint32)divisor));\r
- remainder = (uint64)((sint64)((sint32)dividend) % (sint64)((sint32)divisor));\r
- }\r
- else /* unsigned */\r
- {\r
- quotient = dividend / divisor;\r
- remainder = dividend % divisor;\r
- }\r
- }\r
-\r
- REG_D[word2 & 7] = remainder;\r
- REG_D[(word2 >> 12) & 7] = quotient;\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#else\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint divisor = DY;\r
- uint dividend_hi = REG_D[word2 & 7];\r
- uint dividend_lo = REG_D[(word2 >> 12) & 7];\r
- uint quotient = 0;\r
- uint remainder = 0;\r
- uint dividend_neg = 0;\r
- uint divisor_neg = 0;\r
- sint i;\r
- uint overflow;\r
-\r
- if(divisor != 0)\r
- {\r
- /* quad / long : long quotient, long remainder */\r
- if(BIT_A(word2))\r
- {\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- /* special case in signed divide */\r
- if(dividend_hi == 0 && dividend_lo == 0x80000000 && divisor == 0xffffffff)\r
- {\r
- REG_D[word2 & 7] = 0;\r
- REG_D[(word2 >> 12) & 7] = 0x80000000;\r
-\r
- FLAG_N = NFLAG_SET;\r
- FLAG_Z = ZFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- if(GET_MSB_32(dividend_hi))\r
- {\r
- dividend_neg = 1;\r
- dividend_hi = (uint)MASK_OUT_ABOVE_32((-(sint)dividend_hi) - (dividend_lo != 0));\r
- dividend_lo = (uint)MASK_OUT_ABOVE_32(-(sint)dividend_lo);\r
- }\r
- if(GET_MSB_32(divisor))\r
- {\r
- divisor_neg = 1;\r
- divisor = (uint)MASK_OUT_ABOVE_32(-(sint)divisor);\r
-\r
- }\r
- }\r
-\r
- /* if the upper long is greater than the divisor, we're overflowing. */\r
- if(dividend_hi >= divisor)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
-\r
- for(i = 31; i >= 0; i--)\r
- {\r
- quotient <<= 1;\r
- remainder = (remainder << 1) + ((dividend_hi >> i) & 1);\r
- if(remainder >= divisor)\r
- {\r
- remainder -= divisor;\r
- quotient++;\r
- }\r
- }\r
- for(i = 31; i >= 0; i--)\r
- {\r
- quotient <<= 1;\r
- overflow = GET_MSB_32(remainder);\r
- remainder = (remainder << 1) + ((dividend_lo >> i) & 1);\r
- if(remainder >= divisor || overflow)\r
- {\r
- remainder -= divisor;\r
- quotient++;\r
- }\r
- }\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- if(quotient > 0x7fffffff)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- if(dividend_neg)\r
- {\r
- remainder = (uint)MASK_OUT_ABOVE_32(-(sint)remainder);\r
- quotient = (uint)MASK_OUT_ABOVE_32(-(sint)quotient);\r
- }\r
- if(divisor_neg)\r
- quotient = (uint)MASK_OUT_ABOVE_32(-(sint)quotient);\r
- }\r
-\r
- REG_D[word2 & 7] = remainder;\r
- REG_D[(word2 >> 12) & 7] = quotient;\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- /* long / long: long quotient, maybe long remainder */\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- /* Special case in divide */\r
- if(dividend_lo == 0x80000000 && divisor == 0xffffffff)\r
- {\r
- FLAG_N = NFLAG_SET;\r
- FLAG_Z = ZFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- REG_D[(word2 >> 12) & 7] = 0x80000000;\r
- REG_D[word2 & 7] = 0;\r
- return;\r
- }\r
- REG_D[word2 & 7] = MAKE_INT_32(dividend_lo) % MAKE_INT_32(divisor);\r
- quotient = REG_D[(word2 >> 12) & 7] = MAKE_INT_32(dividend_lo) / MAKE_INT_32(divisor);\r
- }\r
- else\r
- {\r
- REG_D[word2 & 7] = MASK_OUT_ABOVE_32(dividend_lo) % MASK_OUT_ABOVE_32(divisor);\r
- quotient = REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(dividend_lo) / MASK_OUT_ABOVE_32(divisor);\r
- }\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#endif\r
-}\r
-\r
-\r
-void m68k_op_divl_32_ai(void)\r
-{\r
-#if M68K_USE_64_BIT\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint64 divisor = OPER_AY_AI_32();\r
- uint64 dividend = 0;\r
- uint64 quotient = 0;\r
- uint64 remainder = 0;\r
-\r
- if(divisor != 0)\r
- {\r
- if(BIT_A(word2)) /* 64 bit */\r
- {\r
- dividend = REG_D[word2 & 7];\r
- dividend <<= 32;\r
- dividend |= REG_D[(word2 >> 12) & 7];\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- quotient = (uint64)((sint64)dividend / (sint64)((sint32)divisor));\r
- remainder = (uint64)((sint64)dividend % (sint64)((sint32)divisor));\r
- if((sint64)quotient != (sint64)((sint32)quotient))\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- }\r
- else /* unsigned */\r
- {\r
- quotient = dividend / divisor;\r
- if(quotient > 0xffffffff)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- remainder = dividend % divisor;\r
- }\r
- }\r
- else /* 32 bit */\r
- {\r
- dividend = REG_D[(word2 >> 12) & 7];\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- quotient = (uint64)((sint64)((sint32)dividend) / (sint64)((sint32)divisor));\r
- remainder = (uint64)((sint64)((sint32)dividend) % (sint64)((sint32)divisor));\r
- }\r
- else /* unsigned */\r
- {\r
- quotient = dividend / divisor;\r
- remainder = dividend % divisor;\r
- }\r
- }\r
-\r
- REG_D[word2 & 7] = remainder;\r
- REG_D[(word2 >> 12) & 7] = quotient;\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#else\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint divisor = OPER_AY_AI_32();\r
- uint dividend_hi = REG_D[word2 & 7];\r
- uint dividend_lo = REG_D[(word2 >> 12) & 7];\r
- uint quotient = 0;\r
- uint remainder = 0;\r
- uint dividend_neg = 0;\r
- uint divisor_neg = 0;\r
- sint i;\r
- uint overflow;\r
-\r
- if(divisor != 0)\r
- {\r
- /* quad / long : long quotient, long remainder */\r
- if(BIT_A(word2))\r
- {\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- /* special case in signed divide */\r
- if(dividend_hi == 0 && dividend_lo == 0x80000000 && divisor == 0xffffffff)\r
- {\r
- REG_D[word2 & 7] = 0;\r
- REG_D[(word2 >> 12) & 7] = 0x80000000;\r
-\r
- FLAG_N = NFLAG_SET;\r
- FLAG_Z = ZFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- if(GET_MSB_32(dividend_hi))\r
- {\r
- dividend_neg = 1;\r
- dividend_hi = (uint)MASK_OUT_ABOVE_32((-(sint)dividend_hi) - (dividend_lo != 0));\r
- dividend_lo = (uint)MASK_OUT_ABOVE_32(-(sint)dividend_lo);\r
- }\r
- if(GET_MSB_32(divisor))\r
- {\r
- divisor_neg = 1;\r
- divisor = (uint)MASK_OUT_ABOVE_32(-(sint)divisor);\r
-\r
- }\r
- }\r
-\r
- /* if the upper long is greater than the divisor, we're overflowing. */\r
- if(dividend_hi >= divisor)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
-\r
- for(i = 31; i >= 0; i--)\r
- {\r
- quotient <<= 1;\r
- remainder = (remainder << 1) + ((dividend_hi >> i) & 1);\r
- if(remainder >= divisor)\r
- {\r
- remainder -= divisor;\r
- quotient++;\r
- }\r
- }\r
- for(i = 31; i >= 0; i--)\r
- {\r
- quotient <<= 1;\r
- overflow = GET_MSB_32(remainder);\r
- remainder = (remainder << 1) + ((dividend_lo >> i) & 1);\r
- if(remainder >= divisor || overflow)\r
- {\r
- remainder -= divisor;\r
- quotient++;\r
- }\r
- }\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- if(quotient > 0x7fffffff)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- if(dividend_neg)\r
- {\r
- remainder = (uint)MASK_OUT_ABOVE_32(-(sint)remainder);\r
- quotient = (uint)MASK_OUT_ABOVE_32(-(sint)quotient);\r
- }\r
- if(divisor_neg)\r
- quotient = (uint)MASK_OUT_ABOVE_32(-(sint)quotient);\r
- }\r
-\r
- REG_D[word2 & 7] = remainder;\r
- REG_D[(word2 >> 12) & 7] = quotient;\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- /* long / long: long quotient, maybe long remainder */\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- /* Special case in divide */\r
- if(dividend_lo == 0x80000000 && divisor == 0xffffffff)\r
- {\r
- FLAG_N = NFLAG_SET;\r
- FLAG_Z = ZFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- REG_D[(word2 >> 12) & 7] = 0x80000000;\r
- REG_D[word2 & 7] = 0;\r
- return;\r
- }\r
- REG_D[word2 & 7] = MAKE_INT_32(dividend_lo) % MAKE_INT_32(divisor);\r
- quotient = REG_D[(word2 >> 12) & 7] = MAKE_INT_32(dividend_lo) / MAKE_INT_32(divisor);\r
- }\r
- else\r
- {\r
- REG_D[word2 & 7] = MASK_OUT_ABOVE_32(dividend_lo) % MASK_OUT_ABOVE_32(divisor);\r
- quotient = REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(dividend_lo) / MASK_OUT_ABOVE_32(divisor);\r
- }\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#endif\r
-}\r
-\r
-\r
-void m68k_op_divl_32_pi(void)\r
-{\r
-#if M68K_USE_64_BIT\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint64 divisor = OPER_AY_PI_32();\r
- uint64 dividend = 0;\r
- uint64 quotient = 0;\r
- uint64 remainder = 0;\r
-\r
- if(divisor != 0)\r
- {\r
- if(BIT_A(word2)) /* 64 bit */\r
- {\r
- dividend = REG_D[word2 & 7];\r
- dividend <<= 32;\r
- dividend |= REG_D[(word2 >> 12) & 7];\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- quotient = (uint64)((sint64)dividend / (sint64)((sint32)divisor));\r
- remainder = (uint64)((sint64)dividend % (sint64)((sint32)divisor));\r
- if((sint64)quotient != (sint64)((sint32)quotient))\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- }\r
- else /* unsigned */\r
- {\r
- quotient = dividend / divisor;\r
- if(quotient > 0xffffffff)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- remainder = dividend % divisor;\r
- }\r
- }\r
- else /* 32 bit */\r
- {\r
- dividend = REG_D[(word2 >> 12) & 7];\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- quotient = (uint64)((sint64)((sint32)dividend) / (sint64)((sint32)divisor));\r
- remainder = (uint64)((sint64)((sint32)dividend) % (sint64)((sint32)divisor));\r
- }\r
- else /* unsigned */\r
- {\r
- quotient = dividend / divisor;\r
- remainder = dividend % divisor;\r
- }\r
- }\r
-\r
- REG_D[word2 & 7] = remainder;\r
- REG_D[(word2 >> 12) & 7] = quotient;\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#else\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint divisor = OPER_AY_PI_32();\r
- uint dividend_hi = REG_D[word2 & 7];\r
- uint dividend_lo = REG_D[(word2 >> 12) & 7];\r
- uint quotient = 0;\r
- uint remainder = 0;\r
- uint dividend_neg = 0;\r
- uint divisor_neg = 0;\r
- sint i;\r
- uint overflow;\r
-\r
- if(divisor != 0)\r
- {\r
- /* quad / long : long quotient, long remainder */\r
- if(BIT_A(word2))\r
- {\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- /* special case in signed divide */\r
- if(dividend_hi == 0 && dividend_lo == 0x80000000 && divisor == 0xffffffff)\r
- {\r
- REG_D[word2 & 7] = 0;\r
- REG_D[(word2 >> 12) & 7] = 0x80000000;\r
-\r
- FLAG_N = NFLAG_SET;\r
- FLAG_Z = ZFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- if(GET_MSB_32(dividend_hi))\r
- {\r
- dividend_neg = 1;\r
- dividend_hi = (uint)MASK_OUT_ABOVE_32((-(sint)dividend_hi) - (dividend_lo != 0));\r
- dividend_lo = (uint)MASK_OUT_ABOVE_32(-(sint)dividend_lo);\r
- }\r
- if(GET_MSB_32(divisor))\r
- {\r
- divisor_neg = 1;\r
- divisor = (uint)MASK_OUT_ABOVE_32(-(sint)divisor);\r
-\r
- }\r
- }\r
-\r
- /* if the upper long is greater than the divisor, we're overflowing. */\r
- if(dividend_hi >= divisor)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
-\r
- for(i = 31; i >= 0; i--)\r
- {\r
- quotient <<= 1;\r
- remainder = (remainder << 1) + ((dividend_hi >> i) & 1);\r
- if(remainder >= divisor)\r
- {\r
- remainder -= divisor;\r
- quotient++;\r
- }\r
- }\r
- for(i = 31; i >= 0; i--)\r
- {\r
- quotient <<= 1;\r
- overflow = GET_MSB_32(remainder);\r
- remainder = (remainder << 1) + ((dividend_lo >> i) & 1);\r
- if(remainder >= divisor || overflow)\r
- {\r
- remainder -= divisor;\r
- quotient++;\r
- }\r
- }\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- if(quotient > 0x7fffffff)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- if(dividend_neg)\r
- {\r
- remainder = (uint)MASK_OUT_ABOVE_32(-(sint)remainder);\r
- quotient = (uint)MASK_OUT_ABOVE_32(-(sint)quotient);\r
- }\r
- if(divisor_neg)\r
- quotient = (uint)MASK_OUT_ABOVE_32(-(sint)quotient);\r
- }\r
-\r
- REG_D[word2 & 7] = remainder;\r
- REG_D[(word2 >> 12) & 7] = quotient;\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- /* long / long: long quotient, maybe long remainder */\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- /* Special case in divide */\r
- if(dividend_lo == 0x80000000 && divisor == 0xffffffff)\r
- {\r
- FLAG_N = NFLAG_SET;\r
- FLAG_Z = ZFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- REG_D[(word2 >> 12) & 7] = 0x80000000;\r
- REG_D[word2 & 7] = 0;\r
- return;\r
- }\r
- REG_D[word2 & 7] = MAKE_INT_32(dividend_lo) % MAKE_INT_32(divisor);\r
- quotient = REG_D[(word2 >> 12) & 7] = MAKE_INT_32(dividend_lo) / MAKE_INT_32(divisor);\r
- }\r
- else\r
- {\r
- REG_D[word2 & 7] = MASK_OUT_ABOVE_32(dividend_lo) % MASK_OUT_ABOVE_32(divisor);\r
- quotient = REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(dividend_lo) / MASK_OUT_ABOVE_32(divisor);\r
- }\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#endif\r
-}\r
-\r
-\r
-void m68k_op_divl_32_pd(void)\r
-{\r
-#if M68K_USE_64_BIT\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint64 divisor = OPER_AY_PD_32();\r
- uint64 dividend = 0;\r
- uint64 quotient = 0;\r
- uint64 remainder = 0;\r
-\r
- if(divisor != 0)\r
- {\r
- if(BIT_A(word2)) /* 64 bit */\r
- {\r
- dividend = REG_D[word2 & 7];\r
- dividend <<= 32;\r
- dividend |= REG_D[(word2 >> 12) & 7];\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- quotient = (uint64)((sint64)dividend / (sint64)((sint32)divisor));\r
- remainder = (uint64)((sint64)dividend % (sint64)((sint32)divisor));\r
- if((sint64)quotient != (sint64)((sint32)quotient))\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- }\r
- else /* unsigned */\r
- {\r
- quotient = dividend / divisor;\r
- if(quotient > 0xffffffff)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- remainder = dividend % divisor;\r
- }\r
- }\r
- else /* 32 bit */\r
- {\r
- dividend = REG_D[(word2 >> 12) & 7];\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- quotient = (uint64)((sint64)((sint32)dividend) / (sint64)((sint32)divisor));\r
- remainder = (uint64)((sint64)((sint32)dividend) % (sint64)((sint32)divisor));\r
- }\r
- else /* unsigned */\r
- {\r
- quotient = dividend / divisor;\r
- remainder = dividend % divisor;\r
- }\r
- }\r
-\r
- REG_D[word2 & 7] = remainder;\r
- REG_D[(word2 >> 12) & 7] = quotient;\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#else\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint divisor = OPER_AY_PD_32();\r
- uint dividend_hi = REG_D[word2 & 7];\r
- uint dividend_lo = REG_D[(word2 >> 12) & 7];\r
- uint quotient = 0;\r
- uint remainder = 0;\r
- uint dividend_neg = 0;\r
- uint divisor_neg = 0;\r
- sint i;\r
- uint overflow;\r
-\r
- if(divisor != 0)\r
- {\r
- /* quad / long : long quotient, long remainder */\r
- if(BIT_A(word2))\r
- {\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- /* special case in signed divide */\r
- if(dividend_hi == 0 && dividend_lo == 0x80000000 && divisor == 0xffffffff)\r
- {\r
- REG_D[word2 & 7] = 0;\r
- REG_D[(word2 >> 12) & 7] = 0x80000000;\r
-\r
- FLAG_N = NFLAG_SET;\r
- FLAG_Z = ZFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- if(GET_MSB_32(dividend_hi))\r
- {\r
- dividend_neg = 1;\r
- dividend_hi = (uint)MASK_OUT_ABOVE_32((-(sint)dividend_hi) - (dividend_lo != 0));\r
- dividend_lo = (uint)MASK_OUT_ABOVE_32(-(sint)dividend_lo);\r
- }\r
- if(GET_MSB_32(divisor))\r
- {\r
- divisor_neg = 1;\r
- divisor = (uint)MASK_OUT_ABOVE_32(-(sint)divisor);\r
-\r
- }\r
- }\r
-\r
- /* if the upper long is greater than the divisor, we're overflowing. */\r
- if(dividend_hi >= divisor)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
-\r
- for(i = 31; i >= 0; i--)\r
- {\r
- quotient <<= 1;\r
- remainder = (remainder << 1) + ((dividend_hi >> i) & 1);\r
- if(remainder >= divisor)\r
- {\r
- remainder -= divisor;\r
- quotient++;\r
- }\r
- }\r
- for(i = 31; i >= 0; i--)\r
- {\r
- quotient <<= 1;\r
- overflow = GET_MSB_32(remainder);\r
- remainder = (remainder << 1) + ((dividend_lo >> i) & 1);\r
- if(remainder >= divisor || overflow)\r
- {\r
- remainder -= divisor;\r
- quotient++;\r
- }\r
- }\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- if(quotient > 0x7fffffff)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- if(dividend_neg)\r
- {\r
- remainder = (uint)MASK_OUT_ABOVE_32(-(sint)remainder);\r
- quotient = (uint)MASK_OUT_ABOVE_32(-(sint)quotient);\r
- }\r
- if(divisor_neg)\r
- quotient = (uint)MASK_OUT_ABOVE_32(-(sint)quotient);\r
- }\r
-\r
- REG_D[word2 & 7] = remainder;\r
- REG_D[(word2 >> 12) & 7] = quotient;\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- /* long / long: long quotient, maybe long remainder */\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- /* Special case in divide */\r
- if(dividend_lo == 0x80000000 && divisor == 0xffffffff)\r
- {\r
- FLAG_N = NFLAG_SET;\r
- FLAG_Z = ZFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- REG_D[(word2 >> 12) & 7] = 0x80000000;\r
- REG_D[word2 & 7] = 0;\r
- return;\r
- }\r
- REG_D[word2 & 7] = MAKE_INT_32(dividend_lo) % MAKE_INT_32(divisor);\r
- quotient = REG_D[(word2 >> 12) & 7] = MAKE_INT_32(dividend_lo) / MAKE_INT_32(divisor);\r
- }\r
- else\r
- {\r
- REG_D[word2 & 7] = MASK_OUT_ABOVE_32(dividend_lo) % MASK_OUT_ABOVE_32(divisor);\r
- quotient = REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(dividend_lo) / MASK_OUT_ABOVE_32(divisor);\r
- }\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#endif\r
-}\r
-\r
-\r
-void m68k_op_divl_32_di(void)\r
-{\r
-#if M68K_USE_64_BIT\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint64 divisor = OPER_AY_DI_32();\r
- uint64 dividend = 0;\r
- uint64 quotient = 0;\r
- uint64 remainder = 0;\r
-\r
- if(divisor != 0)\r
- {\r
- if(BIT_A(word2)) /* 64 bit */\r
- {\r
- dividend = REG_D[word2 & 7];\r
- dividend <<= 32;\r
- dividend |= REG_D[(word2 >> 12) & 7];\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- quotient = (uint64)((sint64)dividend / (sint64)((sint32)divisor));\r
- remainder = (uint64)((sint64)dividend % (sint64)((sint32)divisor));\r
- if((sint64)quotient != (sint64)((sint32)quotient))\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- }\r
- else /* unsigned */\r
- {\r
- quotient = dividend / divisor;\r
- if(quotient > 0xffffffff)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- remainder = dividend % divisor;\r
- }\r
- }\r
- else /* 32 bit */\r
- {\r
- dividend = REG_D[(word2 >> 12) & 7];\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- quotient = (uint64)((sint64)((sint32)dividend) / (sint64)((sint32)divisor));\r
- remainder = (uint64)((sint64)((sint32)dividend) % (sint64)((sint32)divisor));\r
- }\r
- else /* unsigned */\r
- {\r
- quotient = dividend / divisor;\r
- remainder = dividend % divisor;\r
- }\r
- }\r
-\r
- REG_D[word2 & 7] = remainder;\r
- REG_D[(word2 >> 12) & 7] = quotient;\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#else\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint divisor = OPER_AY_DI_32();\r
- uint dividend_hi = REG_D[word2 & 7];\r
- uint dividend_lo = REG_D[(word2 >> 12) & 7];\r
- uint quotient = 0;\r
- uint remainder = 0;\r
- uint dividend_neg = 0;\r
- uint divisor_neg = 0;\r
- sint i;\r
- uint overflow;\r
-\r
- if(divisor != 0)\r
- {\r
- /* quad / long : long quotient, long remainder */\r
- if(BIT_A(word2))\r
- {\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- /* special case in signed divide */\r
- if(dividend_hi == 0 && dividend_lo == 0x80000000 && divisor == 0xffffffff)\r
- {\r
- REG_D[word2 & 7] = 0;\r
- REG_D[(word2 >> 12) & 7] = 0x80000000;\r
-\r
- FLAG_N = NFLAG_SET;\r
- FLAG_Z = ZFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- if(GET_MSB_32(dividend_hi))\r
- {\r
- dividend_neg = 1;\r
- dividend_hi = (uint)MASK_OUT_ABOVE_32((-(sint)dividend_hi) - (dividend_lo != 0));\r
- dividend_lo = (uint)MASK_OUT_ABOVE_32(-(sint)dividend_lo);\r
- }\r
- if(GET_MSB_32(divisor))\r
- {\r
- divisor_neg = 1;\r
- divisor = (uint)MASK_OUT_ABOVE_32(-(sint)divisor);\r
-\r
- }\r
- }\r
-\r
- /* if the upper long is greater than the divisor, we're overflowing. */\r
- if(dividend_hi >= divisor)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
-\r
- for(i = 31; i >= 0; i--)\r
- {\r
- quotient <<= 1;\r
- remainder = (remainder << 1) + ((dividend_hi >> i) & 1);\r
- if(remainder >= divisor)\r
- {\r
- remainder -= divisor;\r
- quotient++;\r
- }\r
- }\r
- for(i = 31; i >= 0; i--)\r
- {\r
- quotient <<= 1;\r
- overflow = GET_MSB_32(remainder);\r
- remainder = (remainder << 1) + ((dividend_lo >> i) & 1);\r
- if(remainder >= divisor || overflow)\r
- {\r
- remainder -= divisor;\r
- quotient++;\r
- }\r
- }\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- if(quotient > 0x7fffffff)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- if(dividend_neg)\r
- {\r
- remainder = (uint)MASK_OUT_ABOVE_32(-(sint)remainder);\r
- quotient = (uint)MASK_OUT_ABOVE_32(-(sint)quotient);\r
- }\r
- if(divisor_neg)\r
- quotient = (uint)MASK_OUT_ABOVE_32(-(sint)quotient);\r
- }\r
-\r
- REG_D[word2 & 7] = remainder;\r
- REG_D[(word2 >> 12) & 7] = quotient;\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- /* long / long: long quotient, maybe long remainder */\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- /* Special case in divide */\r
- if(dividend_lo == 0x80000000 && divisor == 0xffffffff)\r
- {\r
- FLAG_N = NFLAG_SET;\r
- FLAG_Z = ZFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- REG_D[(word2 >> 12) & 7] = 0x80000000;\r
- REG_D[word2 & 7] = 0;\r
- return;\r
- }\r
- REG_D[word2 & 7] = MAKE_INT_32(dividend_lo) % MAKE_INT_32(divisor);\r
- quotient = REG_D[(word2 >> 12) & 7] = MAKE_INT_32(dividend_lo) / MAKE_INT_32(divisor);\r
- }\r
- else\r
- {\r
- REG_D[word2 & 7] = MASK_OUT_ABOVE_32(dividend_lo) % MASK_OUT_ABOVE_32(divisor);\r
- quotient = REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(dividend_lo) / MASK_OUT_ABOVE_32(divisor);\r
- }\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#endif\r
-}\r
-\r
-\r
-void m68k_op_divl_32_ix(void)\r
-{\r
-#if M68K_USE_64_BIT\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint64 divisor = OPER_AY_IX_32();\r
- uint64 dividend = 0;\r
- uint64 quotient = 0;\r
- uint64 remainder = 0;\r
-\r
- if(divisor != 0)\r
- {\r
- if(BIT_A(word2)) /* 64 bit */\r
- {\r
- dividend = REG_D[word2 & 7];\r
- dividend <<= 32;\r
- dividend |= REG_D[(word2 >> 12) & 7];\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- quotient = (uint64)((sint64)dividend / (sint64)((sint32)divisor));\r
- remainder = (uint64)((sint64)dividend % (sint64)((sint32)divisor));\r
- if((sint64)quotient != (sint64)((sint32)quotient))\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- }\r
- else /* unsigned */\r
- {\r
- quotient = dividend / divisor;\r
- if(quotient > 0xffffffff)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- remainder = dividend % divisor;\r
- }\r
- }\r
- else /* 32 bit */\r
- {\r
- dividend = REG_D[(word2 >> 12) & 7];\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- quotient = (uint64)((sint64)((sint32)dividend) / (sint64)((sint32)divisor));\r
- remainder = (uint64)((sint64)((sint32)dividend) % (sint64)((sint32)divisor));\r
- }\r
- else /* unsigned */\r
- {\r
- quotient = dividend / divisor;\r
- remainder = dividend % divisor;\r
- }\r
- }\r
-\r
- REG_D[word2 & 7] = remainder;\r
- REG_D[(word2 >> 12) & 7] = quotient;\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#else\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint divisor = OPER_AY_IX_32();\r
- uint dividend_hi = REG_D[word2 & 7];\r
- uint dividend_lo = REG_D[(word2 >> 12) & 7];\r
- uint quotient = 0;\r
- uint remainder = 0;\r
- uint dividend_neg = 0;\r
- uint divisor_neg = 0;\r
- sint i;\r
- uint overflow;\r
-\r
- if(divisor != 0)\r
- {\r
- /* quad / long : long quotient, long remainder */\r
- if(BIT_A(word2))\r
- {\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- /* special case in signed divide */\r
- if(dividend_hi == 0 && dividend_lo == 0x80000000 && divisor == 0xffffffff)\r
- {\r
- REG_D[word2 & 7] = 0;\r
- REG_D[(word2 >> 12) & 7] = 0x80000000;\r
-\r
- FLAG_N = NFLAG_SET;\r
- FLAG_Z = ZFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- if(GET_MSB_32(dividend_hi))\r
- {\r
- dividend_neg = 1;\r
- dividend_hi = (uint)MASK_OUT_ABOVE_32((-(sint)dividend_hi) - (dividend_lo != 0));\r
- dividend_lo = (uint)MASK_OUT_ABOVE_32(-(sint)dividend_lo);\r
- }\r
- if(GET_MSB_32(divisor))\r
- {\r
- divisor_neg = 1;\r
- divisor = (uint)MASK_OUT_ABOVE_32(-(sint)divisor);\r
-\r
- }\r
- }\r
-\r
- /* if the upper long is greater than the divisor, we're overflowing. */\r
- if(dividend_hi >= divisor)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
-\r
- for(i = 31; i >= 0; i--)\r
- {\r
- quotient <<= 1;\r
- remainder = (remainder << 1) + ((dividend_hi >> i) & 1);\r
- if(remainder >= divisor)\r
- {\r
- remainder -= divisor;\r
- quotient++;\r
- }\r
- }\r
- for(i = 31; i >= 0; i--)\r
- {\r
- quotient <<= 1;\r
- overflow = GET_MSB_32(remainder);\r
- remainder = (remainder << 1) + ((dividend_lo >> i) & 1);\r
- if(remainder >= divisor || overflow)\r
- {\r
- remainder -= divisor;\r
- quotient++;\r
- }\r
- }\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- if(quotient > 0x7fffffff)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- if(dividend_neg)\r
- {\r
- remainder = (uint)MASK_OUT_ABOVE_32(-(sint)remainder);\r
- quotient = (uint)MASK_OUT_ABOVE_32(-(sint)quotient);\r
- }\r
- if(divisor_neg)\r
- quotient = (uint)MASK_OUT_ABOVE_32(-(sint)quotient);\r
- }\r
-\r
- REG_D[word2 & 7] = remainder;\r
- REG_D[(word2 >> 12) & 7] = quotient;\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- /* long / long: long quotient, maybe long remainder */\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- /* Special case in divide */\r
- if(dividend_lo == 0x80000000 && divisor == 0xffffffff)\r
- {\r
- FLAG_N = NFLAG_SET;\r
- FLAG_Z = ZFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- REG_D[(word2 >> 12) & 7] = 0x80000000;\r
- REG_D[word2 & 7] = 0;\r
- return;\r
- }\r
- REG_D[word2 & 7] = MAKE_INT_32(dividend_lo) % MAKE_INT_32(divisor);\r
- quotient = REG_D[(word2 >> 12) & 7] = MAKE_INT_32(dividend_lo) / MAKE_INT_32(divisor);\r
- }\r
- else\r
- {\r
- REG_D[word2 & 7] = MASK_OUT_ABOVE_32(dividend_lo) % MASK_OUT_ABOVE_32(divisor);\r
- quotient = REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(dividend_lo) / MASK_OUT_ABOVE_32(divisor);\r
- }\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#endif\r
-}\r
-\r
-\r
-void m68k_op_divl_32_aw(void)\r
-{\r
-#if M68K_USE_64_BIT\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint64 divisor = OPER_AW_32();\r
- uint64 dividend = 0;\r
- uint64 quotient = 0;\r
- uint64 remainder = 0;\r
-\r
- if(divisor != 0)\r
- {\r
- if(BIT_A(word2)) /* 64 bit */\r
- {\r
- dividend = REG_D[word2 & 7];\r
- dividend <<= 32;\r
- dividend |= REG_D[(word2 >> 12) & 7];\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- quotient = (uint64)((sint64)dividend / (sint64)((sint32)divisor));\r
- remainder = (uint64)((sint64)dividend % (sint64)((sint32)divisor));\r
- if((sint64)quotient != (sint64)((sint32)quotient))\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- }\r
- else /* unsigned */\r
- {\r
- quotient = dividend / divisor;\r
- if(quotient > 0xffffffff)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- remainder = dividend % divisor;\r
- }\r
- }\r
- else /* 32 bit */\r
- {\r
- dividend = REG_D[(word2 >> 12) & 7];\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- quotient = (uint64)((sint64)((sint32)dividend) / (sint64)((sint32)divisor));\r
- remainder = (uint64)((sint64)((sint32)dividend) % (sint64)((sint32)divisor));\r
- }\r
- else /* unsigned */\r
- {\r
- quotient = dividend / divisor;\r
- remainder = dividend % divisor;\r
- }\r
- }\r
-\r
- REG_D[word2 & 7] = remainder;\r
- REG_D[(word2 >> 12) & 7] = quotient;\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#else\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint divisor = OPER_AW_32();\r
- uint dividend_hi = REG_D[word2 & 7];\r
- uint dividend_lo = REG_D[(word2 >> 12) & 7];\r
- uint quotient = 0;\r
- uint remainder = 0;\r
- uint dividend_neg = 0;\r
- uint divisor_neg = 0;\r
- sint i;\r
- uint overflow;\r
-\r
- if(divisor != 0)\r
- {\r
- /* quad / long : long quotient, long remainder */\r
- if(BIT_A(word2))\r
- {\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- /* special case in signed divide */\r
- if(dividend_hi == 0 && dividend_lo == 0x80000000 && divisor == 0xffffffff)\r
- {\r
- REG_D[word2 & 7] = 0;\r
- REG_D[(word2 >> 12) & 7] = 0x80000000;\r
-\r
- FLAG_N = NFLAG_SET;\r
- FLAG_Z = ZFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- if(GET_MSB_32(dividend_hi))\r
- {\r
- dividend_neg = 1;\r
- dividend_hi = (uint)MASK_OUT_ABOVE_32((-(sint)dividend_hi) - (dividend_lo != 0));\r
- dividend_lo = (uint)MASK_OUT_ABOVE_32(-(sint)dividend_lo);\r
- }\r
- if(GET_MSB_32(divisor))\r
- {\r
- divisor_neg = 1;\r
- divisor = (uint)MASK_OUT_ABOVE_32(-(sint)divisor);\r
-\r
- }\r
- }\r
-\r
- /* if the upper long is greater than the divisor, we're overflowing. */\r
- if(dividend_hi >= divisor)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
-\r
- for(i = 31; i >= 0; i--)\r
- {\r
- quotient <<= 1;\r
- remainder = (remainder << 1) + ((dividend_hi >> i) & 1);\r
- if(remainder >= divisor)\r
- {\r
- remainder -= divisor;\r
- quotient++;\r
- }\r
- }\r
- for(i = 31; i >= 0; i--)\r
- {\r
- quotient <<= 1;\r
- overflow = GET_MSB_32(remainder);\r
- remainder = (remainder << 1) + ((dividend_lo >> i) & 1);\r
- if(remainder >= divisor || overflow)\r
- {\r
- remainder -= divisor;\r
- quotient++;\r
- }\r
- }\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- if(quotient > 0x7fffffff)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- if(dividend_neg)\r
- {\r
- remainder = (uint)MASK_OUT_ABOVE_32(-(sint)remainder);\r
- quotient = (uint)MASK_OUT_ABOVE_32(-(sint)quotient);\r
- }\r
- if(divisor_neg)\r
- quotient = (uint)MASK_OUT_ABOVE_32(-(sint)quotient);\r
- }\r
-\r
- REG_D[word2 & 7] = remainder;\r
- REG_D[(word2 >> 12) & 7] = quotient;\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- /* long / long: long quotient, maybe long remainder */\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- /* Special case in divide */\r
- if(dividend_lo == 0x80000000 && divisor == 0xffffffff)\r
- {\r
- FLAG_N = NFLAG_SET;\r
- FLAG_Z = ZFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- REG_D[(word2 >> 12) & 7] = 0x80000000;\r
- REG_D[word2 & 7] = 0;\r
- return;\r
- }\r
- REG_D[word2 & 7] = MAKE_INT_32(dividend_lo) % MAKE_INT_32(divisor);\r
- quotient = REG_D[(word2 >> 12) & 7] = MAKE_INT_32(dividend_lo) / MAKE_INT_32(divisor);\r
- }\r
- else\r
- {\r
- REG_D[word2 & 7] = MASK_OUT_ABOVE_32(dividend_lo) % MASK_OUT_ABOVE_32(divisor);\r
- quotient = REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(dividend_lo) / MASK_OUT_ABOVE_32(divisor);\r
- }\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#endif\r
-}\r
-\r
-\r
-void m68k_op_divl_32_al(void)\r
-{\r
-#if M68K_USE_64_BIT\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint64 divisor = OPER_AL_32();\r
- uint64 dividend = 0;\r
- uint64 quotient = 0;\r
- uint64 remainder = 0;\r
-\r
- if(divisor != 0)\r
- {\r
- if(BIT_A(word2)) /* 64 bit */\r
- {\r
- dividend = REG_D[word2 & 7];\r
- dividend <<= 32;\r
- dividend |= REG_D[(word2 >> 12) & 7];\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- quotient = (uint64)((sint64)dividend / (sint64)((sint32)divisor));\r
- remainder = (uint64)((sint64)dividend % (sint64)((sint32)divisor));\r
- if((sint64)quotient != (sint64)((sint32)quotient))\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- }\r
- else /* unsigned */\r
- {\r
- quotient = dividend / divisor;\r
- if(quotient > 0xffffffff)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- remainder = dividend % divisor;\r
- }\r
- }\r
- else /* 32 bit */\r
- {\r
- dividend = REG_D[(word2 >> 12) & 7];\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- quotient = (uint64)((sint64)((sint32)dividend) / (sint64)((sint32)divisor));\r
- remainder = (uint64)((sint64)((sint32)dividend) % (sint64)((sint32)divisor));\r
- }\r
- else /* unsigned */\r
- {\r
- quotient = dividend / divisor;\r
- remainder = dividend % divisor;\r
- }\r
- }\r
-\r
- REG_D[word2 & 7] = remainder;\r
- REG_D[(word2 >> 12) & 7] = quotient;\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#else\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint divisor = OPER_AL_32();\r
- uint dividend_hi = REG_D[word2 & 7];\r
- uint dividend_lo = REG_D[(word2 >> 12) & 7];\r
- uint quotient = 0;\r
- uint remainder = 0;\r
- uint dividend_neg = 0;\r
- uint divisor_neg = 0;\r
- sint i;\r
- uint overflow;\r
-\r
- if(divisor != 0)\r
- {\r
- /* quad / long : long quotient, long remainder */\r
- if(BIT_A(word2))\r
- {\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- /* special case in signed divide */\r
- if(dividend_hi == 0 && dividend_lo == 0x80000000 && divisor == 0xffffffff)\r
- {\r
- REG_D[word2 & 7] = 0;\r
- REG_D[(word2 >> 12) & 7] = 0x80000000;\r
-\r
- FLAG_N = NFLAG_SET;\r
- FLAG_Z = ZFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- if(GET_MSB_32(dividend_hi))\r
- {\r
- dividend_neg = 1;\r
- dividend_hi = (uint)MASK_OUT_ABOVE_32((-(sint)dividend_hi) - (dividend_lo != 0));\r
- dividend_lo = (uint)MASK_OUT_ABOVE_32(-(sint)dividend_lo);\r
- }\r
- if(GET_MSB_32(divisor))\r
- {\r
- divisor_neg = 1;\r
- divisor = (uint)MASK_OUT_ABOVE_32(-(sint)divisor);\r
-\r
- }\r
- }\r
-\r
- /* if the upper long is greater than the divisor, we're overflowing. */\r
- if(dividend_hi >= divisor)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
-\r
- for(i = 31; i >= 0; i--)\r
- {\r
- quotient <<= 1;\r
- remainder = (remainder << 1) + ((dividend_hi >> i) & 1);\r
- if(remainder >= divisor)\r
- {\r
- remainder -= divisor;\r
- quotient++;\r
- }\r
- }\r
- for(i = 31; i >= 0; i--)\r
- {\r
- quotient <<= 1;\r
- overflow = GET_MSB_32(remainder);\r
- remainder = (remainder << 1) + ((dividend_lo >> i) & 1);\r
- if(remainder >= divisor || overflow)\r
- {\r
- remainder -= divisor;\r
- quotient++;\r
- }\r
- }\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- if(quotient > 0x7fffffff)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- if(dividend_neg)\r
- {\r
- remainder = (uint)MASK_OUT_ABOVE_32(-(sint)remainder);\r
- quotient = (uint)MASK_OUT_ABOVE_32(-(sint)quotient);\r
- }\r
- if(divisor_neg)\r
- quotient = (uint)MASK_OUT_ABOVE_32(-(sint)quotient);\r
- }\r
-\r
- REG_D[word2 & 7] = remainder;\r
- REG_D[(word2 >> 12) & 7] = quotient;\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- /* long / long: long quotient, maybe long remainder */\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- /* Special case in divide */\r
- if(dividend_lo == 0x80000000 && divisor == 0xffffffff)\r
- {\r
- FLAG_N = NFLAG_SET;\r
- FLAG_Z = ZFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- REG_D[(word2 >> 12) & 7] = 0x80000000;\r
- REG_D[word2 & 7] = 0;\r
- return;\r
- }\r
- REG_D[word2 & 7] = MAKE_INT_32(dividend_lo) % MAKE_INT_32(divisor);\r
- quotient = REG_D[(word2 >> 12) & 7] = MAKE_INT_32(dividend_lo) / MAKE_INT_32(divisor);\r
- }\r
- else\r
- {\r
- REG_D[word2 & 7] = MASK_OUT_ABOVE_32(dividend_lo) % MASK_OUT_ABOVE_32(divisor);\r
- quotient = REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(dividend_lo) / MASK_OUT_ABOVE_32(divisor);\r
- }\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#endif\r
-}\r
-\r
-\r
-void m68k_op_divl_32_pcdi(void)\r
-{\r
-#if M68K_USE_64_BIT\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint64 divisor = OPER_PCDI_32();\r
- uint64 dividend = 0;\r
- uint64 quotient = 0;\r
- uint64 remainder = 0;\r
-\r
- if(divisor != 0)\r
- {\r
- if(BIT_A(word2)) /* 64 bit */\r
- {\r
- dividend = REG_D[word2 & 7];\r
- dividend <<= 32;\r
- dividend |= REG_D[(word2 >> 12) & 7];\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- quotient = (uint64)((sint64)dividend / (sint64)((sint32)divisor));\r
- remainder = (uint64)((sint64)dividend % (sint64)((sint32)divisor));\r
- if((sint64)quotient != (sint64)((sint32)quotient))\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- }\r
- else /* unsigned */\r
- {\r
- quotient = dividend / divisor;\r
- if(quotient > 0xffffffff)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- remainder = dividend % divisor;\r
- }\r
- }\r
- else /* 32 bit */\r
- {\r
- dividend = REG_D[(word2 >> 12) & 7];\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- quotient = (uint64)((sint64)((sint32)dividend) / (sint64)((sint32)divisor));\r
- remainder = (uint64)((sint64)((sint32)dividend) % (sint64)((sint32)divisor));\r
- }\r
- else /* unsigned */\r
- {\r
- quotient = dividend / divisor;\r
- remainder = dividend % divisor;\r
- }\r
- }\r
-\r
- REG_D[word2 & 7] = remainder;\r
- REG_D[(word2 >> 12) & 7] = quotient;\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#else\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint divisor = OPER_PCDI_32();\r
- uint dividend_hi = REG_D[word2 & 7];\r
- uint dividend_lo = REG_D[(word2 >> 12) & 7];\r
- uint quotient = 0;\r
- uint remainder = 0;\r
- uint dividend_neg = 0;\r
- uint divisor_neg = 0;\r
- sint i;\r
- uint overflow;\r
-\r
- if(divisor != 0)\r
- {\r
- /* quad / long : long quotient, long remainder */\r
- if(BIT_A(word2))\r
- {\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- /* special case in signed divide */\r
- if(dividend_hi == 0 && dividend_lo == 0x80000000 && divisor == 0xffffffff)\r
- {\r
- REG_D[word2 & 7] = 0;\r
- REG_D[(word2 >> 12) & 7] = 0x80000000;\r
-\r
- FLAG_N = NFLAG_SET;\r
- FLAG_Z = ZFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- if(GET_MSB_32(dividend_hi))\r
- {\r
- dividend_neg = 1;\r
- dividend_hi = (uint)MASK_OUT_ABOVE_32((-(sint)dividend_hi) - (dividend_lo != 0));\r
- dividend_lo = (uint)MASK_OUT_ABOVE_32(-(sint)dividend_lo);\r
- }\r
- if(GET_MSB_32(divisor))\r
- {\r
- divisor_neg = 1;\r
- divisor = (uint)MASK_OUT_ABOVE_32(-(sint)divisor);\r
-\r
- }\r
- }\r
-\r
- /* if the upper long is greater than the divisor, we're overflowing. */\r
- if(dividend_hi >= divisor)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
-\r
- for(i = 31; i >= 0; i--)\r
- {\r
- quotient <<= 1;\r
- remainder = (remainder << 1) + ((dividend_hi >> i) & 1);\r
- if(remainder >= divisor)\r
- {\r
- remainder -= divisor;\r
- quotient++;\r
- }\r
- }\r
- for(i = 31; i >= 0; i--)\r
- {\r
- quotient <<= 1;\r
- overflow = GET_MSB_32(remainder);\r
- remainder = (remainder << 1) + ((dividend_lo >> i) & 1);\r
- if(remainder >= divisor || overflow)\r
- {\r
- remainder -= divisor;\r
- quotient++;\r
- }\r
- }\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- if(quotient > 0x7fffffff)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- if(dividend_neg)\r
- {\r
- remainder = (uint)MASK_OUT_ABOVE_32(-(sint)remainder);\r
- quotient = (uint)MASK_OUT_ABOVE_32(-(sint)quotient);\r
- }\r
- if(divisor_neg)\r
- quotient = (uint)MASK_OUT_ABOVE_32(-(sint)quotient);\r
- }\r
-\r
- REG_D[word2 & 7] = remainder;\r
- REG_D[(word2 >> 12) & 7] = quotient;\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- /* long / long: long quotient, maybe long remainder */\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- /* Special case in divide */\r
- if(dividend_lo == 0x80000000 && divisor == 0xffffffff)\r
- {\r
- FLAG_N = NFLAG_SET;\r
- FLAG_Z = ZFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- REG_D[(word2 >> 12) & 7] = 0x80000000;\r
- REG_D[word2 & 7] = 0;\r
- return;\r
- }\r
- REG_D[word2 & 7] = MAKE_INT_32(dividend_lo) % MAKE_INT_32(divisor);\r
- quotient = REG_D[(word2 >> 12) & 7] = MAKE_INT_32(dividend_lo) / MAKE_INT_32(divisor);\r
- }\r
- else\r
- {\r
- REG_D[word2 & 7] = MASK_OUT_ABOVE_32(dividend_lo) % MASK_OUT_ABOVE_32(divisor);\r
- quotient = REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(dividend_lo) / MASK_OUT_ABOVE_32(divisor);\r
- }\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#endif\r
-}\r
-\r
-\r
-void m68k_op_divl_32_pcix(void)\r
-{\r
-#if M68K_USE_64_BIT\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint64 divisor = OPER_PCIX_32();\r
- uint64 dividend = 0;\r
- uint64 quotient = 0;\r
- uint64 remainder = 0;\r
-\r
- if(divisor != 0)\r
- {\r
- if(BIT_A(word2)) /* 64 bit */\r
- {\r
- dividend = REG_D[word2 & 7];\r
- dividend <<= 32;\r
- dividend |= REG_D[(word2 >> 12) & 7];\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- quotient = (uint64)((sint64)dividend / (sint64)((sint32)divisor));\r
- remainder = (uint64)((sint64)dividend % (sint64)((sint32)divisor));\r
- if((sint64)quotient != (sint64)((sint32)quotient))\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- }\r
- else /* unsigned */\r
- {\r
- quotient = dividend / divisor;\r
- if(quotient > 0xffffffff)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- remainder = dividend % divisor;\r
- }\r
- }\r
- else /* 32 bit */\r
- {\r
- dividend = REG_D[(word2 >> 12) & 7];\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- quotient = (uint64)((sint64)((sint32)dividend) / (sint64)((sint32)divisor));\r
- remainder = (uint64)((sint64)((sint32)dividend) % (sint64)((sint32)divisor));\r
- }\r
- else /* unsigned */\r
- {\r
- quotient = dividend / divisor;\r
- remainder = dividend % divisor;\r
- }\r
- }\r
-\r
- REG_D[word2 & 7] = remainder;\r
- REG_D[(word2 >> 12) & 7] = quotient;\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#else\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint divisor = OPER_PCIX_32();\r
- uint dividend_hi = REG_D[word2 & 7];\r
- uint dividend_lo = REG_D[(word2 >> 12) & 7];\r
- uint quotient = 0;\r
- uint remainder = 0;\r
- uint dividend_neg = 0;\r
- uint divisor_neg = 0;\r
- sint i;\r
- uint overflow;\r
-\r
- if(divisor != 0)\r
- {\r
- /* quad / long : long quotient, long remainder */\r
- if(BIT_A(word2))\r
- {\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- /* special case in signed divide */\r
- if(dividend_hi == 0 && dividend_lo == 0x80000000 && divisor == 0xffffffff)\r
- {\r
- REG_D[word2 & 7] = 0;\r
- REG_D[(word2 >> 12) & 7] = 0x80000000;\r
-\r
- FLAG_N = NFLAG_SET;\r
- FLAG_Z = ZFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- if(GET_MSB_32(dividend_hi))\r
- {\r
- dividend_neg = 1;\r
- dividend_hi = (uint)MASK_OUT_ABOVE_32((-(sint)dividend_hi) - (dividend_lo != 0));\r
- dividend_lo = (uint)MASK_OUT_ABOVE_32(-(sint)dividend_lo);\r
- }\r
- if(GET_MSB_32(divisor))\r
- {\r
- divisor_neg = 1;\r
- divisor = (uint)MASK_OUT_ABOVE_32(-(sint)divisor);\r
-\r
- }\r
- }\r
-\r
- /* if the upper long is greater than the divisor, we're overflowing. */\r
- if(dividend_hi >= divisor)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
-\r
- for(i = 31; i >= 0; i--)\r
- {\r
- quotient <<= 1;\r
- remainder = (remainder << 1) + ((dividend_hi >> i) & 1);\r
- if(remainder >= divisor)\r
- {\r
- remainder -= divisor;\r
- quotient++;\r
- }\r
- }\r
- for(i = 31; i >= 0; i--)\r
- {\r
- quotient <<= 1;\r
- overflow = GET_MSB_32(remainder);\r
- remainder = (remainder << 1) + ((dividend_lo >> i) & 1);\r
- if(remainder >= divisor || overflow)\r
- {\r
- remainder -= divisor;\r
- quotient++;\r
- }\r
- }\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- if(quotient > 0x7fffffff)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- if(dividend_neg)\r
- {\r
- remainder = (uint)MASK_OUT_ABOVE_32(-(sint)remainder);\r
- quotient = (uint)MASK_OUT_ABOVE_32(-(sint)quotient);\r
- }\r
- if(divisor_neg)\r
- quotient = (uint)MASK_OUT_ABOVE_32(-(sint)quotient);\r
- }\r
-\r
- REG_D[word2 & 7] = remainder;\r
- REG_D[(word2 >> 12) & 7] = quotient;\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- /* long / long: long quotient, maybe long remainder */\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- /* Special case in divide */\r
- if(dividend_lo == 0x80000000 && divisor == 0xffffffff)\r
- {\r
- FLAG_N = NFLAG_SET;\r
- FLAG_Z = ZFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- REG_D[(word2 >> 12) & 7] = 0x80000000;\r
- REG_D[word2 & 7] = 0;\r
- return;\r
- }\r
- REG_D[word2 & 7] = MAKE_INT_32(dividend_lo) % MAKE_INT_32(divisor);\r
- quotient = REG_D[(word2 >> 12) & 7] = MAKE_INT_32(dividend_lo) / MAKE_INT_32(divisor);\r
- }\r
- else\r
- {\r
- REG_D[word2 & 7] = MASK_OUT_ABOVE_32(dividend_lo) % MASK_OUT_ABOVE_32(divisor);\r
- quotient = REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(dividend_lo) / MASK_OUT_ABOVE_32(divisor);\r
- }\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#endif\r
-}\r
-\r
-\r
-void m68k_op_divl_32_i(void)\r
-{\r
-#if M68K_USE_64_BIT\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint64 divisor = OPER_I_32();\r
- uint64 dividend = 0;\r
- uint64 quotient = 0;\r
- uint64 remainder = 0;\r
-\r
- if(divisor != 0)\r
- {\r
- if(BIT_A(word2)) /* 64 bit */\r
- {\r
- dividend = REG_D[word2 & 7];\r
- dividend <<= 32;\r
- dividend |= REG_D[(word2 >> 12) & 7];\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- quotient = (uint64)((sint64)dividend / (sint64)((sint32)divisor));\r
- remainder = (uint64)((sint64)dividend % (sint64)((sint32)divisor));\r
- if((sint64)quotient != (sint64)((sint32)quotient))\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- }\r
- else /* unsigned */\r
- {\r
- quotient = dividend / divisor;\r
- if(quotient > 0xffffffff)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- remainder = dividend % divisor;\r
- }\r
- }\r
- else /* 32 bit */\r
- {\r
- dividend = REG_D[(word2 >> 12) & 7];\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- quotient = (uint64)((sint64)((sint32)dividend) / (sint64)((sint32)divisor));\r
- remainder = (uint64)((sint64)((sint32)dividend) % (sint64)((sint32)divisor));\r
- }\r
- else /* unsigned */\r
- {\r
- quotient = dividend / divisor;\r
- remainder = dividend % divisor;\r
- }\r
- }\r
-\r
- REG_D[word2 & 7] = remainder;\r
- REG_D[(word2 >> 12) & 7] = quotient;\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#else\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint divisor = OPER_I_32();\r
- uint dividend_hi = REG_D[word2 & 7];\r
- uint dividend_lo = REG_D[(word2 >> 12) & 7];\r
- uint quotient = 0;\r
- uint remainder = 0;\r
- uint dividend_neg = 0;\r
- uint divisor_neg = 0;\r
- sint i;\r
- uint overflow;\r
-\r
- if(divisor != 0)\r
- {\r
- /* quad / long : long quotient, long remainder */\r
- if(BIT_A(word2))\r
- {\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- /* special case in signed divide */\r
- if(dividend_hi == 0 && dividend_lo == 0x80000000 && divisor == 0xffffffff)\r
- {\r
- REG_D[word2 & 7] = 0;\r
- REG_D[(word2 >> 12) & 7] = 0x80000000;\r
-\r
- FLAG_N = NFLAG_SET;\r
- FLAG_Z = ZFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- if(GET_MSB_32(dividend_hi))\r
- {\r
- dividend_neg = 1;\r
- dividend_hi = (uint)MASK_OUT_ABOVE_32((-(sint)dividend_hi) - (dividend_lo != 0));\r
- dividend_lo = (uint)MASK_OUT_ABOVE_32(-(sint)dividend_lo);\r
- }\r
- if(GET_MSB_32(divisor))\r
- {\r
- divisor_neg = 1;\r
- divisor = (uint)MASK_OUT_ABOVE_32(-(sint)divisor);\r
-\r
- }\r
- }\r
-\r
- /* if the upper long is greater than the divisor, we're overflowing. */\r
- if(dividend_hi >= divisor)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
-\r
- for(i = 31; i >= 0; i--)\r
- {\r
- quotient <<= 1;\r
- remainder = (remainder << 1) + ((dividend_hi >> i) & 1);\r
- if(remainder >= divisor)\r
- {\r
- remainder -= divisor;\r
- quotient++;\r
- }\r
- }\r
- for(i = 31; i >= 0; i--)\r
- {\r
- quotient <<= 1;\r
- overflow = GET_MSB_32(remainder);\r
- remainder = (remainder << 1) + ((dividend_lo >> i) & 1);\r
- if(remainder >= divisor || overflow)\r
- {\r
- remainder -= divisor;\r
- quotient++;\r
- }\r
- }\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- if(quotient > 0x7fffffff)\r
- {\r
- FLAG_V = VFLAG_SET;\r
- return;\r
- }\r
- if(dividend_neg)\r
- {\r
- remainder = (uint)MASK_OUT_ABOVE_32(-(sint)remainder);\r
- quotient = (uint)MASK_OUT_ABOVE_32(-(sint)quotient);\r
- }\r
- if(divisor_neg)\r
- quotient = (uint)MASK_OUT_ABOVE_32(-(sint)quotient);\r
- }\r
-\r
- REG_D[word2 & 7] = remainder;\r
- REG_D[(word2 >> 12) & 7] = quotient;\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- /* long / long: long quotient, maybe long remainder */\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- /* Special case in divide */\r
- if(dividend_lo == 0x80000000 && divisor == 0xffffffff)\r
- {\r
- FLAG_N = NFLAG_SET;\r
- FLAG_Z = ZFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- REG_D[(word2 >> 12) & 7] = 0x80000000;\r
- REG_D[word2 & 7] = 0;\r
- return;\r
- }\r
- REG_D[word2 & 7] = MAKE_INT_32(dividend_lo) % MAKE_INT_32(divisor);\r
- quotient = REG_D[(word2 >> 12) & 7] = MAKE_INT_32(dividend_lo) / MAKE_INT_32(divisor);\r
- }\r
- else\r
- {\r
- REG_D[word2 & 7] = MASK_OUT_ABOVE_32(dividend_lo) % MASK_OUT_ABOVE_32(divisor);\r
- quotient = REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(dividend_lo) / MASK_OUT_ABOVE_32(divisor);\r
- }\r
-\r
- FLAG_N = NFLAG_32(quotient);\r
- FLAG_Z = quotient;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_ZERO_DIVIDE);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#endif\r
-}\r
-\r
-\r
-void m68k_op_eor_8_d(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_8(DY ^= MASK_OUT_ABOVE_8(DX));\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eor_8_ai(void)\r
-{\r
- uint ea = EA_AY_AI_8();\r
- uint res = MASK_OUT_ABOVE_8(DX ^ m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eor_8_pi(void)\r
-{\r
- uint ea = EA_AY_PI_8();\r
- uint res = MASK_OUT_ABOVE_8(DX ^ m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eor_8_pi7(void)\r
-{\r
- uint ea = EA_A7_PI_8();\r
- uint res = MASK_OUT_ABOVE_8(DX ^ m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eor_8_pd(void)\r
-{\r
- uint ea = EA_AY_PD_8();\r
- uint res = MASK_OUT_ABOVE_8(DX ^ m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eor_8_pd7(void)\r
-{\r
- uint ea = EA_A7_PD_8();\r
- uint res = MASK_OUT_ABOVE_8(DX ^ m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eor_8_di(void)\r
-{\r
- uint ea = EA_AY_DI_8();\r
- uint res = MASK_OUT_ABOVE_8(DX ^ m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eor_8_ix(void)\r
-{\r
- uint ea = EA_AY_IX_8();\r
- uint res = MASK_OUT_ABOVE_8(DX ^ m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eor_8_aw(void)\r
-{\r
- uint ea = EA_AW_8();\r
- uint res = MASK_OUT_ABOVE_8(DX ^ m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eor_8_al(void)\r
-{\r
- uint ea = EA_AL_8();\r
- uint res = MASK_OUT_ABOVE_8(DX ^ m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eor_16_d(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16(DY ^= MASK_OUT_ABOVE_16(DX));\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eor_16_ai(void)\r
-{\r
- uint ea = EA_AY_AI_16();\r
- uint res = MASK_OUT_ABOVE_16(DX ^ m68ki_read_16(ea));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eor_16_pi(void)\r
-{\r
- uint ea = EA_AY_PI_16();\r
- uint res = MASK_OUT_ABOVE_16(DX ^ m68ki_read_16(ea));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eor_16_pd(void)\r
-{\r
- uint ea = EA_AY_PD_16();\r
- uint res = MASK_OUT_ABOVE_16(DX ^ m68ki_read_16(ea));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eor_16_di(void)\r
-{\r
- uint ea = EA_AY_DI_16();\r
- uint res = MASK_OUT_ABOVE_16(DX ^ m68ki_read_16(ea));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eor_16_ix(void)\r
-{\r
- uint ea = EA_AY_IX_16();\r
- uint res = MASK_OUT_ABOVE_16(DX ^ m68ki_read_16(ea));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eor_16_aw(void)\r
-{\r
- uint ea = EA_AW_16();\r
- uint res = MASK_OUT_ABOVE_16(DX ^ m68ki_read_16(ea));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eor_16_al(void)\r
-{\r
- uint ea = EA_AL_16();\r
- uint res = MASK_OUT_ABOVE_16(DX ^ m68ki_read_16(ea));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eor_32_d(void)\r
-{\r
- uint res = DY ^= DX;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eor_32_ai(void)\r
-{\r
- uint ea = EA_AY_AI_32();\r
- uint res = DX ^ m68ki_read_32(ea);\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eor_32_pi(void)\r
-{\r
- uint ea = EA_AY_PI_32();\r
- uint res = DX ^ m68ki_read_32(ea);\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eor_32_pd(void)\r
-{\r
- uint ea = EA_AY_PD_32();\r
- uint res = DX ^ m68ki_read_32(ea);\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eor_32_di(void)\r
-{\r
- uint ea = EA_AY_DI_32();\r
- uint res = DX ^ m68ki_read_32(ea);\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eor_32_ix(void)\r
-{\r
- uint ea = EA_AY_IX_32();\r
- uint res = DX ^ m68ki_read_32(ea);\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eor_32_aw(void)\r
-{\r
- uint ea = EA_AW_32();\r
- uint res = DX ^ m68ki_read_32(ea);\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eor_32_al(void)\r
-{\r
- uint ea = EA_AL_32();\r
- uint res = DX ^ m68ki_read_32(ea);\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eori_8_d(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_8(DY ^= OPER_I_8());\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eori_8_ai(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AY_AI_8();\r
- uint res = src ^ m68ki_read_8(ea);\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eori_8_pi(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AY_PI_8();\r
- uint res = src ^ m68ki_read_8(ea);\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eori_8_pi7(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_A7_PI_8();\r
- uint res = src ^ m68ki_read_8(ea);\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eori_8_pd(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AY_PD_8();\r
- uint res = src ^ m68ki_read_8(ea);\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eori_8_pd7(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_A7_PD_8();\r
- uint res = src ^ m68ki_read_8(ea);\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eori_8_di(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AY_DI_8();\r
- uint res = src ^ m68ki_read_8(ea);\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eori_8_ix(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AY_IX_8();\r
- uint res = src ^ m68ki_read_8(ea);\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eori_8_aw(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AW_8();\r
- uint res = src ^ m68ki_read_8(ea);\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eori_8_al(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AL_8();\r
- uint res = src ^ m68ki_read_8(ea);\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eori_16_d(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16(DY ^= OPER_I_16());\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eori_16_ai(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AY_AI_16();\r
- uint res = src ^ m68ki_read_16(ea);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eori_16_pi(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AY_PI_16();\r
- uint res = src ^ m68ki_read_16(ea);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eori_16_pd(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AY_PD_16();\r
- uint res = src ^ m68ki_read_16(ea);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eori_16_di(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AY_DI_16();\r
- uint res = src ^ m68ki_read_16(ea);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eori_16_ix(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AY_IX_16();\r
- uint res = src ^ m68ki_read_16(ea);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eori_16_aw(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AW_16();\r
- uint res = src ^ m68ki_read_16(ea);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eori_16_al(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AL_16();\r
- uint res = src ^ m68ki_read_16(ea);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eori_32_d(void)\r
-{\r
- uint res = DY ^= OPER_I_32();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eori_32_ai(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AY_AI_32();\r
- uint res = src ^ m68ki_read_32(ea);\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eori_32_pi(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AY_PI_32();\r
- uint res = src ^ m68ki_read_32(ea);\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eori_32_pd(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AY_PD_32();\r
- uint res = src ^ m68ki_read_32(ea);\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eori_32_di(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AY_DI_32();\r
- uint res = src ^ m68ki_read_32(ea);\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eori_32_ix(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AY_IX_32();\r
- uint res = src ^ m68ki_read_32(ea);\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eori_32_aw(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AW_32();\r
- uint res = src ^ m68ki_read_32(ea);\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eori_32_al(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AL_32();\r
- uint res = src ^ m68ki_read_32(ea);\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_eori_16_toc(void)\r
-{\r
- m68ki_set_ccr(m68ki_get_ccr() ^ OPER_I_16());\r
-}\r
-\r
-\r
-void m68k_op_eori_16_tos(void)\r
-{\r
- if(FLAG_S)\r
- {\r
- uint src = OPER_I_16();\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_set_sr(m68ki_get_sr() ^ src);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
-}\r
-\r
-\r
-void m68k_op_exg_32_dd(void)\r
-{\r
- uint* reg_a = &DX;\r
- uint* reg_b = &DY;\r
- uint tmp = *reg_a;\r
- *reg_a = *reg_b;\r
- *reg_b = tmp;\r
-}\r
-\r
-\r
-void m68k_op_exg_32_aa(void)\r
-{\r
- uint* reg_a = &AX;\r
- uint* reg_b = &AY;\r
- uint tmp = *reg_a;\r
- *reg_a = *reg_b;\r
- *reg_b = tmp;\r
-}\r
-\r
-\r
-void m68k_op_exg_32_da(void)\r
-{\r
- uint* reg_a = &DX;\r
- uint* reg_b = &AY;\r
- uint tmp = *reg_a;\r
- *reg_a = *reg_b;\r
- *reg_b = tmp;\r
-}\r
-\r
-\r
-void m68k_op_ext_16(void)\r
-{\r
- uint* r_dst = &DY;\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | MASK_OUT_ABOVE_8(*r_dst) | (GET_MSB_8(*r_dst) ? 0xff00 : 0);\r
-\r
- FLAG_N = NFLAG_16(*r_dst);\r
- FLAG_Z = MASK_OUT_ABOVE_16(*r_dst);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ext_32(void)\r
-{\r
- uint* r_dst = &DY;\r
-\r
- *r_dst = MASK_OUT_ABOVE_16(*r_dst) | (GET_MSB_16(*r_dst) ? 0xffff0000 : 0);\r
-\r
- FLAG_N = NFLAG_32(*r_dst);\r
- FLAG_Z = *r_dst;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_extb_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint* r_dst = &DY;\r
-\r
- *r_dst = MASK_OUT_ABOVE_8(*r_dst) | (GET_MSB_8(*r_dst) ? 0xffffff00 : 0);\r
-\r
- FLAG_N = NFLAG_32(*r_dst);\r
- FLAG_Z = *r_dst;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_illegal(void)\r
-{\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_jmp_32_ai(void)\r
-{\r
- m68ki_jump(EA_AY_AI_32());\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(REG_PC == REG_PPC)\r
- USE_ALL_CYCLES();\r
-}\r
-\r
-\r
-void m68k_op_jmp_32_di(void)\r
-{\r
- m68ki_jump(EA_AY_DI_32());\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(REG_PC == REG_PPC)\r
- USE_ALL_CYCLES();\r
-}\r
-\r
-\r
-void m68k_op_jmp_32_ix(void)\r
-{\r
- m68ki_jump(EA_AY_IX_32());\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(REG_PC == REG_PPC)\r
- USE_ALL_CYCLES();\r
-}\r
-\r
-\r
-void m68k_op_jmp_32_aw(void)\r
-{\r
- m68ki_jump(EA_AW_32());\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(REG_PC == REG_PPC)\r
- USE_ALL_CYCLES();\r
-}\r
-\r
-\r
-void m68k_op_jmp_32_al(void)\r
-{\r
- m68ki_jump(EA_AL_32());\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(REG_PC == REG_PPC)\r
- USE_ALL_CYCLES();\r
-}\r
-\r
-\r
-void m68k_op_jmp_32_pcdi(void)\r
-{\r
- m68ki_jump(EA_PCDI_32());\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(REG_PC == REG_PPC)\r
- USE_ALL_CYCLES();\r
-}\r
-\r
-\r
-void m68k_op_jmp_32_pcix(void)\r
-{\r
- m68ki_jump(EA_PCIX_32());\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(REG_PC == REG_PPC)\r
- USE_ALL_CYCLES();\r
-}\r
-\r
-\r
-void m68k_op_jsr_32_ai(void)\r
-{\r
- uint ea = EA_AY_AI_32();\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_push_32(MAKE_INT_24(REG_PC)); // notaz: Cyclone can't handle 32bit PC and I neet to debug it\r
- m68ki_jump(ea);\r
-}\r
-\r
-\r
-void m68k_op_jsr_32_di(void)\r
-{\r
- uint ea = EA_AY_DI_32();\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_push_32(MAKE_INT_24(REG_PC)); // notaz: Cyclone can't handle 32bit PC and I neet to debug it\r
- m68ki_jump(ea);\r
-}\r
-\r
-\r
-void m68k_op_jsr_32_ix(void)\r
-{\r
- uint ea = EA_AY_IX_32();\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_push_32(MAKE_INT_24(REG_PC)); // notaz: Cyclone can't handle 32bit PC and I neet to debug it\r
- m68ki_jump(ea);\r
-}\r
-\r
-\r
-void m68k_op_jsr_32_aw(void)\r
-{\r
- uint ea = EA_AW_32();\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_push_32(MAKE_INT_24(REG_PC)); // notaz: Cyclone can't handle 32bit PC and I neet to debug it\r
- m68ki_jump(ea);\r
-}\r
-\r
-\r
-void m68k_op_jsr_32_al(void)\r
-{\r
- uint ea = EA_AL_32();\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_push_32(MAKE_INT_24(REG_PC)); // notaz: Cyclone can't handle 32bit PC and I neet to debug it\r
- m68ki_jump(ea);\r
-}\r
-\r
-\r
-void m68k_op_jsr_32_pcdi(void)\r
-{\r
- uint ea = EA_PCDI_32();\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_push_32(MAKE_INT_24(REG_PC)); // notaz: Cyclone can't handle 32bit PC and I neet to debug it\r
- m68ki_jump(ea);\r
-}\r
-\r
-\r
-void m68k_op_jsr_32_pcix(void)\r
-{\r
- uint ea = EA_PCIX_32();\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_push_32(MAKE_INT_24(REG_PC)); // notaz: Cyclone can't handle 32bit PC and I neet to debug it\r
- m68ki_jump(ea);\r
-}\r
-\r
-\r
-void m68k_op_lea_32_ai(void)\r
-{\r
- AX = EA_AY_AI_32();\r
-}\r
-\r
-\r
-void m68k_op_lea_32_di(void)\r
-{\r
- AX = EA_AY_DI_32();\r
-}\r
-\r
-\r
-void m68k_op_lea_32_ix(void)\r
-{\r
- AX = EA_AY_IX_32();\r
-}\r
-\r
-\r
-void m68k_op_lea_32_aw(void)\r
-{\r
- AX = EA_AW_32();\r
-}\r
-\r
-\r
-void m68k_op_lea_32_al(void)\r
-{\r
- AX = EA_AL_32();\r
-}\r
-\r
-\r
-void m68k_op_lea_32_pcdi(void)\r
-{\r
- AX = EA_PCDI_32();\r
-}\r
-\r
-\r
-void m68k_op_lea_32_pcix(void)\r
-{\r
- AX = EA_PCIX_32();\r
-}\r
-\r
-\r
-void m68k_op_link_16_a7(void)\r
-{\r
- REG_A[7] -= 4;\r
- m68ki_write_32(REG_A[7], REG_A[7]);\r
- REG_A[7] = MASK_OUT_ABOVE_32(REG_A[7] + MAKE_INT_16(OPER_I_16()));\r
-}\r
-\r
-\r
-void m68k_op_link_16(void)\r
-{\r
- uint* r_dst = &AY;\r
-\r
- m68ki_push_32(*r_dst);\r
- *r_dst = REG_A[7];\r
- REG_A[7] = MASK_OUT_ABOVE_32(REG_A[7] + MAKE_INT_16(OPER_I_16()));\r
-}\r
-\r
-\r
-void m68k_op_link_32_a7(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- REG_A[7] -= 4;\r
- m68ki_write_32(REG_A[7], REG_A[7]);\r
- REG_A[7] = MASK_OUT_ABOVE_32(REG_A[7] + OPER_I_32());\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_link_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint* r_dst = &AY;\r
-\r
- m68ki_push_32(*r_dst);\r
- *r_dst = REG_A[7];\r
- REG_A[7] = MASK_OUT_ABOVE_32(REG_A[7] + OPER_I_32());\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_lsr_8_s(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint src = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = src >> shift;\r
-\r
- if(shift != 0)\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_Z = res;\r
- FLAG_X = FLAG_C = src << (9-shift);\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_lsr_16_s(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint src = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = src >> shift;\r
-\r
- if(shift != 0)\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_Z = res;\r
- FLAG_X = FLAG_C = src << (9-shift);\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_lsr_32_s(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint src = *r_dst;\r
- uint res = src >> shift;\r
-\r
- if(shift != 0)\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- *r_dst = res;\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_Z = res;\r
- FLAG_X = FLAG_C = src << (9-shift);\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_lsr_8_r(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = DX & 0x3f;\r
- uint src = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = src >> shift;\r
-\r
- if(shift != 0)\r
- {\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- if(shift <= 8)\r
- {\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
- FLAG_X = FLAG_C = src << (9-shift);\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- *r_dst &= 0xffffff00;\r
- FLAG_X = XFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_N = NFLAG_8(src);\r
- FLAG_Z = src;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_lsr_16_r(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = DX & 0x3f;\r
- uint src = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = src >> shift;\r
-\r
- if(shift != 0)\r
- {\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- if(shift <= 16)\r
- {\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
- FLAG_C = FLAG_X = (src >> (shift - 1))<<8;\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- *r_dst &= 0xffff0000;\r
- FLAG_X = XFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_N = NFLAG_16(src);\r
- FLAG_Z = src;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_lsr_32_r(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = DX & 0x3f;\r
- uint src = *r_dst;\r
- uint res = src >> shift;\r
-\r
- if(shift != 0)\r
- {\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- if(shift < 32)\r
- {\r
- *r_dst = res;\r
- FLAG_C = FLAG_X = (src >> (shift - 1))<<8;\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- *r_dst = 0;\r
- FLAG_X = FLAG_C = (shift == 32 ? GET_MSB_32(src)>>23 : 0);\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_N = NFLAG_32(src);\r
- FLAG_Z = src;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_lsr_16_ai(void)\r
-{\r
- uint ea = EA_AY_AI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = src >> 1;\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_Z = res;\r
- FLAG_C = FLAG_X = src << 8;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_lsr_16_pi(void)\r
-{\r
- uint ea = EA_AY_PI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = src >> 1;\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_Z = res;\r
- FLAG_C = FLAG_X = src << 8;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_lsr_16_pd(void)\r
-{\r
- uint ea = EA_AY_PD_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = src >> 1;\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_Z = res;\r
- FLAG_C = FLAG_X = src << 8;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_lsr_16_di(void)\r
-{\r
- uint ea = EA_AY_DI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = src >> 1;\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_Z = res;\r
- FLAG_C = FLAG_X = src << 8;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_lsr_16_ix(void)\r
-{\r
- uint ea = EA_AY_IX_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = src >> 1;\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_Z = res;\r
- FLAG_C = FLAG_X = src << 8;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_lsr_16_aw(void)\r
-{\r
- uint ea = EA_AW_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = src >> 1;\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_Z = res;\r
- FLAG_C = FLAG_X = src << 8;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_lsr_16_al(void)\r
-{\r
- uint ea = EA_AL_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = src >> 1;\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_Z = res;\r
- FLAG_C = FLAG_X = src << 8;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_lsl_8_s(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint src = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = MASK_OUT_ABOVE_8(src << shift);\r
-\r
- if(shift != 0)\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_X = FLAG_C = src << shift;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_lsl_16_s(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint src = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = MASK_OUT_ABOVE_16(src << shift);\r
-\r
- if(shift != 0)\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_X = FLAG_C = src >> (8-shift);\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_lsl_32_s(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint src = *r_dst;\r
- uint res = MASK_OUT_ABOVE_32(src << shift);\r
-\r
- if(shift != 0)\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- *r_dst = res;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_X = FLAG_C = src >> (24-shift);\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_lsl_8_r(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = DX & 0x3f;\r
- uint src = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = MASK_OUT_ABOVE_8(src << shift);\r
-\r
- if(shift != 0)\r
- {\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- if(shift <= 8)\r
- {\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
- FLAG_X = FLAG_C = src << shift;\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- *r_dst &= 0xffffff00;\r
- FLAG_X = XFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_N = NFLAG_8(src);\r
- FLAG_Z = src;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_lsl_16_r(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = DX & 0x3f;\r
- uint src = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = MASK_OUT_ABOVE_16(src << shift);\r
-\r
- if(shift != 0)\r
- {\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- if(shift <= 16)\r
- {\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
- FLAG_X = FLAG_C = (src << shift) >> 8;\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- *r_dst &= 0xffff0000;\r
- FLAG_X = XFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_N = NFLAG_16(src);\r
- FLAG_Z = src;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_lsl_32_r(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = DX & 0x3f;\r
- uint src = *r_dst;\r
- uint res = MASK_OUT_ABOVE_32(src << shift);\r
-\r
- if(shift != 0)\r
- {\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- if(shift < 32)\r
- {\r
- *r_dst = res;\r
- FLAG_X = FLAG_C = (src >> (32 - shift)) << 8;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- *r_dst = 0;\r
- FLAG_X = FLAG_C = ((shift == 32 ? src & 1 : 0))<<8;\r
- FLAG_N = NFLAG_CLEAR;\r
- FLAG_Z = ZFLAG_SET;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_N = NFLAG_32(src);\r
- FLAG_Z = src;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_lsl_16_ai(void)\r
-{\r
- uint ea = EA_AY_AI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = MASK_OUT_ABOVE_16(src << 1);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_X = FLAG_C = src >> 7;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_lsl_16_pi(void)\r
-{\r
- uint ea = EA_AY_PI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = MASK_OUT_ABOVE_16(src << 1);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_X = FLAG_C = src >> 7;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_lsl_16_pd(void)\r
-{\r
- uint ea = EA_AY_PD_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = MASK_OUT_ABOVE_16(src << 1);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_X = FLAG_C = src >> 7;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_lsl_16_di(void)\r
-{\r
- uint ea = EA_AY_DI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = MASK_OUT_ABOVE_16(src << 1);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_X = FLAG_C = src >> 7;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_lsl_16_ix(void)\r
-{\r
- uint ea = EA_AY_IX_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = MASK_OUT_ABOVE_16(src << 1);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_X = FLAG_C = src >> 7;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_lsl_16_aw(void)\r
-{\r
- uint ea = EA_AW_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = MASK_OUT_ABOVE_16(src << 1);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_X = FLAG_C = src >> 7;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_lsl_16_al(void)\r
-{\r
- uint ea = EA_AL_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = MASK_OUT_ABOVE_16(src << 1);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_X = FLAG_C = src >> 7;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_d_d(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_8(DY);\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_d_ai(void)\r
-{\r
- uint res = OPER_AY_AI_8();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_d_pi(void)\r
-{\r
- uint res = OPER_AY_PI_8();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_d_pi7(void)\r
-{\r
- uint res = OPER_A7_PI_8();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_d_pd(void)\r
-{\r
- uint res = OPER_AY_PD_8();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_d_pd7(void)\r
-{\r
- uint res = OPER_A7_PD_8();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_d_di(void)\r
-{\r
- uint res = OPER_AY_DI_8();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_d_ix(void)\r
-{\r
- uint res = OPER_AY_IX_8();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_d_aw(void)\r
-{\r
- uint res = OPER_AW_8();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_d_al(void)\r
-{\r
- uint res = OPER_AL_8();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_d_pcdi(void)\r
-{\r
- uint res = OPER_PCDI_8();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_d_pcix(void)\r
-{\r
- uint res = OPER_PCIX_8();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_d_i(void)\r
-{\r
- uint res = OPER_I_8();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_ai_d(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_8(DY);\r
- uint ea = EA_AX_AI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_ai_ai(void)\r
-{\r
- uint res = OPER_AY_AI_8();\r
- uint ea = EA_AX_AI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_ai_pi(void)\r
-{\r
- uint res = OPER_AY_PI_8();\r
- uint ea = EA_AX_AI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_ai_pi7(void)\r
-{\r
- uint res = OPER_A7_PI_8();\r
- uint ea = EA_AX_AI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_ai_pd(void)\r
-{\r
- uint res = OPER_AY_PD_8();\r
- uint ea = EA_AX_AI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_ai_pd7(void)\r
-{\r
- uint res = OPER_A7_PD_8();\r
- uint ea = EA_AX_AI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_ai_di(void)\r
-{\r
- uint res = OPER_AY_DI_8();\r
- uint ea = EA_AX_AI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_ai_ix(void)\r
-{\r
- uint res = OPER_AY_IX_8();\r
- uint ea = EA_AX_AI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_ai_aw(void)\r
-{\r
- uint res = OPER_AW_8();\r
- uint ea = EA_AX_AI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_ai_al(void)\r
-{\r
- uint res = OPER_AL_8();\r
- uint ea = EA_AX_AI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_ai_pcdi(void)\r
-{\r
- uint res = OPER_PCDI_8();\r
- uint ea = EA_AX_AI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_ai_pcix(void)\r
-{\r
- uint res = OPER_PCIX_8();\r
- uint ea = EA_AX_AI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_ai_i(void)\r
-{\r
- uint res = OPER_I_8();\r
- uint ea = EA_AX_AI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pi7_d(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_8(DY);\r
- uint ea = EA_A7_PI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pi_d(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_8(DY);\r
- uint ea = EA_AX_PI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pi7_ai(void)\r
-{\r
- uint res = OPER_AY_AI_8();\r
- uint ea = EA_A7_PI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pi7_pi(void)\r
-{\r
- uint res = OPER_AY_PI_8();\r
- uint ea = EA_A7_PI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pi7_pi7(void)\r
-{\r
- uint res = OPER_A7_PI_8();\r
- uint ea = EA_A7_PI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pi7_pd(void)\r
-{\r
- uint res = OPER_AY_PD_8();\r
- uint ea = EA_A7_PI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pi7_pd7(void)\r
-{\r
- uint res = OPER_A7_PD_8();\r
- uint ea = EA_A7_PI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pi7_di(void)\r
-{\r
- uint res = OPER_AY_DI_8();\r
- uint ea = EA_A7_PI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pi7_ix(void)\r
-{\r
- uint res = OPER_AY_IX_8();\r
- uint ea = EA_A7_PI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pi7_aw(void)\r
-{\r
- uint res = OPER_AW_8();\r
- uint ea = EA_A7_PI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pi7_al(void)\r
-{\r
- uint res = OPER_AL_8();\r
- uint ea = EA_A7_PI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pi7_pcdi(void)\r
-{\r
- uint res = OPER_PCDI_8();\r
- uint ea = EA_A7_PI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pi7_pcix(void)\r
-{\r
- uint res = OPER_PCIX_8();\r
- uint ea = EA_A7_PI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pi7_i(void)\r
-{\r
- uint res = OPER_I_8();\r
- uint ea = EA_A7_PI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pi_ai(void)\r
-{\r
- uint res = OPER_AY_AI_8();\r
- uint ea = EA_AX_PI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pi_pi(void)\r
-{\r
- uint res = OPER_AY_PI_8();\r
- uint ea = EA_AX_PI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pi_pi7(void)\r
-{\r
- uint res = OPER_A7_PI_8();\r
- uint ea = EA_AX_PI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pi_pd(void)\r
-{\r
- uint res = OPER_AY_PD_8();\r
- uint ea = EA_AX_PI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pi_pd7(void)\r
-{\r
- uint res = OPER_A7_PD_8();\r
- uint ea = EA_AX_PI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pi_di(void)\r
-{\r
- uint res = OPER_AY_DI_8();\r
- uint ea = EA_AX_PI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pi_ix(void)\r
-{\r
- uint res = OPER_AY_IX_8();\r
- uint ea = EA_AX_PI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pi_aw(void)\r
-{\r
- uint res = OPER_AW_8();\r
- uint ea = EA_AX_PI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pi_al(void)\r
-{\r
- uint res = OPER_AL_8();\r
- uint ea = EA_AX_PI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pi_pcdi(void)\r
-{\r
- uint res = OPER_PCDI_8();\r
- uint ea = EA_AX_PI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pi_pcix(void)\r
-{\r
- uint res = OPER_PCIX_8();\r
- uint ea = EA_AX_PI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pi_i(void)\r
-{\r
- uint res = OPER_I_8();\r
- uint ea = EA_AX_PI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pd7_d(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_8(DY);\r
- uint ea = EA_A7_PD_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pd_d(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_8(DY);\r
- uint ea = EA_AX_PD_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pd7_ai(void)\r
-{\r
- uint res = OPER_AY_AI_8();\r
- uint ea = EA_A7_PD_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pd7_pi(void)\r
-{\r
- uint res = OPER_AY_PI_8();\r
- uint ea = EA_A7_PD_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pd7_pi7(void)\r
-{\r
- uint res = OPER_A7_PI_8();\r
- uint ea = EA_A7_PD_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pd7_pd(void)\r
-{\r
- uint res = OPER_AY_PD_8();\r
- uint ea = EA_A7_PD_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pd7_pd7(void)\r
-{\r
- uint res = OPER_A7_PD_8();\r
- uint ea = EA_A7_PD_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pd7_di(void)\r
-{\r
- uint res = OPER_AY_DI_8();\r
- uint ea = EA_A7_PD_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pd7_ix(void)\r
-{\r
- uint res = OPER_AY_IX_8();\r
- uint ea = EA_A7_PD_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pd7_aw(void)\r
-{\r
- uint res = OPER_AW_8();\r
- uint ea = EA_A7_PD_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pd7_al(void)\r
-{\r
- uint res = OPER_AL_8();\r
- uint ea = EA_A7_PD_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pd7_pcdi(void)\r
-{\r
- uint res = OPER_PCDI_8();\r
- uint ea = EA_A7_PD_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pd7_pcix(void)\r
-{\r
- uint res = OPER_PCIX_8();\r
- uint ea = EA_A7_PD_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pd7_i(void)\r
-{\r
- uint res = OPER_I_8();\r
- uint ea = EA_A7_PD_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pd_ai(void)\r
-{\r
- uint res = OPER_AY_AI_8();\r
- uint ea = EA_AX_PD_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pd_pi(void)\r
-{\r
- uint res = OPER_AY_PI_8();\r
- uint ea = EA_AX_PD_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pd_pi7(void)\r
-{\r
- uint res = OPER_A7_PI_8();\r
- uint ea = EA_AX_PD_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pd_pd(void)\r
-{\r
- uint res = OPER_AY_PD_8();\r
- uint ea = EA_AX_PD_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pd_pd7(void)\r
-{\r
- uint res = OPER_A7_PD_8();\r
- uint ea = EA_AX_PD_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pd_di(void)\r
-{\r
- uint res = OPER_AY_DI_8();\r
- uint ea = EA_AX_PD_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pd_ix(void)\r
-{\r
- uint res = OPER_AY_IX_8();\r
- uint ea = EA_AX_PD_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pd_aw(void)\r
-{\r
- uint res = OPER_AW_8();\r
- uint ea = EA_AX_PD_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pd_al(void)\r
-{\r
- uint res = OPER_AL_8();\r
- uint ea = EA_AX_PD_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pd_pcdi(void)\r
-{\r
- uint res = OPER_PCDI_8();\r
- uint ea = EA_AX_PD_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pd_pcix(void)\r
-{\r
- uint res = OPER_PCIX_8();\r
- uint ea = EA_AX_PD_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_pd_i(void)\r
-{\r
- uint res = OPER_I_8();\r
- uint ea = EA_AX_PD_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_di_d(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_8(DY);\r
- uint ea = EA_AX_DI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_di_ai(void)\r
-{\r
- uint res = OPER_AY_AI_8();\r
- uint ea = EA_AX_DI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_di_pi(void)\r
-{\r
- uint res = OPER_AY_PI_8();\r
- uint ea = EA_AX_DI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_di_pi7(void)\r
-{\r
- uint res = OPER_A7_PI_8();\r
- uint ea = EA_AX_DI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_di_pd(void)\r
-{\r
- uint res = OPER_AY_PD_8();\r
- uint ea = EA_AX_DI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_di_pd7(void)\r
-{\r
- uint res = OPER_A7_PD_8();\r
- uint ea = EA_AX_DI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_di_di(void)\r
-{\r
- uint res = OPER_AY_DI_8();\r
- uint ea = EA_AX_DI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_di_ix(void)\r
-{\r
- uint res = OPER_AY_IX_8();\r
- uint ea = EA_AX_DI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_di_aw(void)\r
-{\r
- uint res = OPER_AW_8();\r
- uint ea = EA_AX_DI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_di_al(void)\r
-{\r
- uint res = OPER_AL_8();\r
- uint ea = EA_AX_DI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_di_pcdi(void)\r
-{\r
- uint res = OPER_PCDI_8();\r
- uint ea = EA_AX_DI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_di_pcix(void)\r
-{\r
- uint res = OPER_PCIX_8();\r
- uint ea = EA_AX_DI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_di_i(void)\r
-{\r
- uint res = OPER_I_8();\r
- uint ea = EA_AX_DI_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_ix_d(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_8(DY);\r
- uint ea = EA_AX_IX_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_ix_ai(void)\r
-{\r
- uint res = OPER_AY_AI_8();\r
- uint ea = EA_AX_IX_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_ix_pi(void)\r
-{\r
- uint res = OPER_AY_PI_8();\r
- uint ea = EA_AX_IX_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_ix_pi7(void)\r
-{\r
- uint res = OPER_A7_PI_8();\r
- uint ea = EA_AX_IX_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_ix_pd(void)\r
-{\r
- uint res = OPER_AY_PD_8();\r
- uint ea = EA_AX_IX_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_ix_pd7(void)\r
-{\r
- uint res = OPER_A7_PD_8();\r
- uint ea = EA_AX_IX_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_ix_di(void)\r
-{\r
- uint res = OPER_AY_DI_8();\r
- uint ea = EA_AX_IX_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_ix_ix(void)\r
-{\r
- uint res = OPER_AY_IX_8();\r
- uint ea = EA_AX_IX_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_ix_aw(void)\r
-{\r
- uint res = OPER_AW_8();\r
- uint ea = EA_AX_IX_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_ix_al(void)\r
-{\r
- uint res = OPER_AL_8();\r
- uint ea = EA_AX_IX_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_ix_pcdi(void)\r
-{\r
- uint res = OPER_PCDI_8();\r
- uint ea = EA_AX_IX_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_ix_pcix(void)\r
-{\r
- uint res = OPER_PCIX_8();\r
- uint ea = EA_AX_IX_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_ix_i(void)\r
-{\r
- uint res = OPER_I_8();\r
- uint ea = EA_AX_IX_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_aw_d(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_8(DY);\r
- uint ea = EA_AW_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_aw_ai(void)\r
-{\r
- uint res = OPER_AY_AI_8();\r
- uint ea = EA_AW_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_aw_pi(void)\r
-{\r
- uint res = OPER_AY_PI_8();\r
- uint ea = EA_AW_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_aw_pi7(void)\r
-{\r
- uint res = OPER_A7_PI_8();\r
- uint ea = EA_AW_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_aw_pd(void)\r
-{\r
- uint res = OPER_AY_PD_8();\r
- uint ea = EA_AW_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_aw_pd7(void)\r
-{\r
- uint res = OPER_A7_PD_8();\r
- uint ea = EA_AW_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_aw_di(void)\r
-{\r
- uint res = OPER_AY_DI_8();\r
- uint ea = EA_AW_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_aw_ix(void)\r
-{\r
- uint res = OPER_AY_IX_8();\r
- uint ea = EA_AW_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_aw_aw(void)\r
-{\r
- uint res = OPER_AW_8();\r
- uint ea = EA_AW_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_aw_al(void)\r
-{\r
- uint res = OPER_AL_8();\r
- uint ea = EA_AW_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_aw_pcdi(void)\r
-{\r
- uint res = OPER_PCDI_8();\r
- uint ea = EA_AW_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_aw_pcix(void)\r
-{\r
- uint res = OPER_PCIX_8();\r
- uint ea = EA_AW_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_aw_i(void)\r
-{\r
- uint res = OPER_I_8();\r
- uint ea = EA_AW_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_al_d(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_8(DY);\r
- uint ea = EA_AL_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_al_ai(void)\r
-{\r
- uint res = OPER_AY_AI_8();\r
- uint ea = EA_AL_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_al_pi(void)\r
-{\r
- uint res = OPER_AY_PI_8();\r
- uint ea = EA_AL_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_al_pi7(void)\r
-{\r
- uint res = OPER_A7_PI_8();\r
- uint ea = EA_AL_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_al_pd(void)\r
-{\r
- uint res = OPER_AY_PD_8();\r
- uint ea = EA_AL_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_al_pd7(void)\r
-{\r
- uint res = OPER_A7_PD_8();\r
- uint ea = EA_AL_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_al_di(void)\r
-{\r
- uint res = OPER_AY_DI_8();\r
- uint ea = EA_AL_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_al_ix(void)\r
-{\r
- uint res = OPER_AY_IX_8();\r
- uint ea = EA_AL_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_al_aw(void)\r
-{\r
- uint res = OPER_AW_8();\r
- uint ea = EA_AL_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_al_al(void)\r
-{\r
- uint res = OPER_AL_8();\r
- uint ea = EA_AL_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_al_pcdi(void)\r
-{\r
- uint res = OPER_PCDI_8();\r
- uint ea = EA_AL_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_al_pcix(void)\r
-{\r
- uint res = OPER_PCIX_8();\r
- uint ea = EA_AL_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_8_al_i(void)\r
-{\r
- uint res = OPER_I_8();\r
- uint ea = EA_AL_8();\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_d_d(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16(DY);\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_d_a(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16(AY);\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_d_ai(void)\r
-{\r
- uint res = OPER_AY_AI_16();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_d_pi(void)\r
-{\r
- uint res = OPER_AY_PI_16();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_d_pd(void)\r
-{\r
- uint res = OPER_AY_PD_16();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_d_di(void)\r
-{\r
- uint res = OPER_AY_DI_16();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_d_ix(void)\r
-{\r
- uint res = OPER_AY_IX_16();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_d_aw(void)\r
-{\r
- uint res = OPER_AW_16();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_d_al(void)\r
-{\r
- uint res = OPER_AL_16();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_d_pcdi(void)\r
-{\r
- uint res = OPER_PCDI_16();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_d_pcix(void)\r
-{\r
- uint res = OPER_PCIX_16();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_d_i(void)\r
-{\r
- uint res = OPER_I_16();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_ai_d(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16(DY);\r
- uint ea = EA_AX_AI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_ai_a(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16(AY);\r
- uint ea = EA_AX_AI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_ai_ai(void)\r
-{\r
- uint res = OPER_AY_AI_16();\r
- uint ea = EA_AX_AI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_ai_pi(void)\r
-{\r
- uint res = OPER_AY_PI_16();\r
- uint ea = EA_AX_AI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_ai_pd(void)\r
-{\r
- uint res = OPER_AY_PD_16();\r
- uint ea = EA_AX_AI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_ai_di(void)\r
-{\r
- uint res = OPER_AY_DI_16();\r
- uint ea = EA_AX_AI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_ai_ix(void)\r
-{\r
- uint res = OPER_AY_IX_16();\r
- uint ea = EA_AX_AI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_ai_aw(void)\r
-{\r
- uint res = OPER_AW_16();\r
- uint ea = EA_AX_AI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_ai_al(void)\r
-{\r
- uint res = OPER_AL_16();\r
- uint ea = EA_AX_AI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_ai_pcdi(void)\r
-{\r
- uint res = OPER_PCDI_16();\r
- uint ea = EA_AX_AI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_ai_pcix(void)\r
-{\r
- uint res = OPER_PCIX_16();\r
- uint ea = EA_AX_AI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_ai_i(void)\r
-{\r
- uint res = OPER_I_16();\r
- uint ea = EA_AX_AI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_pi_d(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16(DY);\r
- uint ea = EA_AX_PI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_pi_a(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16(AY);\r
- uint ea = EA_AX_PI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_pi_ai(void)\r
-{\r
- uint res = OPER_AY_AI_16();\r
- uint ea = EA_AX_PI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_pi_pi(void)\r
-{\r
- uint res = OPER_AY_PI_16();\r
- uint ea = EA_AX_PI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_pi_pd(void)\r
-{\r
- uint res = OPER_AY_PD_16();\r
- uint ea = EA_AX_PI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_pi_di(void)\r
-{\r
- uint res = OPER_AY_DI_16();\r
- uint ea = EA_AX_PI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_pi_ix(void)\r
-{\r
- uint res = OPER_AY_IX_16();\r
- uint ea = EA_AX_PI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_pi_aw(void)\r
-{\r
- uint res = OPER_AW_16();\r
- uint ea = EA_AX_PI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_pi_al(void)\r
-{\r
- uint res = OPER_AL_16();\r
- uint ea = EA_AX_PI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_pi_pcdi(void)\r
-{\r
- uint res = OPER_PCDI_16();\r
- uint ea = EA_AX_PI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_pi_pcix(void)\r
-{\r
- uint res = OPER_PCIX_16();\r
- uint ea = EA_AX_PI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_pi_i(void)\r
-{\r
- uint res = OPER_I_16();\r
- uint ea = EA_AX_PI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_pd_d(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16(DY);\r
- uint ea = EA_AX_PD_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_pd_a(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16(AY);\r
- uint ea = EA_AX_PD_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_pd_ai(void)\r
-{\r
- uint res = OPER_AY_AI_16();\r
- uint ea = EA_AX_PD_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_pd_pi(void)\r
-{\r
- uint res = OPER_AY_PI_16();\r
- uint ea = EA_AX_PD_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_pd_pd(void)\r
-{\r
- uint res = OPER_AY_PD_16();\r
- uint ea = EA_AX_PD_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_pd_di(void)\r
-{\r
- uint res = OPER_AY_DI_16();\r
- uint ea = EA_AX_PD_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_pd_ix(void)\r
-{\r
- uint res = OPER_AY_IX_16();\r
- uint ea = EA_AX_PD_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_pd_aw(void)\r
-{\r
- uint res = OPER_AW_16();\r
- uint ea = EA_AX_PD_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_pd_al(void)\r
-{\r
- uint res = OPER_AL_16();\r
- uint ea = EA_AX_PD_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_pd_pcdi(void)\r
-{\r
- uint res = OPER_PCDI_16();\r
- uint ea = EA_AX_PD_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_pd_pcix(void)\r
-{\r
- uint res = OPER_PCIX_16();\r
- uint ea = EA_AX_PD_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_pd_i(void)\r
-{\r
- uint res = OPER_I_16();\r
- uint ea = EA_AX_PD_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_di_d(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16(DY);\r
- uint ea = EA_AX_DI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_di_a(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16(AY);\r
- uint ea = EA_AX_DI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_di_ai(void)\r
-{\r
- uint res = OPER_AY_AI_16();\r
- uint ea = EA_AX_DI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_di_pi(void)\r
-{\r
- uint res = OPER_AY_PI_16();\r
- uint ea = EA_AX_DI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_di_pd(void)\r
-{\r
- uint res = OPER_AY_PD_16();\r
- uint ea = EA_AX_DI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_di_di(void)\r
-{\r
- uint res = OPER_AY_DI_16();\r
- uint ea = EA_AX_DI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_di_ix(void)\r
-{\r
- uint res = OPER_AY_IX_16();\r
- uint ea = EA_AX_DI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_di_aw(void)\r
-{\r
- uint res = OPER_AW_16();\r
- uint ea = EA_AX_DI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_di_al(void)\r
-{\r
- uint res = OPER_AL_16();\r
- uint ea = EA_AX_DI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_di_pcdi(void)\r
-{\r
- uint res = OPER_PCDI_16();\r
- uint ea = EA_AX_DI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_di_pcix(void)\r
-{\r
- uint res = OPER_PCIX_16();\r
- uint ea = EA_AX_DI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_di_i(void)\r
-{\r
- uint res = OPER_I_16();\r
- uint ea = EA_AX_DI_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_ix_d(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16(DY);\r
- uint ea = EA_AX_IX_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_ix_a(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16(AY);\r
- uint ea = EA_AX_IX_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_ix_ai(void)\r
-{\r
- uint res = OPER_AY_AI_16();\r
- uint ea = EA_AX_IX_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_ix_pi(void)\r
-{\r
- uint res = OPER_AY_PI_16();\r
- uint ea = EA_AX_IX_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_ix_pd(void)\r
-{\r
- uint res = OPER_AY_PD_16();\r
- uint ea = EA_AX_IX_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_ix_di(void)\r
-{\r
- uint res = OPER_AY_DI_16();\r
- uint ea = EA_AX_IX_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_ix_ix(void)\r
-{\r
- uint res = OPER_AY_IX_16();\r
- uint ea = EA_AX_IX_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_ix_aw(void)\r
-{\r
- uint res = OPER_AW_16();\r
- uint ea = EA_AX_IX_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_ix_al(void)\r
-{\r
- uint res = OPER_AL_16();\r
- uint ea = EA_AX_IX_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_ix_pcdi(void)\r
-{\r
- uint res = OPER_PCDI_16();\r
- uint ea = EA_AX_IX_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_ix_pcix(void)\r
-{\r
- uint res = OPER_PCIX_16();\r
- uint ea = EA_AX_IX_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_ix_i(void)\r
-{\r
- uint res = OPER_I_16();\r
- uint ea = EA_AX_IX_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_aw_d(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16(DY);\r
- uint ea = EA_AW_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_aw_a(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16(AY);\r
- uint ea = EA_AW_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_aw_ai(void)\r
-{\r
- uint res = OPER_AY_AI_16();\r
- uint ea = EA_AW_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_aw_pi(void)\r
-{\r
- uint res = OPER_AY_PI_16();\r
- uint ea = EA_AW_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_aw_pd(void)\r
-{\r
- uint res = OPER_AY_PD_16();\r
- uint ea = EA_AW_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_aw_di(void)\r
-{\r
- uint res = OPER_AY_DI_16();\r
- uint ea = EA_AW_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_aw_ix(void)\r
-{\r
- uint res = OPER_AY_IX_16();\r
- uint ea = EA_AW_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_aw_aw(void)\r
-{\r
- uint res = OPER_AW_16();\r
- uint ea = EA_AW_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_aw_al(void)\r
-{\r
- uint res = OPER_AL_16();\r
- uint ea = EA_AW_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_aw_pcdi(void)\r
-{\r
- uint res = OPER_PCDI_16();\r
- uint ea = EA_AW_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_aw_pcix(void)\r
-{\r
- uint res = OPER_PCIX_16();\r
- uint ea = EA_AW_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_aw_i(void)\r
-{\r
- uint res = OPER_I_16();\r
- uint ea = EA_AW_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_al_d(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16(DY);\r
- uint ea = EA_AL_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_al_a(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16(AY);\r
- uint ea = EA_AL_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_al_ai(void)\r
-{\r
- uint res = OPER_AY_AI_16();\r
- uint ea = EA_AL_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_al_pi(void)\r
-{\r
- uint res = OPER_AY_PI_16();\r
- uint ea = EA_AL_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_al_pd(void)\r
-{\r
- uint res = OPER_AY_PD_16();\r
- uint ea = EA_AL_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_al_di(void)\r
-{\r
- uint res = OPER_AY_DI_16();\r
- uint ea = EA_AL_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_al_ix(void)\r
-{\r
- uint res = OPER_AY_IX_16();\r
- uint ea = EA_AL_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_al_aw(void)\r
-{\r
- uint res = OPER_AW_16();\r
- uint ea = EA_AL_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_al_al(void)\r
-{\r
- uint res = OPER_AL_16();\r
- uint ea = EA_AL_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_al_pcdi(void)\r
-{\r
- uint res = OPER_PCDI_16();\r
- uint ea = EA_AL_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_al_pcix(void)\r
-{\r
- uint res = OPER_PCIX_16();\r
- uint ea = EA_AL_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_16_al_i(void)\r
-{\r
- uint res = OPER_I_16();\r
- uint ea = EA_AL_16();\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_d_d(void)\r
-{\r
- uint res = DY;\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = res;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_d_a(void)\r
-{\r
- uint res = AY;\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = res;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_d_ai(void)\r
-{\r
- uint res = OPER_AY_AI_32();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = res;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_d_pi(void)\r
-{\r
- uint res = OPER_AY_PI_32();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = res;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_d_pd(void)\r
-{\r
- uint res = OPER_AY_PD_32();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = res;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_d_di(void)\r
-{\r
- uint res = OPER_AY_DI_32();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = res;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_d_ix(void)\r
-{\r
- uint res = OPER_AY_IX_32();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = res;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_d_aw(void)\r
-{\r
- uint res = OPER_AW_32();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = res;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_d_al(void)\r
-{\r
- uint res = OPER_AL_32();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = res;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_d_pcdi(void)\r
-{\r
- uint res = OPER_PCDI_32();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = res;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_d_pcix(void)\r
-{\r
- uint res = OPER_PCIX_32();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = res;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_d_i(void)\r
-{\r
- uint res = OPER_I_32();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = res;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_ai_d(void)\r
-{\r
- uint res = DY;\r
- uint ea = EA_AX_AI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_ai_a(void)\r
-{\r
- uint res = AY;\r
- uint ea = EA_AX_AI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_ai_ai(void)\r
-{\r
- uint res = OPER_AY_AI_32();\r
- uint ea = EA_AX_AI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_ai_pi(void)\r
-{\r
- uint res = OPER_AY_PI_32();\r
- uint ea = EA_AX_AI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_ai_pd(void)\r
-{\r
- uint res = OPER_AY_PD_32();\r
- uint ea = EA_AX_AI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_ai_di(void)\r
-{\r
- uint res = OPER_AY_DI_32();\r
- uint ea = EA_AX_AI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_ai_ix(void)\r
-{\r
- uint res = OPER_AY_IX_32();\r
- uint ea = EA_AX_AI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_ai_aw(void)\r
-{\r
- uint res = OPER_AW_32();\r
- uint ea = EA_AX_AI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_ai_al(void)\r
-{\r
- uint res = OPER_AL_32();\r
- uint ea = EA_AX_AI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_ai_pcdi(void)\r
-{\r
- uint res = OPER_PCDI_32();\r
- uint ea = EA_AX_AI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_ai_pcix(void)\r
-{\r
- uint res = OPER_PCIX_32();\r
- uint ea = EA_AX_AI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_ai_i(void)\r
-{\r
- uint res = OPER_I_32();\r
- uint ea = EA_AX_AI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_pi_d(void)\r
-{\r
- uint res = DY;\r
- uint ea = EA_AX_PI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_pi_a(void)\r
-{\r
- uint res = AY;\r
- uint ea = EA_AX_PI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_pi_ai(void)\r
-{\r
- uint res = OPER_AY_AI_32();\r
- uint ea = EA_AX_PI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_pi_pi(void)\r
-{\r
- uint res = OPER_AY_PI_32();\r
- uint ea = EA_AX_PI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_pi_pd(void)\r
-{\r
- uint res = OPER_AY_PD_32();\r
- uint ea = EA_AX_PI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_pi_di(void)\r
-{\r
- uint res = OPER_AY_DI_32();\r
- uint ea = EA_AX_PI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_pi_ix(void)\r
-{\r
- uint res = OPER_AY_IX_32();\r
- uint ea = EA_AX_PI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_pi_aw(void)\r
-{\r
- uint res = OPER_AW_32();\r
- uint ea = EA_AX_PI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_pi_al(void)\r
-{\r
- uint res = OPER_AL_32();\r
- uint ea = EA_AX_PI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_pi_pcdi(void)\r
-{\r
- uint res = OPER_PCDI_32();\r
- uint ea = EA_AX_PI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_pi_pcix(void)\r
-{\r
- uint res = OPER_PCIX_32();\r
- uint ea = EA_AX_PI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_pi_i(void)\r
-{\r
- uint res = OPER_I_32();\r
- uint ea = EA_AX_PI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_pd_d(void)\r
-{\r
- uint res = DY;\r
- uint ea = EA_AX_PD_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_pd_a(void)\r
-{\r
- uint res = AY;\r
- uint ea = EA_AX_PD_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_pd_ai(void)\r
-{\r
- uint res = OPER_AY_AI_32();\r
- uint ea = EA_AX_PD_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_pd_pi(void)\r
-{\r
- uint res = OPER_AY_PI_32();\r
- uint ea = EA_AX_PD_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_pd_pd(void)\r
-{\r
- uint res = OPER_AY_PD_32();\r
- uint ea = EA_AX_PD_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_pd_di(void)\r
-{\r
- uint res = OPER_AY_DI_32();\r
- uint ea = EA_AX_PD_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_pd_ix(void)\r
-{\r
- uint res = OPER_AY_IX_32();\r
- uint ea = EA_AX_PD_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_pd_aw(void)\r
-{\r
- uint res = OPER_AW_32();\r
- uint ea = EA_AX_PD_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_pd_al(void)\r
-{\r
- uint res = OPER_AL_32();\r
- uint ea = EA_AX_PD_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_pd_pcdi(void)\r
-{\r
- uint res = OPER_PCDI_32();\r
- uint ea = EA_AX_PD_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_pd_pcix(void)\r
-{\r
- uint res = OPER_PCIX_32();\r
- uint ea = EA_AX_PD_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_pd_i(void)\r
-{\r
- uint res = OPER_I_32();\r
- uint ea = EA_AX_PD_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_di_d(void)\r
-{\r
- uint res = DY;\r
- uint ea = EA_AX_DI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_di_a(void)\r
-{\r
- uint res = AY;\r
- uint ea = EA_AX_DI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_di_ai(void)\r
-{\r
- uint res = OPER_AY_AI_32();\r
- uint ea = EA_AX_DI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_di_pi(void)\r
-{\r
- uint res = OPER_AY_PI_32();\r
- uint ea = EA_AX_DI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_di_pd(void)\r
-{\r
- uint res = OPER_AY_PD_32();\r
- uint ea = EA_AX_DI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_di_di(void)\r
-{\r
- uint res = OPER_AY_DI_32();\r
- uint ea = EA_AX_DI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_di_ix(void)\r
-{\r
- uint res = OPER_AY_IX_32();\r
- uint ea = EA_AX_DI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_di_aw(void)\r
-{\r
- uint res = OPER_AW_32();\r
- uint ea = EA_AX_DI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_di_al(void)\r
-{\r
- uint res = OPER_AL_32();\r
- uint ea = EA_AX_DI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_di_pcdi(void)\r
-{\r
- uint res = OPER_PCDI_32();\r
- uint ea = EA_AX_DI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_di_pcix(void)\r
-{\r
- uint res = OPER_PCIX_32();\r
- uint ea = EA_AX_DI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_di_i(void)\r
-{\r
- uint res = OPER_I_32();\r
- uint ea = EA_AX_DI_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_ix_d(void)\r
-{\r
- uint res = DY;\r
- uint ea = EA_AX_IX_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_ix_a(void)\r
-{\r
- uint res = AY;\r
- uint ea = EA_AX_IX_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_ix_ai(void)\r
-{\r
- uint res = OPER_AY_AI_32();\r
- uint ea = EA_AX_IX_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_ix_pi(void)\r
-{\r
- uint res = OPER_AY_PI_32();\r
- uint ea = EA_AX_IX_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_ix_pd(void)\r
-{\r
- uint res = OPER_AY_PD_32();\r
- uint ea = EA_AX_IX_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_ix_di(void)\r
-{\r
- uint res = OPER_AY_DI_32();\r
- uint ea = EA_AX_IX_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_ix_ix(void)\r
-{\r
- uint res = OPER_AY_IX_32();\r
- uint ea = EA_AX_IX_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_ix_aw(void)\r
-{\r
- uint res = OPER_AW_32();\r
- uint ea = EA_AX_IX_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_ix_al(void)\r
-{\r
- uint res = OPER_AL_32();\r
- uint ea = EA_AX_IX_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_ix_pcdi(void)\r
-{\r
- uint res = OPER_PCDI_32();\r
- uint ea = EA_AX_IX_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_ix_pcix(void)\r
-{\r
- uint res = OPER_PCIX_32();\r
- uint ea = EA_AX_IX_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_ix_i(void)\r
-{\r
- uint res = OPER_I_32();\r
- uint ea = EA_AX_IX_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_aw_d(void)\r
-{\r
- uint res = DY;\r
- uint ea = EA_AW_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_aw_a(void)\r
-{\r
- uint res = AY;\r
- uint ea = EA_AW_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_aw_ai(void)\r
-{\r
- uint res = OPER_AY_AI_32();\r
- uint ea = EA_AW_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_aw_pi(void)\r
-{\r
- uint res = OPER_AY_PI_32();\r
- uint ea = EA_AW_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_aw_pd(void)\r
-{\r
- uint res = OPER_AY_PD_32();\r
- uint ea = EA_AW_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_aw_di(void)\r
-{\r
- uint res = OPER_AY_DI_32();\r
- uint ea = EA_AW_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_aw_ix(void)\r
-{\r
- uint res = OPER_AY_IX_32();\r
- uint ea = EA_AW_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_aw_aw(void)\r
-{\r
- uint res = OPER_AW_32();\r
- uint ea = EA_AW_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_aw_al(void)\r
-{\r
- uint res = OPER_AL_32();\r
- uint ea = EA_AW_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_aw_pcdi(void)\r
-{\r
- uint res = OPER_PCDI_32();\r
- uint ea = EA_AW_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_aw_pcix(void)\r
-{\r
- uint res = OPER_PCIX_32();\r
- uint ea = EA_AW_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_aw_i(void)\r
-{\r
- uint res = OPER_I_32();\r
- uint ea = EA_AW_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_al_d(void)\r
-{\r
- uint res = DY;\r
- uint ea = EA_AL_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_al_a(void)\r
-{\r
- uint res = AY;\r
- uint ea = EA_AL_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_al_ai(void)\r
-{\r
- uint res = OPER_AY_AI_32();\r
- uint ea = EA_AL_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_al_pi(void)\r
-{\r
- uint res = OPER_AY_PI_32();\r
- uint ea = EA_AL_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_al_pd(void)\r
-{\r
- uint res = OPER_AY_PD_32();\r
- uint ea = EA_AL_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_al_di(void)\r
-{\r
- uint res = OPER_AY_DI_32();\r
- uint ea = EA_AL_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_al_ix(void)\r
-{\r
- uint res = OPER_AY_IX_32();\r
- uint ea = EA_AL_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_al_aw(void)\r
-{\r
- uint res = OPER_AW_32();\r
- uint ea = EA_AL_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_al_al(void)\r
-{\r
- uint res = OPER_AL_32();\r
- uint ea = EA_AL_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_al_pcdi(void)\r
-{\r
- uint res = OPER_PCDI_32();\r
- uint ea = EA_AL_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_al_pcix(void)\r
-{\r
- uint res = OPER_PCIX_32();\r
- uint ea = EA_AL_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move_32_al_i(void)\r
-{\r
- uint res = OPER_I_32();\r
- uint ea = EA_AL_32();\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_movea_16_d(void)\r
-{\r
- AX = MAKE_INT_16(DY);\r
-}\r
-\r
-\r
-void m68k_op_movea_16_a(void)\r
-{\r
- AX = MAKE_INT_16(AY);\r
-}\r
-\r
-\r
-void m68k_op_movea_16_ai(void)\r
-{\r
- AX = MAKE_INT_16(OPER_AY_AI_16());\r
-}\r
-\r
-\r
-void m68k_op_movea_16_pi(void)\r
-{\r
- AX = MAKE_INT_16(OPER_AY_PI_16());\r
-}\r
-\r
-\r
-void m68k_op_movea_16_pd(void)\r
-{\r
- AX = MAKE_INT_16(OPER_AY_PD_16());\r
-}\r
-\r
-\r
-void m68k_op_movea_16_di(void)\r
-{\r
- AX = MAKE_INT_16(OPER_AY_DI_16());\r
-}\r
-\r
-\r
-void m68k_op_movea_16_ix(void)\r
-{\r
- AX = MAKE_INT_16(OPER_AY_IX_16());\r
-}\r
-\r
-\r
-void m68k_op_movea_16_aw(void)\r
-{\r
- AX = MAKE_INT_16(OPER_AW_16());\r
-}\r
-\r
-\r
-void m68k_op_movea_16_al(void)\r
-{\r
- AX = MAKE_INT_16(OPER_AL_16());\r
-}\r
-\r
-\r
-void m68k_op_movea_16_pcdi(void)\r
-{\r
- AX = MAKE_INT_16(OPER_PCDI_16());\r
-}\r
-\r
-\r
-void m68k_op_movea_16_pcix(void)\r
-{\r
- AX = MAKE_INT_16(OPER_PCIX_16());\r
-}\r
-\r
-\r
-void m68k_op_movea_16_i(void)\r
-{\r
- AX = MAKE_INT_16(OPER_I_16());\r
-}\r
-\r
-\r
-void m68k_op_movea_32_d(void)\r
-{\r
- AX = DY;\r
-}\r
-\r
-\r
-void m68k_op_movea_32_a(void)\r
-{\r
- AX = AY;\r
-}\r
-\r
-\r
-void m68k_op_movea_32_ai(void)\r
-{\r
- AX = OPER_AY_AI_32();\r
-}\r
-\r
-\r
-void m68k_op_movea_32_pi(void)\r
-{\r
- AX = OPER_AY_PI_32();\r
-}\r
-\r
-\r
-void m68k_op_movea_32_pd(void)\r
-{\r
- AX = OPER_AY_PD_32();\r
-}\r
-\r
-\r
-void m68k_op_movea_32_di(void)\r
-{\r
- AX = OPER_AY_DI_32();\r
-}\r
-\r
-\r
-void m68k_op_movea_32_ix(void)\r
-{\r
- AX = OPER_AY_IX_32();\r
-}\r
-\r
-\r
-void m68k_op_movea_32_aw(void)\r
-{\r
- AX = OPER_AW_32();\r
-}\r
-\r
-\r
-void m68k_op_movea_32_al(void)\r
-{\r
- AX = OPER_AL_32();\r
-}\r
-\r
-\r
-void m68k_op_movea_32_pcdi(void)\r
-{\r
- AX = OPER_PCDI_32();\r
-}\r
-\r
-\r
-void m68k_op_movea_32_pcix(void)\r
-{\r
- AX = OPER_PCIX_32();\r
-}\r
-\r
-\r
-void m68k_op_movea_32_i(void)\r
-{\r
- AX = OPER_I_32();\r
-}\r
-\r
-\r
-void m68k_op_move_16_frc_d(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- DY = MASK_OUT_BELOW_16(DY) | m68ki_get_ccr();\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_move_16_frc_ai(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- m68ki_write_16(EA_AY_AI_16(), m68ki_get_ccr());\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_move_16_frc_pi(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- m68ki_write_16(EA_AY_PI_16(), m68ki_get_ccr());\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_move_16_frc_pd(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- m68ki_write_16(EA_AY_PD_16(), m68ki_get_ccr());\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_move_16_frc_di(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- m68ki_write_16(EA_AY_DI_16(), m68ki_get_ccr());\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_move_16_frc_ix(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- m68ki_write_16(EA_AY_IX_16(), m68ki_get_ccr());\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_move_16_frc_aw(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- m68ki_write_16(EA_AW_16(), m68ki_get_ccr());\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_move_16_frc_al(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- m68ki_write_16(EA_AL_16(), m68ki_get_ccr());\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_move_16_toc_d(void)\r
-{\r
- m68ki_set_ccr(DY);\r
-}\r
-\r
-\r
-void m68k_op_move_16_toc_ai(void)\r
-{\r
- m68ki_set_ccr(OPER_AY_AI_16());\r
-}\r
-\r
-\r
-void m68k_op_move_16_toc_pi(void)\r
-{\r
- m68ki_set_ccr(OPER_AY_PI_16());\r
-}\r
-\r
-\r
-void m68k_op_move_16_toc_pd(void)\r
-{\r
- m68ki_set_ccr(OPER_AY_PD_16());\r
-}\r
-\r
-\r
-void m68k_op_move_16_toc_di(void)\r
-{\r
- m68ki_set_ccr(OPER_AY_DI_16());\r
-}\r
-\r
-\r
-void m68k_op_move_16_toc_ix(void)\r
-{\r
- m68ki_set_ccr(OPER_AY_IX_16());\r
-}\r
-\r
-\r
-void m68k_op_move_16_toc_aw(void)\r
-{\r
- m68ki_set_ccr(OPER_AW_16());\r
-}\r
-\r
-\r
-void m68k_op_move_16_toc_al(void)\r
-{\r
- m68ki_set_ccr(OPER_AL_16());\r
-}\r
-\r
-\r
-void m68k_op_move_16_toc_pcdi(void)\r
-{\r
- m68ki_set_ccr(OPER_PCDI_16());\r
-}\r
-\r
-\r
-void m68k_op_move_16_toc_pcix(void)\r
-{\r
- m68ki_set_ccr(OPER_PCIX_16());\r
-}\r
-\r
-\r
-void m68k_op_move_16_toc_i(void)\r
-{\r
- m68ki_set_ccr(OPER_I_16());\r
-}\r
-\r
-\r
-void m68k_op_move_16_frs_d(void)\r
-{\r
- if(CPU_TYPE_IS_000(CPU_TYPE) || FLAG_S) /* NS990408 */\r
- {\r
- DY = MASK_OUT_BELOW_16(DY) | m68ki_get_sr();\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
-}\r
-\r
-\r
-void m68k_op_move_16_frs_ai(void)\r
-{\r
- if(CPU_TYPE_IS_000(CPU_TYPE) || FLAG_S) /* NS990408 */\r
- {\r
- uint ea = EA_AY_AI_16();\r
- m68ki_write_16(ea, m68ki_get_sr());\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
-}\r
-\r
-\r
-void m68k_op_move_16_frs_pi(void)\r
-{\r
- if(CPU_TYPE_IS_000(CPU_TYPE) || FLAG_S) /* NS990408 */\r
- {\r
- uint ea = EA_AY_PI_16();\r
- m68ki_write_16(ea, m68ki_get_sr());\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
-}\r
-\r
-\r
-void m68k_op_move_16_frs_pd(void)\r
-{\r
- if(CPU_TYPE_IS_000(CPU_TYPE) || FLAG_S) /* NS990408 */\r
- {\r
- uint ea = EA_AY_PD_16();\r
- m68ki_write_16(ea, m68ki_get_sr());\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
-}\r
-\r
-\r
-void m68k_op_move_16_frs_di(void)\r
-{\r
- if(CPU_TYPE_IS_000(CPU_TYPE) || FLAG_S) /* NS990408 */\r
- {\r
- uint ea = EA_AY_DI_16();\r
- m68ki_write_16(ea, m68ki_get_sr());\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
-}\r
-\r
-\r
-void m68k_op_move_16_frs_ix(void)\r
-{\r
- if(CPU_TYPE_IS_000(CPU_TYPE) || FLAG_S) /* NS990408 */\r
- {\r
- uint ea = EA_AY_IX_16();\r
- m68ki_write_16(ea, m68ki_get_sr());\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
-}\r
-\r
-\r
-void m68k_op_move_16_frs_aw(void)\r
-{\r
- if(CPU_TYPE_IS_000(CPU_TYPE) || FLAG_S) /* NS990408 */\r
- {\r
- uint ea = EA_AW_16();\r
- m68ki_write_16(ea, m68ki_get_sr());\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
-}\r
-\r
-\r
-void m68k_op_move_16_frs_al(void)\r
-{\r
- if(CPU_TYPE_IS_000(CPU_TYPE) || FLAG_S) /* NS990408 */\r
- {\r
- uint ea = EA_AL_16();\r
- m68ki_write_16(ea, m68ki_get_sr());\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
-}\r
-\r
-\r
-void m68k_op_move_16_tos_d(void)\r
-{\r
- if(FLAG_S)\r
- {\r
- m68ki_set_sr(DY);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
-}\r
-\r
-\r
-void m68k_op_move_16_tos_ai(void)\r
-{\r
- if(FLAG_S)\r
- {\r
- uint new_sr = OPER_AY_AI_16();\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_set_sr(new_sr);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
-}\r
-\r
-\r
-void m68k_op_move_16_tos_pi(void)\r
-{\r
- if(FLAG_S)\r
- {\r
- uint new_sr = OPER_AY_PI_16();\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_set_sr(new_sr);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
-}\r
-\r
-\r
-void m68k_op_move_16_tos_pd(void)\r
-{\r
- if(FLAG_S)\r
- {\r
- uint new_sr = OPER_AY_PD_16();\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_set_sr(new_sr);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
-}\r
-\r
-\r
-void m68k_op_move_16_tos_di(void)\r
-{\r
- if(FLAG_S)\r
- {\r
- uint new_sr = OPER_AY_DI_16();\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_set_sr(new_sr);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
-}\r
-\r
-\r
-void m68k_op_move_16_tos_ix(void)\r
-{\r
- if(FLAG_S)\r
- {\r
- uint new_sr = OPER_AY_IX_16();\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_set_sr(new_sr);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
-}\r
-\r
-\r
-void m68k_op_move_16_tos_aw(void)\r
-{\r
- if(FLAG_S)\r
- {\r
- uint new_sr = OPER_AW_16();\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_set_sr(new_sr);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
-}\r
-\r
-\r
-void m68k_op_move_16_tos_al(void)\r
-{\r
- if(FLAG_S)\r
- {\r
- uint new_sr = OPER_AL_16();\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_set_sr(new_sr);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
-}\r
-\r
-\r
-void m68k_op_move_16_tos_pcdi(void)\r
-{\r
- if(FLAG_S)\r
- {\r
- uint new_sr = OPER_PCDI_16();\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_set_sr(new_sr);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
-}\r
-\r
-\r
-void m68k_op_move_16_tos_pcix(void)\r
-{\r
- if(FLAG_S)\r
- {\r
- uint new_sr = OPER_PCIX_16();\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_set_sr(new_sr);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
-}\r
-\r
-\r
-void m68k_op_move_16_tos_i(void)\r
-{\r
- if(FLAG_S)\r
- {\r
- uint new_sr = OPER_I_16();\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_set_sr(new_sr);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
-}\r
-\r
-\r
-void m68k_op_move_32_fru(void)\r
-{\r
- if(FLAG_S)\r
- {\r
- AY = REG_USP;\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
-}\r
-\r
-\r
-void m68k_op_move_32_tou(void)\r
-{\r
- if(FLAG_S)\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- REG_USP = AY;\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
-}\r
-\r
-\r
-void m68k_op_movec_32_cr(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- if(FLAG_S)\r
- {\r
- uint word2 = OPER_I_16();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- switch (word2 & 0xfff)\r
- {\r
- case 0x000: /* SFC */\r
- REG_DA[(word2 >> 12) & 15] = REG_SFC;\r
- return;\r
- case 0x001: /* DFC */\r
- REG_DA[(word2 >> 12) & 15] = REG_DFC;\r
- return;\r
- case 0x002: /* CACR */\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- REG_DA[(word2 >> 12) & 15] = REG_CACR;\r
- return;\r
- }\r
- return;\r
- case 0x800: /* USP */\r
- REG_DA[(word2 >> 12) & 15] = REG_USP;\r
- return;\r
- case 0x801: /* VBR */\r
- REG_DA[(word2 >> 12) & 15] = REG_VBR;\r
- return;\r
- case 0x802: /* CAAR */\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- REG_DA[(word2 >> 12) & 15] = REG_CAAR;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
- break;\r
- case 0x803: /* MSP */\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- REG_DA[(word2 >> 12) & 15] = FLAG_M ? REG_SP : REG_MSP;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
- return;\r
- case 0x804: /* ISP */\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- REG_DA[(word2 >> 12) & 15] = FLAG_M ? REG_ISP : REG_SP;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
- return;\r
- case 0x003: /* TC */\r
- if(CPU_TYPE_IS_040_PLUS(CPU_TYPE))\r
- {\r
- /* TODO */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
- return;\r
- case 0x004: /* ITT0 */\r
- if(CPU_TYPE_IS_040_PLUS(CPU_TYPE))\r
- {\r
- /* TODO */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
- return;\r
- case 0x005: /* ITT1 */\r
- if(CPU_TYPE_IS_040_PLUS(CPU_TYPE))\r
- {\r
- /* TODO */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
- return;\r
- case 0x006: /* DTT0 */\r
- if(CPU_TYPE_IS_040_PLUS(CPU_TYPE))\r
- {\r
- /* TODO */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
- return;\r
- case 0x007: /* DTT1 */\r
- if(CPU_TYPE_IS_040_PLUS(CPU_TYPE))\r
- {\r
- /* TODO */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
- return;\r
- case 0x805: /* MMUSR */\r
- if(CPU_TYPE_IS_040_PLUS(CPU_TYPE))\r
- {\r
- /* TODO */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
- return;\r
- case 0x806: /* URP */\r
- if(CPU_TYPE_IS_040_PLUS(CPU_TYPE))\r
- {\r
- /* TODO */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
- return;\r
- case 0x807: /* SRP */\r
- if(CPU_TYPE_IS_040_PLUS(CPU_TYPE))\r
- {\r
- /* TODO */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
- return;\r
- default:\r
- m68ki_exception_illegal();\r
- return;\r
- }\r
- }\r
- m68ki_exception_privilege_violation();\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_movec_32_rc(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- if(FLAG_S)\r
- {\r
- uint word2 = OPER_I_16();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- switch (word2 & 0xfff)\r
- {\r
- case 0x000: /* SFC */\r
- REG_SFC = REG_DA[(word2 >> 12) & 15] & 7;\r
- return;\r
- case 0x001: /* DFC */\r
- REG_DFC = REG_DA[(word2 >> 12) & 15] & 7;\r
- return;\r
- case 0x002: /* CACR */\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- REG_CACR = REG_DA[(word2 >> 12) & 15];\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
- return;\r
- case 0x800: /* USP */\r
- REG_USP = REG_DA[(word2 >> 12) & 15];\r
- return;\r
- case 0x801: /* VBR */\r
- REG_VBR = REG_DA[(word2 >> 12) & 15];\r
- return;\r
- case 0x802: /* CAAR */\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- REG_CAAR = REG_DA[(word2 >> 12) & 15];\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
- return;\r
- case 0x803: /* MSP */\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- /* we are in supervisor mode so just check for M flag */\r
- if(!FLAG_M)\r
- {\r
- REG_MSP = REG_DA[(word2 >> 12) & 15];\r
- return;\r
- }\r
- REG_SP = REG_DA[(word2 >> 12) & 15];\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
- return;\r
- case 0x804: /* ISP */\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(!FLAG_M)\r
- {\r
- REG_SP = REG_DA[(word2 >> 12) & 15];\r
- return;\r
- }\r
- REG_ISP = REG_DA[(word2 >> 12) & 15];\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
- return;\r
- case 0x003: /* TC */\r
- if (CPU_TYPE_IS_040_PLUS(CPU_TYPE))\r
- {\r
- /* TODO */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
- return;\r
- case 0x004: /* ITT0 */\r
- if (CPU_TYPE_IS_040_PLUS(CPU_TYPE))\r
- {\r
- /* TODO */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
- return;\r
- case 0x005: /* ITT1 */\r
- if (CPU_TYPE_IS_040_PLUS(CPU_TYPE))\r
- {\r
- /* TODO */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
- return;\r
- case 0x006: /* DTT0 */\r
- if (CPU_TYPE_IS_040_PLUS(CPU_TYPE))\r
- {\r
- /* TODO */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
- return;\r
- case 0x007: /* DTT1 */\r
- if (CPU_TYPE_IS_040_PLUS(CPU_TYPE))\r
- {\r
- /* TODO */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
- return;\r
- case 0x805: /* MMUSR */\r
- if (CPU_TYPE_IS_040_PLUS(CPU_TYPE))\r
- {\r
- /* TODO */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
- return;\r
- case 0x806: /* URP */\r
- if (CPU_TYPE_IS_040_PLUS(CPU_TYPE))\r
- {\r
- /* TODO */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
- return;\r
- case 0x807: /* SRP */\r
- if (CPU_TYPE_IS_040_PLUS(CPU_TYPE))\r
- {\r
- /* TODO */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
- return;\r
- default:\r
- m68ki_exception_illegal();\r
- return;\r
- }\r
- }\r
- m68ki_exception_privilege_violation();\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_movem_16_re_pd(void)\r
-{\r
- uint i = 0;\r
- uint register_list = OPER_I_16();\r
- uint ea = AY;\r
- uint count = 0;\r
-\r
- for(; i < 16; i++)\r
- if(register_list & (1 << i))\r
- {\r
- ea -= 2;\r
- m68ki_write_16(ea, MASK_OUT_ABOVE_16(REG_DA[15-i]));\r
- count++;\r
- }\r
- AY = ea;\r
-\r
- USE_CYCLES(count<<CYC_MOVEM_W);\r
-}\r
-\r
-\r
-void m68k_op_movem_16_re_ai(void)\r
-{\r
- uint i = 0;\r
- uint register_list = OPER_I_16();\r
- uint ea = EA_AY_AI_16();\r
- uint count = 0;\r
-\r
- for(; i < 16; i++)\r
- if(register_list & (1 << i))\r
- {\r
- m68ki_write_16(ea, MASK_OUT_ABOVE_16(REG_DA[i]));\r
- ea += 2;\r
- count++;\r
- }\r
-\r
- USE_CYCLES(count<<CYC_MOVEM_W);\r
-}\r
-\r
-\r
-void m68k_op_movem_16_re_di(void)\r
-{\r
- uint i = 0;\r
- uint register_list = OPER_I_16();\r
- uint ea = EA_AY_DI_16();\r
- uint count = 0;\r
-\r
- for(; i < 16; i++)\r
- if(register_list & (1 << i))\r
- {\r
- m68ki_write_16(ea, MASK_OUT_ABOVE_16(REG_DA[i]));\r
- ea += 2;\r
- count++;\r
- }\r
-\r
- USE_CYCLES(count<<CYC_MOVEM_W);\r
-}\r
-\r
-\r
-void m68k_op_movem_16_re_ix(void)\r
-{\r
- uint i = 0;\r
- uint register_list = OPER_I_16();\r
- uint ea = EA_AY_IX_16();\r
- uint count = 0;\r
-\r
- for(; i < 16; i++)\r
- if(register_list & (1 << i))\r
- {\r
- m68ki_write_16(ea, MASK_OUT_ABOVE_16(REG_DA[i]));\r
- ea += 2;\r
- count++;\r
- }\r
-\r
- USE_CYCLES(count<<CYC_MOVEM_W);\r
-}\r
-\r
-\r
-void m68k_op_movem_16_re_aw(void)\r
-{\r
- uint i = 0;\r
- uint register_list = OPER_I_16();\r
- uint ea = EA_AW_16();\r
- uint count = 0;\r
-\r
- for(; i < 16; i++)\r
- if(register_list & (1 << i))\r
- {\r
- m68ki_write_16(ea, MASK_OUT_ABOVE_16(REG_DA[i]));\r
- ea += 2;\r
- count++;\r
- }\r
-\r
- USE_CYCLES(count<<CYC_MOVEM_W);\r
-}\r
-\r
-\r
-void m68k_op_movem_16_re_al(void)\r
-{\r
- uint i = 0;\r
- uint register_list = OPER_I_16();\r
- uint ea = EA_AL_16();\r
- uint count = 0;\r
-\r
- for(; i < 16; i++)\r
- if(register_list & (1 << i))\r
- {\r
- m68ki_write_16(ea, MASK_OUT_ABOVE_16(REG_DA[i]));\r
- ea += 2;\r
- count++;\r
- }\r
-\r
- USE_CYCLES(count<<CYC_MOVEM_W);\r
-}\r
-\r
-\r
-void m68k_op_movem_32_re_pd(void)\r
-{\r
- uint i = 0;\r
- uint register_list = OPER_I_16();\r
- uint ea = AY;\r
- uint count = 0;\r
-\r
- for(; i < 16; i++)\r
- if(register_list & (1 << i))\r
- {\r
- ea -= 4;\r
- m68ki_write_32(ea, REG_DA[15-i]);\r
- count++;\r
- }\r
- AY = ea;\r
-\r
- USE_CYCLES(count<<CYC_MOVEM_L);\r
-}\r
-\r
-\r
-void m68k_op_movem_32_re_ai(void)\r
-{\r
- uint i = 0;\r
- uint register_list = OPER_I_16();\r
- uint ea = EA_AY_AI_32();\r
- uint count = 0;\r
-\r
- for(; i < 16; i++)\r
- if(register_list & (1 << i))\r
- {\r
- m68ki_write_32(ea, REG_DA[i]);\r
- ea += 4;\r
- count++;\r
- }\r
-\r
- USE_CYCLES(count<<CYC_MOVEM_L);\r
-}\r
-\r
-\r
-void m68k_op_movem_32_re_di(void)\r
-{\r
- uint i = 0;\r
- uint register_list = OPER_I_16();\r
- uint ea = EA_AY_DI_32();\r
- uint count = 0;\r
-\r
- for(; i < 16; i++)\r
- if(register_list & (1 << i))\r
- {\r
- m68ki_write_32(ea, REG_DA[i]);\r
- ea += 4;\r
- count++;\r
- }\r
-\r
- USE_CYCLES(count<<CYC_MOVEM_L);\r
-}\r
-\r
-\r
-void m68k_op_movem_32_re_ix(void)\r
-{\r
- uint i = 0;\r
- uint register_list = OPER_I_16();\r
- uint ea = EA_AY_IX_32();\r
- uint count = 0;\r
-\r
- for(; i < 16; i++)\r
- if(register_list & (1 << i))\r
- {\r
- m68ki_write_32(ea, REG_DA[i]);\r
- ea += 4;\r
- count++;\r
- }\r
-\r
- USE_CYCLES(count<<CYC_MOVEM_L);\r
-}\r
-\r
-\r
-void m68k_op_movem_32_re_aw(void)\r
-{\r
- uint i = 0;\r
- uint register_list = OPER_I_16();\r
- uint ea = EA_AW_32();\r
- uint count = 0;\r
-\r
- for(; i < 16; i++)\r
- if(register_list & (1 << i))\r
- {\r
- m68ki_write_32(ea, REG_DA[i]);\r
- ea += 4;\r
- count++;\r
- }\r
-\r
- USE_CYCLES(count<<CYC_MOVEM_L);\r
-}\r
-\r
-\r
-void m68k_op_movem_32_re_al(void)\r
-{\r
- uint i = 0;\r
- uint register_list = OPER_I_16();\r
- uint ea = EA_AL_32();\r
- uint count = 0;\r
-\r
- for(; i < 16; i++)\r
- if(register_list & (1 << i))\r
- {\r
- m68ki_write_32(ea, REG_DA[i]);\r
- ea += 4;\r
- count++;\r
- }\r
-\r
- USE_CYCLES(count<<CYC_MOVEM_L);\r
-}\r
-\r
-\r
-void m68k_op_movem_16_er_pi(void)\r
-{\r
- uint i = 0;\r
- uint register_list = OPER_I_16();\r
- uint ea = AY;\r
- uint count = 0;\r
-\r
- for(; i < 16; i++)\r
- if(register_list & (1 << i))\r
- {\r
- REG_DA[i] = MAKE_INT_16(MASK_OUT_ABOVE_16(m68ki_read_16(ea)));\r
- ea += 2;\r
- count++;\r
- }\r
- AY = ea;\r
-\r
- USE_CYCLES(count<<CYC_MOVEM_W);\r
-}\r
-\r
-\r
-void m68k_op_movem_16_er_pcdi(void)\r
-{\r
- uint i = 0;\r
- uint register_list = OPER_I_16();\r
- uint ea = EA_PCDI_16();\r
- uint count = 0;\r
-\r
- for(; i < 16; i++)\r
- if(register_list & (1 << i))\r
- {\r
- REG_DA[i] = MAKE_INT_16(MASK_OUT_ABOVE_16(m68ki_read_pcrel_16(ea)));\r
- ea += 2;\r
- count++;\r
- }\r
-\r
- USE_CYCLES(count<<CYC_MOVEM_W);\r
-}\r
-\r
-\r
-void m68k_op_movem_16_er_pcix(void)\r
-{\r
- uint i = 0;\r
- uint register_list = OPER_I_16();\r
- uint ea = EA_PCIX_16();\r
- uint count = 0;\r
-\r
- for(; i < 16; i++)\r
- if(register_list & (1 << i))\r
- {\r
- REG_DA[i] = MAKE_INT_16(MASK_OUT_ABOVE_16(m68ki_read_pcrel_16(ea)));\r
- ea += 2;\r
- count++;\r
- }\r
-\r
- USE_CYCLES(count<<CYC_MOVEM_W);\r
-}\r
-\r
-\r
-void m68k_op_movem_16_er_ai(void)\r
-{\r
- uint i = 0;\r
- uint register_list = OPER_I_16();\r
- uint ea = EA_AY_AI_16();\r
- uint count = 0;\r
-\r
- for(; i < 16; i++)\r
- if(register_list & (1 << i))\r
- {\r
- REG_DA[i] = MAKE_INT_16(MASK_OUT_ABOVE_16(m68ki_read_16(ea)));\r
- ea += 2;\r
- count++;\r
- }\r
-\r
- USE_CYCLES(count<<CYC_MOVEM_W);\r
-}\r
-\r
-\r
-void m68k_op_movem_16_er_di(void)\r
-{\r
- uint i = 0;\r
- uint register_list = OPER_I_16();\r
- uint ea = EA_AY_DI_16();\r
- uint count = 0;\r
-\r
- for(; i < 16; i++)\r
- if(register_list & (1 << i))\r
- {\r
- REG_DA[i] = MAKE_INT_16(MASK_OUT_ABOVE_16(m68ki_read_16(ea)));\r
- ea += 2;\r
- count++;\r
- }\r
-\r
- USE_CYCLES(count<<CYC_MOVEM_W);\r
-}\r
-\r
-\r
-void m68k_op_movem_16_er_ix(void)\r
-{\r
- uint i = 0;\r
- uint register_list = OPER_I_16();\r
- uint ea = EA_AY_IX_16();\r
- uint count = 0;\r
-\r
- for(; i < 16; i++)\r
- if(register_list & (1 << i))\r
- {\r
- REG_DA[i] = MAKE_INT_16(MASK_OUT_ABOVE_16(m68ki_read_16(ea)));\r
- ea += 2;\r
- count++;\r
- }\r
-\r
- USE_CYCLES(count<<CYC_MOVEM_W);\r
-}\r
-\r
-\r
-void m68k_op_movem_16_er_aw(void)\r
-{\r
- uint i = 0;\r
- uint register_list = OPER_I_16();\r
- uint ea = EA_AW_16();\r
- uint count = 0;\r
-\r
- for(; i < 16; i++)\r
- if(register_list & (1 << i))\r
- {\r
- REG_DA[i] = MAKE_INT_16(MASK_OUT_ABOVE_16(m68ki_read_16(ea)));\r
- ea += 2;\r
- count++;\r
- }\r
-\r
- USE_CYCLES(count<<CYC_MOVEM_W);\r
-}\r
-\r
-\r
-void m68k_op_movem_16_er_al(void)\r
-{\r
- uint i = 0;\r
- uint register_list = OPER_I_16();\r
- uint ea = EA_AL_16();\r
- uint count = 0;\r
-\r
- for(; i < 16; i++)\r
- if(register_list & (1 << i))\r
- {\r
- REG_DA[i] = MAKE_INT_16(MASK_OUT_ABOVE_16(m68ki_read_16(ea)));\r
- ea += 2;\r
- count++;\r
- }\r
-\r
- USE_CYCLES(count<<CYC_MOVEM_W);\r
-}\r
-\r
-\r
-void m68k_op_movem_32_er_pi(void)\r
-{\r
- uint i = 0;\r
- uint register_list = OPER_I_16();\r
- uint ea = AY;\r
- uint count = 0;\r
-\r
- for(; i < 16; i++)\r
- if(register_list & (1 << i))\r
- {\r
- REG_DA[i] = m68ki_read_32(ea);\r
- ea += 4;\r
- count++;\r
- }\r
- AY = ea;\r
-\r
- USE_CYCLES(count<<CYC_MOVEM_L);\r
-}\r
-\r
-\r
-void m68k_op_movem_32_er_pcdi(void)\r
-{\r
- uint i = 0;\r
- uint register_list = OPER_I_16();\r
- uint ea = EA_PCDI_32();\r
- uint count = 0;\r
-\r
- for(; i < 16; i++)\r
- if(register_list & (1 << i))\r
- {\r
- REG_DA[i] = m68ki_read_pcrel_32(ea);\r
- ea += 4;\r
- count++;\r
- }\r
-\r
- USE_CYCLES(count<<CYC_MOVEM_L);\r
-}\r
-\r
-\r
-void m68k_op_movem_32_er_pcix(void)\r
-{\r
- uint i = 0;\r
- uint register_list = OPER_I_16();\r
- uint ea = EA_PCIX_32();\r
- uint count = 0;\r
-\r
- for(; i < 16; i++)\r
- if(register_list & (1 << i))\r
- {\r
- REG_DA[i] = m68ki_read_pcrel_32(ea);\r
- ea += 4;\r
- count++;\r
- }\r
-\r
- USE_CYCLES(count<<CYC_MOVEM_L);\r
-}\r
-\r
-\r
-void m68k_op_movem_32_er_ai(void)\r
-{\r
- uint i = 0;\r
- uint register_list = OPER_I_16();\r
- uint ea = EA_AY_AI_32();\r
- uint count = 0;\r
-\r
- for(; i < 16; i++)\r
- if(register_list & (1 << i))\r
- {\r
- REG_DA[i] = m68ki_read_32(ea);\r
- ea += 4;\r
- count++;\r
- }\r
-\r
- USE_CYCLES(count<<CYC_MOVEM_L);\r
-}\r
-\r
-\r
-void m68k_op_movem_32_er_di(void)\r
-{\r
- uint i = 0;\r
- uint register_list = OPER_I_16();\r
- uint ea = EA_AY_DI_32();\r
- uint count = 0;\r
-\r
- for(; i < 16; i++)\r
- if(register_list & (1 << i))\r
- {\r
- REG_DA[i] = m68ki_read_32(ea);\r
- ea += 4;\r
- count++;\r
- }\r
-\r
- USE_CYCLES(count<<CYC_MOVEM_L);\r
-}\r
-\r
-\r
-void m68k_op_movem_32_er_ix(void)\r
-{\r
- uint i = 0;\r
- uint register_list = OPER_I_16();\r
- uint ea = EA_AY_IX_32();\r
- uint count = 0;\r
-\r
- for(; i < 16; i++)\r
- if(register_list & (1 << i))\r
- {\r
- REG_DA[i] = m68ki_read_32(ea);\r
- ea += 4;\r
- count++;\r
- }\r
-\r
- USE_CYCLES(count<<CYC_MOVEM_L);\r
-}\r
-\r
-\r
-void m68k_op_movem_32_er_aw(void)\r
-{\r
- uint i = 0;\r
- uint register_list = OPER_I_16();\r
- uint ea = EA_AW_32();\r
- uint count = 0;\r
-\r
- for(; i < 16; i++)\r
- if(register_list & (1 << i))\r
- {\r
- REG_DA[i] = m68ki_read_32(ea);\r
- ea += 4;\r
- count++;\r
- }\r
-\r
- USE_CYCLES(count<<CYC_MOVEM_L);\r
-}\r
-\r
-\r
-void m68k_op_movem_32_er_al(void)\r
-{\r
- uint i = 0;\r
- uint register_list = OPER_I_16();\r
- uint ea = EA_AL_32();\r
- uint count = 0;\r
-\r
- for(; i < 16; i++)\r
- if(register_list & (1 << i))\r
- {\r
- REG_DA[i] = m68ki_read_32(ea);\r
- ea += 4;\r
- count++;\r
- }\r
-\r
- USE_CYCLES(count<<CYC_MOVEM_L);\r
-}\r
-\r
-\r
-void m68k_op_movep_16_re(void)\r
-{\r
- uint ea = EA_AY_DI_16();\r
- uint src = DX;\r
-\r
- m68ki_write_8(ea, MASK_OUT_ABOVE_8(src >> 8));\r
- m68ki_write_8(ea += 2, MASK_OUT_ABOVE_8(src));\r
-}\r
-\r
-\r
-void m68k_op_movep_32_re(void)\r
-{\r
- uint ea = EA_AY_DI_32();\r
- uint src = DX;\r
-\r
- m68ki_write_8(ea, MASK_OUT_ABOVE_8(src >> 24));\r
- m68ki_write_8(ea += 2, MASK_OUT_ABOVE_8(src >> 16));\r
- m68ki_write_8(ea += 2, MASK_OUT_ABOVE_8(src >> 8));\r
- m68ki_write_8(ea += 2, MASK_OUT_ABOVE_8(src));\r
-}\r
-\r
-\r
-void m68k_op_movep_16_er(void)\r
-{\r
- uint ea = EA_AY_DI_16();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | ((m68ki_read_8(ea) << 8) + m68ki_read_8(ea + 2));\r
-}\r
-\r
-\r
-void m68k_op_movep_32_er(void)\r
-{\r
- uint ea = EA_AY_DI_32();\r
-\r
- DX = (m68ki_read_8(ea) << 24) + (m68ki_read_8(ea + 2) << 16)\r
- + (m68ki_read_8(ea + 4) << 8) + m68ki_read_8(ea + 6);\r
-}\r
-\r
-\r
-void m68k_op_moves_8_ai(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- if(FLAG_S)\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_AI_8();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(BIT_B(word2)) /* Register to memory */\r
- {\r
- m68ki_write_8_fc(ea, REG_DFC, MASK_OUT_ABOVE_8(REG_DA[(word2 >> 12) & 15]));\r
- return;\r
- }\r
- if(BIT_F(word2)) /* Memory to address register */\r
- {\r
- REG_A[(word2 >> 12) & 7] = MAKE_INT_8(m68ki_read_8_fc(ea, REG_SFC));\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- /* Memory to data register */\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_BELOW_8(REG_D[(word2 >> 12) & 7]) | m68ki_read_8_fc(ea, REG_SFC);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_moves_8_pi(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- if(FLAG_S)\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_PI_8();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(BIT_B(word2)) /* Register to memory */\r
- {\r
- m68ki_write_8_fc(ea, REG_DFC, MASK_OUT_ABOVE_8(REG_DA[(word2 >> 12) & 15]));\r
- return;\r
- }\r
- if(BIT_F(word2)) /* Memory to address register */\r
- {\r
- REG_A[(word2 >> 12) & 7] = MAKE_INT_8(m68ki_read_8_fc(ea, REG_SFC));\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- /* Memory to data register */\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_BELOW_8(REG_D[(word2 >> 12) & 7]) | m68ki_read_8_fc(ea, REG_SFC);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_moves_8_pi7(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- if(FLAG_S)\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_A7_PI_8();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(BIT_B(word2)) /* Register to memory */\r
- {\r
- m68ki_write_8_fc(ea, REG_DFC, MASK_OUT_ABOVE_8(REG_DA[(word2 >> 12) & 15]));\r
- return;\r
- }\r
- if(BIT_F(word2)) /* Memory to address register */\r
- {\r
- REG_A[(word2 >> 12) & 7] = MAKE_INT_8(m68ki_read_8_fc(ea, REG_SFC));\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- /* Memory to data register */\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_BELOW_8(REG_D[(word2 >> 12) & 7]) | m68ki_read_8_fc(ea, REG_SFC);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_moves_8_pd(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- if(FLAG_S)\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_PD_8();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(BIT_B(word2)) /* Register to memory */\r
- {\r
- m68ki_write_8_fc(ea, REG_DFC, MASK_OUT_ABOVE_8(REG_DA[(word2 >> 12) & 15]));\r
- return;\r
- }\r
- if(BIT_F(word2)) /* Memory to address register */\r
- {\r
- REG_A[(word2 >> 12) & 7] = MAKE_INT_8(m68ki_read_8_fc(ea, REG_SFC));\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- /* Memory to data register */\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_BELOW_8(REG_D[(word2 >> 12) & 7]) | m68ki_read_8_fc(ea, REG_SFC);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_moves_8_pd7(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- if(FLAG_S)\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_A7_PD_8();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(BIT_B(word2)) /* Register to memory */\r
- {\r
- m68ki_write_8_fc(ea, REG_DFC, MASK_OUT_ABOVE_8(REG_DA[(word2 >> 12) & 15]));\r
- return;\r
- }\r
- if(BIT_F(word2)) /* Memory to address register */\r
- {\r
- REG_A[(word2 >> 12) & 7] = MAKE_INT_8(m68ki_read_8_fc(ea, REG_SFC));\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- /* Memory to data register */\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_BELOW_8(REG_D[(word2 >> 12) & 7]) | m68ki_read_8_fc(ea, REG_SFC);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_moves_8_di(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- if(FLAG_S)\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_DI_8();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(BIT_B(word2)) /* Register to memory */\r
- {\r
- m68ki_write_8_fc(ea, REG_DFC, MASK_OUT_ABOVE_8(REG_DA[(word2 >> 12) & 15]));\r
- return;\r
- }\r
- if(BIT_F(word2)) /* Memory to address register */\r
- {\r
- REG_A[(word2 >> 12) & 7] = MAKE_INT_8(m68ki_read_8_fc(ea, REG_SFC));\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- /* Memory to data register */\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_BELOW_8(REG_D[(word2 >> 12) & 7]) | m68ki_read_8_fc(ea, REG_SFC);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_moves_8_ix(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- if(FLAG_S)\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_IX_8();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(BIT_B(word2)) /* Register to memory */\r
- {\r
- m68ki_write_8_fc(ea, REG_DFC, MASK_OUT_ABOVE_8(REG_DA[(word2 >> 12) & 15]));\r
- return;\r
- }\r
- if(BIT_F(word2)) /* Memory to address register */\r
- {\r
- REG_A[(word2 >> 12) & 7] = MAKE_INT_8(m68ki_read_8_fc(ea, REG_SFC));\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- /* Memory to data register */\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_BELOW_8(REG_D[(word2 >> 12) & 7]) | m68ki_read_8_fc(ea, REG_SFC);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_moves_8_aw(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- if(FLAG_S)\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AW_8();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(BIT_B(word2)) /* Register to memory */\r
- {\r
- m68ki_write_8_fc(ea, REG_DFC, MASK_OUT_ABOVE_8(REG_DA[(word2 >> 12) & 15]));\r
- return;\r
- }\r
- if(BIT_F(word2)) /* Memory to address register */\r
- {\r
- REG_A[(word2 >> 12) & 7] = MAKE_INT_8(m68ki_read_8_fc(ea, REG_SFC));\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- /* Memory to data register */\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_BELOW_8(REG_D[(word2 >> 12) & 7]) | m68ki_read_8_fc(ea, REG_SFC);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_moves_8_al(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- if(FLAG_S)\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AL_8();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(BIT_B(word2)) /* Register to memory */\r
- {\r
- m68ki_write_8_fc(ea, REG_DFC, MASK_OUT_ABOVE_8(REG_DA[(word2 >> 12) & 15]));\r
- return;\r
- }\r
- if(BIT_F(word2)) /* Memory to address register */\r
- {\r
- REG_A[(word2 >> 12) & 7] = MAKE_INT_8(m68ki_read_8_fc(ea, REG_SFC));\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- /* Memory to data register */\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_BELOW_8(REG_D[(word2 >> 12) & 7]) | m68ki_read_8_fc(ea, REG_SFC);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_moves_16_ai(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- if(FLAG_S)\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_AI_16();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(BIT_B(word2)) /* Register to memory */\r
- {\r
- m68ki_write_16_fc(ea, REG_DFC, MASK_OUT_ABOVE_16(REG_DA[(word2 >> 12) & 15]));\r
- return;\r
- }\r
- if(BIT_F(word2)) /* Memory to address register */\r
- {\r
- REG_A[(word2 >> 12) & 7] = MAKE_INT_16(m68ki_read_16_fc(ea, REG_SFC));\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- /* Memory to data register */\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_BELOW_16(REG_D[(word2 >> 12) & 7]) | m68ki_read_16_fc(ea, REG_SFC);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_moves_16_pi(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- if(FLAG_S)\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_PI_16();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(BIT_B(word2)) /* Register to memory */\r
- {\r
- m68ki_write_16_fc(ea, REG_DFC, MASK_OUT_ABOVE_16(REG_DA[(word2 >> 12) & 15]));\r
- return;\r
- }\r
- if(BIT_F(word2)) /* Memory to address register */\r
- {\r
- REG_A[(word2 >> 12) & 7] = MAKE_INT_16(m68ki_read_16_fc(ea, REG_SFC));\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- /* Memory to data register */\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_BELOW_16(REG_D[(word2 >> 12) & 7]) | m68ki_read_16_fc(ea, REG_SFC);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_moves_16_pd(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- if(FLAG_S)\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_PD_16();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(BIT_B(word2)) /* Register to memory */\r
- {\r
- m68ki_write_16_fc(ea, REG_DFC, MASK_OUT_ABOVE_16(REG_DA[(word2 >> 12) & 15]));\r
- return;\r
- }\r
- if(BIT_F(word2)) /* Memory to address register */\r
- {\r
- REG_A[(word2 >> 12) & 7] = MAKE_INT_16(m68ki_read_16_fc(ea, REG_SFC));\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- /* Memory to data register */\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_BELOW_16(REG_D[(word2 >> 12) & 7]) | m68ki_read_16_fc(ea, REG_SFC);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_moves_16_di(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- if(FLAG_S)\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_DI_16();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(BIT_B(word2)) /* Register to memory */\r
- {\r
- m68ki_write_16_fc(ea, REG_DFC, MASK_OUT_ABOVE_16(REG_DA[(word2 >> 12) & 15]));\r
- return;\r
- }\r
- if(BIT_F(word2)) /* Memory to address register */\r
- {\r
- REG_A[(word2 >> 12) & 7] = MAKE_INT_16(m68ki_read_16_fc(ea, REG_SFC));\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- /* Memory to data register */\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_BELOW_16(REG_D[(word2 >> 12) & 7]) | m68ki_read_16_fc(ea, REG_SFC);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_moves_16_ix(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- if(FLAG_S)\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_IX_16();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(BIT_B(word2)) /* Register to memory */\r
- {\r
- m68ki_write_16_fc(ea, REG_DFC, MASK_OUT_ABOVE_16(REG_DA[(word2 >> 12) & 15]));\r
- return;\r
- }\r
- if(BIT_F(word2)) /* Memory to address register */\r
- {\r
- REG_A[(word2 >> 12) & 7] = MAKE_INT_16(m68ki_read_16_fc(ea, REG_SFC));\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- /* Memory to data register */\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_BELOW_16(REG_D[(word2 >> 12) & 7]) | m68ki_read_16_fc(ea, REG_SFC);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_moves_16_aw(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- if(FLAG_S)\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AW_16();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(BIT_B(word2)) /* Register to memory */\r
- {\r
- m68ki_write_16_fc(ea, REG_DFC, MASK_OUT_ABOVE_16(REG_DA[(word2 >> 12) & 15]));\r
- return;\r
- }\r
- if(BIT_F(word2)) /* Memory to address register */\r
- {\r
- REG_A[(word2 >> 12) & 7] = MAKE_INT_16(m68ki_read_16_fc(ea, REG_SFC));\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- /* Memory to data register */\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_BELOW_16(REG_D[(word2 >> 12) & 7]) | m68ki_read_16_fc(ea, REG_SFC);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_moves_16_al(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- if(FLAG_S)\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AL_16();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(BIT_B(word2)) /* Register to memory */\r
- {\r
- m68ki_write_16_fc(ea, REG_DFC, MASK_OUT_ABOVE_16(REG_DA[(word2 >> 12) & 15]));\r
- return;\r
- }\r
- if(BIT_F(word2)) /* Memory to address register */\r
- {\r
- REG_A[(word2 >> 12) & 7] = MAKE_INT_16(m68ki_read_16_fc(ea, REG_SFC));\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- /* Memory to data register */\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_BELOW_16(REG_D[(word2 >> 12) & 7]) | m68ki_read_16_fc(ea, REG_SFC);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_moves_32_ai(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- if(FLAG_S)\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_AI_32();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(BIT_B(word2)) /* Register to memory */\r
- {\r
- m68ki_write_32_fc(ea, REG_DFC, REG_DA[(word2 >> 12) & 15]);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- /* Memory to register */\r
- REG_DA[(word2 >> 12) & 15] = m68ki_read_32_fc(ea, REG_SFC);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_moves_32_pi(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- if(FLAG_S)\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_PI_32();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(BIT_B(word2)) /* Register to memory */\r
- {\r
- m68ki_write_32_fc(ea, REG_DFC, REG_DA[(word2 >> 12) & 15]);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- /* Memory to register */\r
- REG_DA[(word2 >> 12) & 15] = m68ki_read_32_fc(ea, REG_SFC);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_moves_32_pd(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- if(FLAG_S)\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_PD_32();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(BIT_B(word2)) /* Register to memory */\r
- {\r
- m68ki_write_32_fc(ea, REG_DFC, REG_DA[(word2 >> 12) & 15]);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- /* Memory to register */\r
- REG_DA[(word2 >> 12) & 15] = m68ki_read_32_fc(ea, REG_SFC);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_moves_32_di(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- if(FLAG_S)\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_DI_32();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(BIT_B(word2)) /* Register to memory */\r
- {\r
- m68ki_write_32_fc(ea, REG_DFC, REG_DA[(word2 >> 12) & 15]);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- /* Memory to register */\r
- REG_DA[(word2 >> 12) & 15] = m68ki_read_32_fc(ea, REG_SFC);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_moves_32_ix(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- if(FLAG_S)\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AY_IX_32();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(BIT_B(word2)) /* Register to memory */\r
- {\r
- m68ki_write_32_fc(ea, REG_DFC, REG_DA[(word2 >> 12) & 15]);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- /* Memory to register */\r
- REG_DA[(word2 >> 12) & 15] = m68ki_read_32_fc(ea, REG_SFC);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_moves_32_aw(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- if(FLAG_S)\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AW_32();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(BIT_B(word2)) /* Register to memory */\r
- {\r
- m68ki_write_32_fc(ea, REG_DFC, REG_DA[(word2 >> 12) & 15]);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- /* Memory to register */\r
- REG_DA[(word2 >> 12) & 15] = m68ki_read_32_fc(ea, REG_SFC);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_moves_32_al(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- if(FLAG_S)\r
- {\r
- uint word2 = OPER_I_16();\r
- uint ea = EA_AL_32();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- if(BIT_B(word2)) /* Register to memory */\r
- {\r
- m68ki_write_32_fc(ea, REG_DFC, REG_DA[(word2 >> 12) & 15]);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- /* Memory to register */\r
- REG_DA[(word2 >> 12) & 15] = m68ki_read_32_fc(ea, REG_SFC);\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- USE_CYCLES(2);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_moveq_32(void)\r
-{\r
- uint res = DX = MAKE_INT_8(MASK_OUT_ABOVE_8(REG_IR));\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_move16_32(void)\r
-{\r
- UINT16 w2 = OPER_I_16();\r
- int ax = REG_IR & 7;\r
- int ay = (w2 >> 12) & 7;\r
-\r
- m68ki_write_32(REG_A[ay], m68ki_read_32(REG_A[ax]));\r
- m68ki_write_32(REG_A[ay]+4, m68ki_read_32(REG_A[ax]+4));\r
- m68ki_write_32(REG_A[ay]+8, m68ki_read_32(REG_A[ax]+8));\r
- m68ki_write_32(REG_A[ay]+12, m68ki_read_32(REG_A[ax]+12));\r
-\r
- REG_A[ax] += 16;\r
- REG_A[ay] += 16;\r
-}\r
-\r
-\r
-void m68k_op_muls_16_d(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint res = MASK_OUT_ABOVE_32(MAKE_INT_16(DY) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));\r
-\r
- *r_dst = res;\r
-\r
- FLAG_Z = res;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_muls_16_ai(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_AY_AI_16()) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));\r
-\r
- *r_dst = res;\r
-\r
- FLAG_Z = res;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_muls_16_pi(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_AY_PI_16()) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));\r
-\r
- *r_dst = res;\r
-\r
- FLAG_Z = res;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_muls_16_pd(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_AY_PD_16()) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));\r
-\r
- *r_dst = res;\r
-\r
- FLAG_Z = res;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_muls_16_di(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_AY_DI_16()) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));\r
-\r
- *r_dst = res;\r
-\r
- FLAG_Z = res;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_muls_16_ix(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_AY_IX_16()) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));\r
-\r
- *r_dst = res;\r
-\r
- FLAG_Z = res;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_muls_16_aw(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_AW_16()) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));\r
-\r
- *r_dst = res;\r
-\r
- FLAG_Z = res;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_muls_16_al(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_AL_16()) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));\r
-\r
- *r_dst = res;\r
-\r
- FLAG_Z = res;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_muls_16_pcdi(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_PCDI_16()) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));\r
-\r
- *r_dst = res;\r
-\r
- FLAG_Z = res;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_muls_16_pcix(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_PCIX_16()) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));\r
-\r
- *r_dst = res;\r
-\r
- FLAG_Z = res;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_muls_16_i(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint res = MASK_OUT_ABOVE_32(MAKE_INT_16(OPER_I_16()) * MAKE_INT_16(MASK_OUT_ABOVE_16(*r_dst)));\r
-\r
- *r_dst = res;\r
-\r
- FLAG_Z = res;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_mulu_16_d(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint res = MASK_OUT_ABOVE_16(DY) * MASK_OUT_ABOVE_16(*r_dst);\r
-\r
- *r_dst = res;\r
-\r
- FLAG_Z = res;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_mulu_16_ai(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint res = OPER_AY_AI_16() * MASK_OUT_ABOVE_16(*r_dst);\r
-\r
- *r_dst = res;\r
-\r
- FLAG_Z = res;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_mulu_16_pi(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint res = OPER_AY_PI_16() * MASK_OUT_ABOVE_16(*r_dst);\r
-\r
- *r_dst = res;\r
-\r
- FLAG_Z = res;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_mulu_16_pd(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint res = OPER_AY_PD_16() * MASK_OUT_ABOVE_16(*r_dst);\r
-\r
- *r_dst = res;\r
-\r
- FLAG_Z = res;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_mulu_16_di(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint res = OPER_AY_DI_16() * MASK_OUT_ABOVE_16(*r_dst);\r
-\r
- *r_dst = res;\r
-\r
- FLAG_Z = res;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_mulu_16_ix(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint res = OPER_AY_IX_16() * MASK_OUT_ABOVE_16(*r_dst);\r
-\r
- *r_dst = res;\r
-\r
- FLAG_Z = res;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_mulu_16_aw(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint res = OPER_AW_16() * MASK_OUT_ABOVE_16(*r_dst);\r
-\r
- *r_dst = res;\r
-\r
- FLAG_Z = res;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_mulu_16_al(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint res = OPER_AL_16() * MASK_OUT_ABOVE_16(*r_dst);\r
-\r
- *r_dst = res;\r
-\r
- FLAG_Z = res;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_mulu_16_pcdi(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint res = OPER_PCDI_16() * MASK_OUT_ABOVE_16(*r_dst);\r
-\r
- *r_dst = res;\r
-\r
- FLAG_Z = res;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_mulu_16_pcix(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint res = OPER_PCIX_16() * MASK_OUT_ABOVE_16(*r_dst);\r
-\r
- *r_dst = res;\r
-\r
- FLAG_Z = res;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_mulu_16_i(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint res = OPER_I_16() * MASK_OUT_ABOVE_16(*r_dst);\r
-\r
- *r_dst = res;\r
-\r
- FLAG_Z = res;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_mull_32_d(void)\r
-{\r
-#if M68K_USE_64_BIT\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint64 src = DY;\r
- uint64 dst = REG_D[(word2 >> 12) & 7];\r
- uint64 res;\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- res = (sint64)((sint32)src) * (sint64)((sint32)dst);\r
- if(!BIT_A(word2))\r
- {\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = ((sint64)res != (sint32)res)<<7;\r
- REG_D[(word2 >> 12) & 7] = FLAG_Z;\r
- return;\r
- }\r
- FLAG_Z = MASK_OUT_ABOVE_32(res) | (res>>32);\r
- FLAG_N = NFLAG_64(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- REG_D[word2 & 7] = (res >> 32);\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);\r
- return;\r
- }\r
-\r
- res = src * dst;\r
- if(!BIT_A(word2))\r
- {\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = (res > 0xffffffff)<<7;\r
- REG_D[(word2 >> 12) & 7] = FLAG_Z;\r
- return;\r
- }\r
- FLAG_Z = MASK_OUT_ABOVE_32(res) | (res>>32);\r
- FLAG_N = NFLAG_64(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- REG_D[word2 & 7] = (res >> 32);\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#else\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint src = DY;\r
- uint dst = REG_D[(word2 >> 12) & 7];\r
- uint neg = GET_MSB_32(src ^ dst);\r
- uint src1;\r
- uint src2;\r
- uint dst1;\r
- uint dst2;\r
- uint r1;\r
- uint r2;\r
- uint r3;\r
- uint r4;\r
- uint lo;\r
- uint hi;\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- if(GET_MSB_32(src))\r
- src = (uint)MASK_OUT_ABOVE_32(-(sint)src);\r
- if(GET_MSB_32(dst))\r
- dst = (uint)MASK_OUT_ABOVE_32(-(sint)dst);\r
- }\r
-\r
- src1 = MASK_OUT_ABOVE_16(src);\r
- src2 = src>>16;\r
- dst1 = MASK_OUT_ABOVE_16(dst);\r
- dst2 = dst>>16;\r
-\r
-\r
- r1 = src1 * dst1;\r
- r2 = src1 * dst2;\r
- r3 = src2 * dst1;\r
- r4 = src2 * dst2;\r
-\r
- lo = r1 + (MASK_OUT_ABOVE_16(r2)<<16) + (MASK_OUT_ABOVE_16(r3)<<16);\r
- hi = r4 + (r2>>16) + (r3>>16) + (((r1>>16) + MASK_OUT_ABOVE_16(r2) + MASK_OUT_ABOVE_16(r3)) >> 16);\r
-\r
- if(BIT_B(word2) && neg)\r
- {\r
- hi = (uint)MASK_OUT_ABOVE_32((-(sint)hi) - (lo != 0));\r
- lo = (uint)MASK_OUT_ABOVE_32(-(sint)lo);\r
- }\r
-\r
- if(BIT_A(word2))\r
- {\r
- REG_D[word2 & 7] = hi;\r
- REG_D[(word2 >> 12) & 7] = lo;\r
- FLAG_N = NFLAG_32(hi);\r
- FLAG_Z = hi | lo;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- REG_D[(word2 >> 12) & 7] = lo;\r
- FLAG_N = NFLAG_32(lo);\r
- FLAG_Z = lo;\r
- if(BIT_B(word2))\r
- FLAG_V = (!((GET_MSB_32(lo) && hi == 0xffffffff) || (!GET_MSB_32(lo) && !hi)))<<7;\r
- else\r
- FLAG_V = (hi != 0) << 7;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#endif\r
-}\r
-\r
-\r
-void m68k_op_mull_32_ai(void)\r
-{\r
-#if M68K_USE_64_BIT\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint64 src = OPER_AY_AI_32();\r
- uint64 dst = REG_D[(word2 >> 12) & 7];\r
- uint64 res;\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- res = (sint64)((sint32)src) * (sint64)((sint32)dst);\r
- if(!BIT_A(word2))\r
- {\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = ((sint64)res != (sint32)res)<<7;\r
- REG_D[(word2 >> 12) & 7] = FLAG_Z;\r
- return;\r
- }\r
- FLAG_Z = MASK_OUT_ABOVE_32(res) | (res>>32);\r
- FLAG_N = NFLAG_64(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- REG_D[word2 & 7] = (res >> 32);\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);\r
- return;\r
- }\r
-\r
- res = src * dst;\r
- if(!BIT_A(word2))\r
- {\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = (res > 0xffffffff)<<7;\r
- REG_D[(word2 >> 12) & 7] = FLAG_Z;\r
- return;\r
- }\r
- FLAG_Z = MASK_OUT_ABOVE_32(res) | (res>>32);\r
- FLAG_N = NFLAG_64(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- REG_D[word2 & 7] = (res >> 32);\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#else\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint src = OPER_AY_AI_32();\r
- uint dst = REG_D[(word2 >> 12) & 7];\r
- uint neg = GET_MSB_32(src ^ dst);\r
- uint src1;\r
- uint src2;\r
- uint dst1;\r
- uint dst2;\r
- uint r1;\r
- uint r2;\r
- uint r3;\r
- uint r4;\r
- uint lo;\r
- uint hi;\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- if(GET_MSB_32(src))\r
- src = (uint)MASK_OUT_ABOVE_32(-(sint)src);\r
- if(GET_MSB_32(dst))\r
- dst = (uint)MASK_OUT_ABOVE_32(-(sint)dst);\r
- }\r
-\r
- src1 = MASK_OUT_ABOVE_16(src);\r
- src2 = src>>16;\r
- dst1 = MASK_OUT_ABOVE_16(dst);\r
- dst2 = dst>>16;\r
-\r
-\r
- r1 = src1 * dst1;\r
- r2 = src1 * dst2;\r
- r3 = src2 * dst1;\r
- r4 = src2 * dst2;\r
-\r
- lo = r1 + (MASK_OUT_ABOVE_16(r2)<<16) + (MASK_OUT_ABOVE_16(r3)<<16);\r
- hi = r4 + (r2>>16) + (r3>>16) + (((r1>>16) + MASK_OUT_ABOVE_16(r2) + MASK_OUT_ABOVE_16(r3)) >> 16);\r
-\r
- if(BIT_B(word2) && neg)\r
- {\r
- hi = (uint)MASK_OUT_ABOVE_32((-(sint)hi) - (lo != 0));\r
- lo = (uint)MASK_OUT_ABOVE_32(-(sint)lo);\r
- }\r
-\r
- if(BIT_A(word2))\r
- {\r
- REG_D[word2 & 7] = hi;\r
- REG_D[(word2 >> 12) & 7] = lo;\r
- FLAG_N = NFLAG_32(hi);\r
- FLAG_Z = hi | lo;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- REG_D[(word2 >> 12) & 7] = lo;\r
- FLAG_N = NFLAG_32(lo);\r
- FLAG_Z = lo;\r
- if(BIT_B(word2))\r
- FLAG_V = (!((GET_MSB_32(lo) && hi == 0xffffffff) || (!GET_MSB_32(lo) && !hi)))<<7;\r
- else\r
- FLAG_V = (hi != 0) << 7;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#endif\r
-}\r
-\r
-\r
-void m68k_op_mull_32_pi(void)\r
-{\r
-#if M68K_USE_64_BIT\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint64 src = OPER_AY_PI_32();\r
- uint64 dst = REG_D[(word2 >> 12) & 7];\r
- uint64 res;\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- res = (sint64)((sint32)src) * (sint64)((sint32)dst);\r
- if(!BIT_A(word2))\r
- {\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = ((sint64)res != (sint32)res)<<7;\r
- REG_D[(word2 >> 12) & 7] = FLAG_Z;\r
- return;\r
- }\r
- FLAG_Z = MASK_OUT_ABOVE_32(res) | (res>>32);\r
- FLAG_N = NFLAG_64(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- REG_D[word2 & 7] = (res >> 32);\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);\r
- return;\r
- }\r
-\r
- res = src * dst;\r
- if(!BIT_A(word2))\r
- {\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = (res > 0xffffffff)<<7;\r
- REG_D[(word2 >> 12) & 7] = FLAG_Z;\r
- return;\r
- }\r
- FLAG_Z = MASK_OUT_ABOVE_32(res) | (res>>32);\r
- FLAG_N = NFLAG_64(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- REG_D[word2 & 7] = (res >> 32);\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#else\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint src = OPER_AY_PI_32();\r
- uint dst = REG_D[(word2 >> 12) & 7];\r
- uint neg = GET_MSB_32(src ^ dst);\r
- uint src1;\r
- uint src2;\r
- uint dst1;\r
- uint dst2;\r
- uint r1;\r
- uint r2;\r
- uint r3;\r
- uint r4;\r
- uint lo;\r
- uint hi;\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- if(GET_MSB_32(src))\r
- src = (uint)MASK_OUT_ABOVE_32(-(sint)src);\r
- if(GET_MSB_32(dst))\r
- dst = (uint)MASK_OUT_ABOVE_32(-(sint)dst);\r
- }\r
-\r
- src1 = MASK_OUT_ABOVE_16(src);\r
- src2 = src>>16;\r
- dst1 = MASK_OUT_ABOVE_16(dst);\r
- dst2 = dst>>16;\r
-\r
-\r
- r1 = src1 * dst1;\r
- r2 = src1 * dst2;\r
- r3 = src2 * dst1;\r
- r4 = src2 * dst2;\r
-\r
- lo = r1 + (MASK_OUT_ABOVE_16(r2)<<16) + (MASK_OUT_ABOVE_16(r3)<<16);\r
- hi = r4 + (r2>>16) + (r3>>16) + (((r1>>16) + MASK_OUT_ABOVE_16(r2) + MASK_OUT_ABOVE_16(r3)) >> 16);\r
-\r
- if(BIT_B(word2) && neg)\r
- {\r
- hi = (uint)MASK_OUT_ABOVE_32((-(sint)hi) - (lo != 0));\r
- lo = (uint)MASK_OUT_ABOVE_32(-(sint)lo);\r
- }\r
-\r
- if(BIT_A(word2))\r
- {\r
- REG_D[word2 & 7] = hi;\r
- REG_D[(word2 >> 12) & 7] = lo;\r
- FLAG_N = NFLAG_32(hi);\r
- FLAG_Z = hi | lo;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- REG_D[(word2 >> 12) & 7] = lo;\r
- FLAG_N = NFLAG_32(lo);\r
- FLAG_Z = lo;\r
- if(BIT_B(word2))\r
- FLAG_V = (!((GET_MSB_32(lo) && hi == 0xffffffff) || (!GET_MSB_32(lo) && !hi)))<<7;\r
- else\r
- FLAG_V = (hi != 0) << 7;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#endif\r
-}\r
-\r
-\r
-void m68k_op_mull_32_pd(void)\r
-{\r
-#if M68K_USE_64_BIT\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint64 src = OPER_AY_PD_32();\r
- uint64 dst = REG_D[(word2 >> 12) & 7];\r
- uint64 res;\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- res = (sint64)((sint32)src) * (sint64)((sint32)dst);\r
- if(!BIT_A(word2))\r
- {\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = ((sint64)res != (sint32)res)<<7;\r
- REG_D[(word2 >> 12) & 7] = FLAG_Z;\r
- return;\r
- }\r
- FLAG_Z = MASK_OUT_ABOVE_32(res) | (res>>32);\r
- FLAG_N = NFLAG_64(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- REG_D[word2 & 7] = (res >> 32);\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);\r
- return;\r
- }\r
-\r
- res = src * dst;\r
- if(!BIT_A(word2))\r
- {\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = (res > 0xffffffff)<<7;\r
- REG_D[(word2 >> 12) & 7] = FLAG_Z;\r
- return;\r
- }\r
- FLAG_Z = MASK_OUT_ABOVE_32(res) | (res>>32);\r
- FLAG_N = NFLAG_64(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- REG_D[word2 & 7] = (res >> 32);\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#else\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint src = OPER_AY_PD_32();\r
- uint dst = REG_D[(word2 >> 12) & 7];\r
- uint neg = GET_MSB_32(src ^ dst);\r
- uint src1;\r
- uint src2;\r
- uint dst1;\r
- uint dst2;\r
- uint r1;\r
- uint r2;\r
- uint r3;\r
- uint r4;\r
- uint lo;\r
- uint hi;\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- if(GET_MSB_32(src))\r
- src = (uint)MASK_OUT_ABOVE_32(-(sint)src);\r
- if(GET_MSB_32(dst))\r
- dst = (uint)MASK_OUT_ABOVE_32(-(sint)dst);\r
- }\r
-\r
- src1 = MASK_OUT_ABOVE_16(src);\r
- src2 = src>>16;\r
- dst1 = MASK_OUT_ABOVE_16(dst);\r
- dst2 = dst>>16;\r
-\r
-\r
- r1 = src1 * dst1;\r
- r2 = src1 * dst2;\r
- r3 = src2 * dst1;\r
- r4 = src2 * dst2;\r
-\r
- lo = r1 + (MASK_OUT_ABOVE_16(r2)<<16) + (MASK_OUT_ABOVE_16(r3)<<16);\r
- hi = r4 + (r2>>16) + (r3>>16) + (((r1>>16) + MASK_OUT_ABOVE_16(r2) + MASK_OUT_ABOVE_16(r3)) >> 16);\r
-\r
- if(BIT_B(word2) && neg)\r
- {\r
- hi = (uint)MASK_OUT_ABOVE_32((-(sint)hi) - (lo != 0));\r
- lo = (uint)MASK_OUT_ABOVE_32(-(sint)lo);\r
- }\r
-\r
- if(BIT_A(word2))\r
- {\r
- REG_D[word2 & 7] = hi;\r
- REG_D[(word2 >> 12) & 7] = lo;\r
- FLAG_N = NFLAG_32(hi);\r
- FLAG_Z = hi | lo;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- REG_D[(word2 >> 12) & 7] = lo;\r
- FLAG_N = NFLAG_32(lo);\r
- FLAG_Z = lo;\r
- if(BIT_B(word2))\r
- FLAG_V = (!((GET_MSB_32(lo) && hi == 0xffffffff) || (!GET_MSB_32(lo) && !hi)))<<7;\r
- else\r
- FLAG_V = (hi != 0) << 7;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#endif\r
-}\r
-\r
-\r
-void m68k_op_mull_32_di(void)\r
-{\r
-#if M68K_USE_64_BIT\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint64 src = OPER_AY_DI_32();\r
- uint64 dst = REG_D[(word2 >> 12) & 7];\r
- uint64 res;\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- res = (sint64)((sint32)src) * (sint64)((sint32)dst);\r
- if(!BIT_A(word2))\r
- {\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = ((sint64)res != (sint32)res)<<7;\r
- REG_D[(word2 >> 12) & 7] = FLAG_Z;\r
- return;\r
- }\r
- FLAG_Z = MASK_OUT_ABOVE_32(res) | (res>>32);\r
- FLAG_N = NFLAG_64(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- REG_D[word2 & 7] = (res >> 32);\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);\r
- return;\r
- }\r
-\r
- res = src * dst;\r
- if(!BIT_A(word2))\r
- {\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = (res > 0xffffffff)<<7;\r
- REG_D[(word2 >> 12) & 7] = FLAG_Z;\r
- return;\r
- }\r
- FLAG_Z = MASK_OUT_ABOVE_32(res) | (res>>32);\r
- FLAG_N = NFLAG_64(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- REG_D[word2 & 7] = (res >> 32);\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#else\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint src = OPER_AY_DI_32();\r
- uint dst = REG_D[(word2 >> 12) & 7];\r
- uint neg = GET_MSB_32(src ^ dst);\r
- uint src1;\r
- uint src2;\r
- uint dst1;\r
- uint dst2;\r
- uint r1;\r
- uint r2;\r
- uint r3;\r
- uint r4;\r
- uint lo;\r
- uint hi;\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- if(GET_MSB_32(src))\r
- src = (uint)MASK_OUT_ABOVE_32(-(sint)src);\r
- if(GET_MSB_32(dst))\r
- dst = (uint)MASK_OUT_ABOVE_32(-(sint)dst);\r
- }\r
-\r
- src1 = MASK_OUT_ABOVE_16(src);\r
- src2 = src>>16;\r
- dst1 = MASK_OUT_ABOVE_16(dst);\r
- dst2 = dst>>16;\r
-\r
-\r
- r1 = src1 * dst1;\r
- r2 = src1 * dst2;\r
- r3 = src2 * dst1;\r
- r4 = src2 * dst2;\r
-\r
- lo = r1 + (MASK_OUT_ABOVE_16(r2)<<16) + (MASK_OUT_ABOVE_16(r3)<<16);\r
- hi = r4 + (r2>>16) + (r3>>16) + (((r1>>16) + MASK_OUT_ABOVE_16(r2) + MASK_OUT_ABOVE_16(r3)) >> 16);\r
-\r
- if(BIT_B(word2) && neg)\r
- {\r
- hi = (uint)MASK_OUT_ABOVE_32((-(sint)hi) - (lo != 0));\r
- lo = (uint)MASK_OUT_ABOVE_32(-(sint)lo);\r
- }\r
-\r
- if(BIT_A(word2))\r
- {\r
- REG_D[word2 & 7] = hi;\r
- REG_D[(word2 >> 12) & 7] = lo;\r
- FLAG_N = NFLAG_32(hi);\r
- FLAG_Z = hi | lo;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- REG_D[(word2 >> 12) & 7] = lo;\r
- FLAG_N = NFLAG_32(lo);\r
- FLAG_Z = lo;\r
- if(BIT_B(word2))\r
- FLAG_V = (!((GET_MSB_32(lo) && hi == 0xffffffff) || (!GET_MSB_32(lo) && !hi)))<<7;\r
- else\r
- FLAG_V = (hi != 0) << 7;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#endif\r
-}\r
-\r
-\r
-void m68k_op_mull_32_ix(void)\r
-{\r
-#if M68K_USE_64_BIT\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint64 src = OPER_AY_IX_32();\r
- uint64 dst = REG_D[(word2 >> 12) & 7];\r
- uint64 res;\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- res = (sint64)((sint32)src) * (sint64)((sint32)dst);\r
- if(!BIT_A(word2))\r
- {\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = ((sint64)res != (sint32)res)<<7;\r
- REG_D[(word2 >> 12) & 7] = FLAG_Z;\r
- return;\r
- }\r
- FLAG_Z = MASK_OUT_ABOVE_32(res) | (res>>32);\r
- FLAG_N = NFLAG_64(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- REG_D[word2 & 7] = (res >> 32);\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);\r
- return;\r
- }\r
-\r
- res = src * dst;\r
- if(!BIT_A(word2))\r
- {\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = (res > 0xffffffff)<<7;\r
- REG_D[(word2 >> 12) & 7] = FLAG_Z;\r
- return;\r
- }\r
- FLAG_Z = MASK_OUT_ABOVE_32(res) | (res>>32);\r
- FLAG_N = NFLAG_64(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- REG_D[word2 & 7] = (res >> 32);\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#else\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint src = OPER_AY_IX_32();\r
- uint dst = REG_D[(word2 >> 12) & 7];\r
- uint neg = GET_MSB_32(src ^ dst);\r
- uint src1;\r
- uint src2;\r
- uint dst1;\r
- uint dst2;\r
- uint r1;\r
- uint r2;\r
- uint r3;\r
- uint r4;\r
- uint lo;\r
- uint hi;\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- if(GET_MSB_32(src))\r
- src = (uint)MASK_OUT_ABOVE_32(-(sint)src);\r
- if(GET_MSB_32(dst))\r
- dst = (uint)MASK_OUT_ABOVE_32(-(sint)dst);\r
- }\r
-\r
- src1 = MASK_OUT_ABOVE_16(src);\r
- src2 = src>>16;\r
- dst1 = MASK_OUT_ABOVE_16(dst);\r
- dst2 = dst>>16;\r
-\r
-\r
- r1 = src1 * dst1;\r
- r2 = src1 * dst2;\r
- r3 = src2 * dst1;\r
- r4 = src2 * dst2;\r
-\r
- lo = r1 + (MASK_OUT_ABOVE_16(r2)<<16) + (MASK_OUT_ABOVE_16(r3)<<16);\r
- hi = r4 + (r2>>16) + (r3>>16) + (((r1>>16) + MASK_OUT_ABOVE_16(r2) + MASK_OUT_ABOVE_16(r3)) >> 16);\r
-\r
- if(BIT_B(word2) && neg)\r
- {\r
- hi = (uint)MASK_OUT_ABOVE_32((-(sint)hi) - (lo != 0));\r
- lo = (uint)MASK_OUT_ABOVE_32(-(sint)lo);\r
- }\r
-\r
- if(BIT_A(word2))\r
- {\r
- REG_D[word2 & 7] = hi;\r
- REG_D[(word2 >> 12) & 7] = lo;\r
- FLAG_N = NFLAG_32(hi);\r
- FLAG_Z = hi | lo;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- REG_D[(word2 >> 12) & 7] = lo;\r
- FLAG_N = NFLAG_32(lo);\r
- FLAG_Z = lo;\r
- if(BIT_B(word2))\r
- FLAG_V = (!((GET_MSB_32(lo) && hi == 0xffffffff) || (!GET_MSB_32(lo) && !hi)))<<7;\r
- else\r
- FLAG_V = (hi != 0) << 7;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#endif\r
-}\r
-\r
-\r
-void m68k_op_mull_32_aw(void)\r
-{\r
-#if M68K_USE_64_BIT\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint64 src = OPER_AW_32();\r
- uint64 dst = REG_D[(word2 >> 12) & 7];\r
- uint64 res;\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- res = (sint64)((sint32)src) * (sint64)((sint32)dst);\r
- if(!BIT_A(word2))\r
- {\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = ((sint64)res != (sint32)res)<<7;\r
- REG_D[(word2 >> 12) & 7] = FLAG_Z;\r
- return;\r
- }\r
- FLAG_Z = MASK_OUT_ABOVE_32(res) | (res>>32);\r
- FLAG_N = NFLAG_64(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- REG_D[word2 & 7] = (res >> 32);\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);\r
- return;\r
- }\r
-\r
- res = src * dst;\r
- if(!BIT_A(word2))\r
- {\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = (res > 0xffffffff)<<7;\r
- REG_D[(word2 >> 12) & 7] = FLAG_Z;\r
- return;\r
- }\r
- FLAG_Z = MASK_OUT_ABOVE_32(res) | (res>>32);\r
- FLAG_N = NFLAG_64(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- REG_D[word2 & 7] = (res >> 32);\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#else\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint src = OPER_AW_32();\r
- uint dst = REG_D[(word2 >> 12) & 7];\r
- uint neg = GET_MSB_32(src ^ dst);\r
- uint src1;\r
- uint src2;\r
- uint dst1;\r
- uint dst2;\r
- uint r1;\r
- uint r2;\r
- uint r3;\r
- uint r4;\r
- uint lo;\r
- uint hi;\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- if(GET_MSB_32(src))\r
- src = (uint)MASK_OUT_ABOVE_32(-(sint)src);\r
- if(GET_MSB_32(dst))\r
- dst = (uint)MASK_OUT_ABOVE_32(-(sint)dst);\r
- }\r
-\r
- src1 = MASK_OUT_ABOVE_16(src);\r
- src2 = src>>16;\r
- dst1 = MASK_OUT_ABOVE_16(dst);\r
- dst2 = dst>>16;\r
-\r
-\r
- r1 = src1 * dst1;\r
- r2 = src1 * dst2;\r
- r3 = src2 * dst1;\r
- r4 = src2 * dst2;\r
-\r
- lo = r1 + (MASK_OUT_ABOVE_16(r2)<<16) + (MASK_OUT_ABOVE_16(r3)<<16);\r
- hi = r4 + (r2>>16) + (r3>>16) + (((r1>>16) + MASK_OUT_ABOVE_16(r2) + MASK_OUT_ABOVE_16(r3)) >> 16);\r
-\r
- if(BIT_B(word2) && neg)\r
- {\r
- hi = (uint)MASK_OUT_ABOVE_32((-(sint)hi) - (lo != 0));\r
- lo = (uint)MASK_OUT_ABOVE_32(-(sint)lo);\r
- }\r
-\r
- if(BIT_A(word2))\r
- {\r
- REG_D[word2 & 7] = hi;\r
- REG_D[(word2 >> 12) & 7] = lo;\r
- FLAG_N = NFLAG_32(hi);\r
- FLAG_Z = hi | lo;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- REG_D[(word2 >> 12) & 7] = lo;\r
- FLAG_N = NFLAG_32(lo);\r
- FLAG_Z = lo;\r
- if(BIT_B(word2))\r
- FLAG_V = (!((GET_MSB_32(lo) && hi == 0xffffffff) || (!GET_MSB_32(lo) && !hi)))<<7;\r
- else\r
- FLAG_V = (hi != 0) << 7;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#endif\r
-}\r
-\r
-\r
-void m68k_op_mull_32_al(void)\r
-{\r
-#if M68K_USE_64_BIT\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint64 src = OPER_AL_32();\r
- uint64 dst = REG_D[(word2 >> 12) & 7];\r
- uint64 res;\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- res = (sint64)((sint32)src) * (sint64)((sint32)dst);\r
- if(!BIT_A(word2))\r
- {\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = ((sint64)res != (sint32)res)<<7;\r
- REG_D[(word2 >> 12) & 7] = FLAG_Z;\r
- return;\r
- }\r
- FLAG_Z = MASK_OUT_ABOVE_32(res) | (res>>32);\r
- FLAG_N = NFLAG_64(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- REG_D[word2 & 7] = (res >> 32);\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);\r
- return;\r
- }\r
-\r
- res = src * dst;\r
- if(!BIT_A(word2))\r
- {\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = (res > 0xffffffff)<<7;\r
- REG_D[(word2 >> 12) & 7] = FLAG_Z;\r
- return;\r
- }\r
- FLAG_Z = MASK_OUT_ABOVE_32(res) | (res>>32);\r
- FLAG_N = NFLAG_64(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- REG_D[word2 & 7] = (res >> 32);\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#else\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint src = OPER_AL_32();\r
- uint dst = REG_D[(word2 >> 12) & 7];\r
- uint neg = GET_MSB_32(src ^ dst);\r
- uint src1;\r
- uint src2;\r
- uint dst1;\r
- uint dst2;\r
- uint r1;\r
- uint r2;\r
- uint r3;\r
- uint r4;\r
- uint lo;\r
- uint hi;\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- if(GET_MSB_32(src))\r
- src = (uint)MASK_OUT_ABOVE_32(-(sint)src);\r
- if(GET_MSB_32(dst))\r
- dst = (uint)MASK_OUT_ABOVE_32(-(sint)dst);\r
- }\r
-\r
- src1 = MASK_OUT_ABOVE_16(src);\r
- src2 = src>>16;\r
- dst1 = MASK_OUT_ABOVE_16(dst);\r
- dst2 = dst>>16;\r
-\r
-\r
- r1 = src1 * dst1;\r
- r2 = src1 * dst2;\r
- r3 = src2 * dst1;\r
- r4 = src2 * dst2;\r
-\r
- lo = r1 + (MASK_OUT_ABOVE_16(r2)<<16) + (MASK_OUT_ABOVE_16(r3)<<16);\r
- hi = r4 + (r2>>16) + (r3>>16) + (((r1>>16) + MASK_OUT_ABOVE_16(r2) + MASK_OUT_ABOVE_16(r3)) >> 16);\r
-\r
- if(BIT_B(word2) && neg)\r
- {\r
- hi = (uint)MASK_OUT_ABOVE_32((-(sint)hi) - (lo != 0));\r
- lo = (uint)MASK_OUT_ABOVE_32(-(sint)lo);\r
- }\r
-\r
- if(BIT_A(word2))\r
- {\r
- REG_D[word2 & 7] = hi;\r
- REG_D[(word2 >> 12) & 7] = lo;\r
- FLAG_N = NFLAG_32(hi);\r
- FLAG_Z = hi | lo;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- REG_D[(word2 >> 12) & 7] = lo;\r
- FLAG_N = NFLAG_32(lo);\r
- FLAG_Z = lo;\r
- if(BIT_B(word2))\r
- FLAG_V = (!((GET_MSB_32(lo) && hi == 0xffffffff) || (!GET_MSB_32(lo) && !hi)))<<7;\r
- else\r
- FLAG_V = (hi != 0) << 7;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#endif\r
-}\r
-\r
-\r
-void m68k_op_mull_32_pcdi(void)\r
-{\r
-#if M68K_USE_64_BIT\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint64 src = OPER_PCDI_32();\r
- uint64 dst = REG_D[(word2 >> 12) & 7];\r
- uint64 res;\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- res = (sint64)((sint32)src) * (sint64)((sint32)dst);\r
- if(!BIT_A(word2))\r
- {\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = ((sint64)res != (sint32)res)<<7;\r
- REG_D[(word2 >> 12) & 7] = FLAG_Z;\r
- return;\r
- }\r
- FLAG_Z = MASK_OUT_ABOVE_32(res) | (res>>32);\r
- FLAG_N = NFLAG_64(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- REG_D[word2 & 7] = (res >> 32);\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);\r
- return;\r
- }\r
-\r
- res = src * dst;\r
- if(!BIT_A(word2))\r
- {\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = (res > 0xffffffff)<<7;\r
- REG_D[(word2 >> 12) & 7] = FLAG_Z;\r
- return;\r
- }\r
- FLAG_Z = MASK_OUT_ABOVE_32(res) | (res>>32);\r
- FLAG_N = NFLAG_64(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- REG_D[word2 & 7] = (res >> 32);\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#else\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint src = OPER_PCDI_32();\r
- uint dst = REG_D[(word2 >> 12) & 7];\r
- uint neg = GET_MSB_32(src ^ dst);\r
- uint src1;\r
- uint src2;\r
- uint dst1;\r
- uint dst2;\r
- uint r1;\r
- uint r2;\r
- uint r3;\r
- uint r4;\r
- uint lo;\r
- uint hi;\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- if(GET_MSB_32(src))\r
- src = (uint)MASK_OUT_ABOVE_32(-(sint)src);\r
- if(GET_MSB_32(dst))\r
- dst = (uint)MASK_OUT_ABOVE_32(-(sint)dst);\r
- }\r
-\r
- src1 = MASK_OUT_ABOVE_16(src);\r
- src2 = src>>16;\r
- dst1 = MASK_OUT_ABOVE_16(dst);\r
- dst2 = dst>>16;\r
-\r
-\r
- r1 = src1 * dst1;\r
- r2 = src1 * dst2;\r
- r3 = src2 * dst1;\r
- r4 = src2 * dst2;\r
-\r
- lo = r1 + (MASK_OUT_ABOVE_16(r2)<<16) + (MASK_OUT_ABOVE_16(r3)<<16);\r
- hi = r4 + (r2>>16) + (r3>>16) + (((r1>>16) + MASK_OUT_ABOVE_16(r2) + MASK_OUT_ABOVE_16(r3)) >> 16);\r
-\r
- if(BIT_B(word2) && neg)\r
- {\r
- hi = (uint)MASK_OUT_ABOVE_32((-(sint)hi) - (lo != 0));\r
- lo = (uint)MASK_OUT_ABOVE_32(-(sint)lo);\r
- }\r
-\r
- if(BIT_A(word2))\r
- {\r
- REG_D[word2 & 7] = hi;\r
- REG_D[(word2 >> 12) & 7] = lo;\r
- FLAG_N = NFLAG_32(hi);\r
- FLAG_Z = hi | lo;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- REG_D[(word2 >> 12) & 7] = lo;\r
- FLAG_N = NFLAG_32(lo);\r
- FLAG_Z = lo;\r
- if(BIT_B(word2))\r
- FLAG_V = (!((GET_MSB_32(lo) && hi == 0xffffffff) || (!GET_MSB_32(lo) && !hi)))<<7;\r
- else\r
- FLAG_V = (hi != 0) << 7;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#endif\r
-}\r
-\r
-\r
-void m68k_op_mull_32_pcix(void)\r
-{\r
-#if M68K_USE_64_BIT\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint64 src = OPER_PCIX_32();\r
- uint64 dst = REG_D[(word2 >> 12) & 7];\r
- uint64 res;\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- res = (sint64)((sint32)src) * (sint64)((sint32)dst);\r
- if(!BIT_A(word2))\r
- {\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = ((sint64)res != (sint32)res)<<7;\r
- REG_D[(word2 >> 12) & 7] = FLAG_Z;\r
- return;\r
- }\r
- FLAG_Z = MASK_OUT_ABOVE_32(res) | (res>>32);\r
- FLAG_N = NFLAG_64(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- REG_D[word2 & 7] = (res >> 32);\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);\r
- return;\r
- }\r
-\r
- res = src * dst;\r
- if(!BIT_A(word2))\r
- {\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = (res > 0xffffffff)<<7;\r
- REG_D[(word2 >> 12) & 7] = FLAG_Z;\r
- return;\r
- }\r
- FLAG_Z = MASK_OUT_ABOVE_32(res) | (res>>32);\r
- FLAG_N = NFLAG_64(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- REG_D[word2 & 7] = (res >> 32);\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#else\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint src = OPER_PCIX_32();\r
- uint dst = REG_D[(word2 >> 12) & 7];\r
- uint neg = GET_MSB_32(src ^ dst);\r
- uint src1;\r
- uint src2;\r
- uint dst1;\r
- uint dst2;\r
- uint r1;\r
- uint r2;\r
- uint r3;\r
- uint r4;\r
- uint lo;\r
- uint hi;\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- if(GET_MSB_32(src))\r
- src = (uint)MASK_OUT_ABOVE_32(-(sint)src);\r
- if(GET_MSB_32(dst))\r
- dst = (uint)MASK_OUT_ABOVE_32(-(sint)dst);\r
- }\r
-\r
- src1 = MASK_OUT_ABOVE_16(src);\r
- src2 = src>>16;\r
- dst1 = MASK_OUT_ABOVE_16(dst);\r
- dst2 = dst>>16;\r
-\r
-\r
- r1 = src1 * dst1;\r
- r2 = src1 * dst2;\r
- r3 = src2 * dst1;\r
- r4 = src2 * dst2;\r
-\r
- lo = r1 + (MASK_OUT_ABOVE_16(r2)<<16) + (MASK_OUT_ABOVE_16(r3)<<16);\r
- hi = r4 + (r2>>16) + (r3>>16) + (((r1>>16) + MASK_OUT_ABOVE_16(r2) + MASK_OUT_ABOVE_16(r3)) >> 16);\r
-\r
- if(BIT_B(word2) && neg)\r
- {\r
- hi = (uint)MASK_OUT_ABOVE_32((-(sint)hi) - (lo != 0));\r
- lo = (uint)MASK_OUT_ABOVE_32(-(sint)lo);\r
- }\r
-\r
- if(BIT_A(word2))\r
- {\r
- REG_D[word2 & 7] = hi;\r
- REG_D[(word2 >> 12) & 7] = lo;\r
- FLAG_N = NFLAG_32(hi);\r
- FLAG_Z = hi | lo;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- REG_D[(word2 >> 12) & 7] = lo;\r
- FLAG_N = NFLAG_32(lo);\r
- FLAG_Z = lo;\r
- if(BIT_B(word2))\r
- FLAG_V = (!((GET_MSB_32(lo) && hi == 0xffffffff) || (!GET_MSB_32(lo) && !hi)))<<7;\r
- else\r
- FLAG_V = (hi != 0) << 7;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#endif\r
-}\r
-\r
-\r
-void m68k_op_mull_32_i(void)\r
-{\r
-#if M68K_USE_64_BIT\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint64 src = OPER_I_32();\r
- uint64 dst = REG_D[(word2 >> 12) & 7];\r
- uint64 res;\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- res = (sint64)((sint32)src) * (sint64)((sint32)dst);\r
- if(!BIT_A(word2))\r
- {\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = ((sint64)res != (sint32)res)<<7;\r
- REG_D[(word2 >> 12) & 7] = FLAG_Z;\r
- return;\r
- }\r
- FLAG_Z = MASK_OUT_ABOVE_32(res) | (res>>32);\r
- FLAG_N = NFLAG_64(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- REG_D[word2 & 7] = (res >> 32);\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);\r
- return;\r
- }\r
-\r
- res = src * dst;\r
- if(!BIT_A(word2))\r
- {\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_V = (res > 0xffffffff)<<7;\r
- REG_D[(word2 >> 12) & 7] = FLAG_Z;\r
- return;\r
- }\r
- FLAG_Z = MASK_OUT_ABOVE_32(res) | (res>>32);\r
- FLAG_N = NFLAG_64(res);\r
- FLAG_V = VFLAG_CLEAR;\r
- REG_D[word2 & 7] = (res >> 32);\r
- REG_D[(word2 >> 12) & 7] = MASK_OUT_ABOVE_32(res);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#else\r
-\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint word2 = OPER_I_16();\r
- uint src = OPER_I_32();\r
- uint dst = REG_D[(word2 >> 12) & 7];\r
- uint neg = GET_MSB_32(src ^ dst);\r
- uint src1;\r
- uint src2;\r
- uint dst1;\r
- uint dst2;\r
- uint r1;\r
- uint r2;\r
- uint r3;\r
- uint r4;\r
- uint lo;\r
- uint hi;\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
-\r
- if(BIT_B(word2)) /* signed */\r
- {\r
- if(GET_MSB_32(src))\r
- src = (uint)MASK_OUT_ABOVE_32(-(sint)src);\r
- if(GET_MSB_32(dst))\r
- dst = (uint)MASK_OUT_ABOVE_32(-(sint)dst);\r
- }\r
-\r
- src1 = MASK_OUT_ABOVE_16(src);\r
- src2 = src>>16;\r
- dst1 = MASK_OUT_ABOVE_16(dst);\r
- dst2 = dst>>16;\r
-\r
-\r
- r1 = src1 * dst1;\r
- r2 = src1 * dst2;\r
- r3 = src2 * dst1;\r
- r4 = src2 * dst2;\r
-\r
- lo = r1 + (MASK_OUT_ABOVE_16(r2)<<16) + (MASK_OUT_ABOVE_16(r3)<<16);\r
- hi = r4 + (r2>>16) + (r3>>16) + (((r1>>16) + MASK_OUT_ABOVE_16(r2) + MASK_OUT_ABOVE_16(r3)) >> 16);\r
-\r
- if(BIT_B(word2) && neg)\r
- {\r
- hi = (uint)MASK_OUT_ABOVE_32((-(sint)hi) - (lo != 0));\r
- lo = (uint)MASK_OUT_ABOVE_32(-(sint)lo);\r
- }\r
-\r
- if(BIT_A(word2))\r
- {\r
- REG_D[word2 & 7] = hi;\r
- REG_D[(word2 >> 12) & 7] = lo;\r
- FLAG_N = NFLAG_32(hi);\r
- FLAG_Z = hi | lo;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- REG_D[(word2 >> 12) & 7] = lo;\r
- FLAG_N = NFLAG_32(lo);\r
- FLAG_Z = lo;\r
- if(BIT_B(word2))\r
- FLAG_V = (!((GET_MSB_32(lo) && hi == 0xffffffff) || (!GET_MSB_32(lo) && !hi)))<<7;\r
- else\r
- FLAG_V = (hi != 0) << 7;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-\r
-#endif\r
-}\r
-\r
-\r
-/* ======================================================================== */\r
-/* ============================== END OF FILE ============================= */\r
-/* ======================================================================== */\r
-\r
-\r
+++ /dev/null
-#include "m68kcpu.h"\r
-\r
-/* ======================================================================== */\r
-/* ========================= INSTRUCTION HANDLERS ========================= */\r
-/* ======================================================================== */\r
-\r
-\r
-void m68k_op_nbcd_8_d(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint dst = *r_dst;\r
- uint res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1());\r
-\r
- if(res != 0x9a)\r
- {\r
- FLAG_V = ~res; /* Undefined V behavior */\r
-\r
- if((res & 0x0f) == 0xa)\r
- res = (res & 0xf0) + 0x10;\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
-\r
- FLAG_V &= res; /* Undefined V behavior part II */\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
-\r
- FLAG_Z |= res;\r
- FLAG_C = CFLAG_SET;\r
- FLAG_X = XFLAG_SET;\r
- }\r
- else\r
- {\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_X = XFLAG_CLEAR;\r
- }\r
- FLAG_N = NFLAG_8(res); /* Undefined N behavior */\r
-}\r
-\r
-\r
-void m68k_op_nbcd_8_ai(void)\r
-{\r
- uint ea = EA_AY_AI_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1());\r
-\r
- if(res != 0x9a)\r
- {\r
- FLAG_V = ~res; /* Undefined V behavior */\r
-\r
- if((res & 0x0f) == 0xa)\r
- res = (res & 0xf0) + 0x10;\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
-\r
- FLAG_V &= res; /* Undefined V behavior part II */\r
-\r
- m68ki_write_8(ea, MASK_OUT_ABOVE_8(res));\r
-\r
- FLAG_Z |= res;\r
- FLAG_C = CFLAG_SET;\r
- FLAG_X = XFLAG_SET;\r
- }\r
- else\r
- {\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_X = XFLAG_CLEAR;\r
- }\r
- FLAG_N = NFLAG_8(res); /* Undefined N behavior */\r
-}\r
-\r
-\r
-void m68k_op_nbcd_8_pi(void)\r
-{\r
- uint ea = EA_AY_PI_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1());\r
-\r
- if(res != 0x9a)\r
- {\r
- FLAG_V = ~res; /* Undefined V behavior */\r
-\r
- if((res & 0x0f) == 0xa)\r
- res = (res & 0xf0) + 0x10;\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
-\r
- FLAG_V &= res; /* Undefined V behavior part II */\r
-\r
- m68ki_write_8(ea, MASK_OUT_ABOVE_8(res));\r
-\r
- FLAG_Z |= res;\r
- FLAG_C = CFLAG_SET;\r
- FLAG_X = XFLAG_SET;\r
- }\r
- else\r
- {\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_X = XFLAG_CLEAR;\r
- }\r
- FLAG_N = NFLAG_8(res); /* Undefined N behavior */\r
-}\r
-\r
-\r
-void m68k_op_nbcd_8_pi7(void)\r
-{\r
- uint ea = EA_A7_PI_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1());\r
-\r
- if(res != 0x9a)\r
- {\r
- FLAG_V = ~res; /* Undefined V behavior */\r
-\r
- if((res & 0x0f) == 0xa)\r
- res = (res & 0xf0) + 0x10;\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
-\r
- FLAG_V &= res; /* Undefined V behavior part II */\r
-\r
- m68ki_write_8(ea, MASK_OUT_ABOVE_8(res));\r
-\r
- FLAG_Z |= res;\r
- FLAG_C = CFLAG_SET;\r
- FLAG_X = XFLAG_SET;\r
- }\r
- else\r
- {\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_X = XFLAG_CLEAR;\r
- }\r
- FLAG_N = NFLAG_8(res); /* Undefined N behavior */\r
-}\r
-\r
-\r
-void m68k_op_nbcd_8_pd(void)\r
-{\r
- uint ea = EA_AY_PD_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1());\r
-\r
- if(res != 0x9a)\r
- {\r
- FLAG_V = ~res; /* Undefined V behavior */\r
-\r
- if((res & 0x0f) == 0xa)\r
- res = (res & 0xf0) + 0x10;\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
-\r
- FLAG_V &= res; /* Undefined V behavior part II */\r
-\r
- m68ki_write_8(ea, MASK_OUT_ABOVE_8(res));\r
-\r
- FLAG_Z |= res;\r
- FLAG_C = CFLAG_SET;\r
- FLAG_X = XFLAG_SET;\r
- }\r
- else\r
- {\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_X = XFLAG_CLEAR;\r
- }\r
- FLAG_N = NFLAG_8(res); /* Undefined N behavior */\r
-}\r
-\r
-\r
-void m68k_op_nbcd_8_pd7(void)\r
-{\r
- uint ea = EA_A7_PD_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1());\r
-\r
- if(res != 0x9a)\r
- {\r
- FLAG_V = ~res; /* Undefined V behavior */\r
-\r
- if((res & 0x0f) == 0xa)\r
- res = (res & 0xf0) + 0x10;\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
-\r
- FLAG_V &= res; /* Undefined V behavior part II */\r
-\r
- m68ki_write_8(ea, MASK_OUT_ABOVE_8(res));\r
-\r
- FLAG_Z |= res;\r
- FLAG_C = CFLAG_SET;\r
- FLAG_X = XFLAG_SET;\r
- }\r
- else\r
- {\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_X = XFLAG_CLEAR;\r
- }\r
- FLAG_N = NFLAG_8(res); /* Undefined N behavior */\r
-}\r
-\r
-\r
-void m68k_op_nbcd_8_di(void)\r
-{\r
- uint ea = EA_AY_DI_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1());\r
-\r
- if(res != 0x9a)\r
- {\r
- FLAG_V = ~res; /* Undefined V behavior */\r
-\r
- if((res & 0x0f) == 0xa)\r
- res = (res & 0xf0) + 0x10;\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
-\r
- FLAG_V &= res; /* Undefined V behavior part II */\r
-\r
- m68ki_write_8(ea, MASK_OUT_ABOVE_8(res));\r
-\r
- FLAG_Z |= res;\r
- FLAG_C = CFLAG_SET;\r
- FLAG_X = XFLAG_SET;\r
- }\r
- else\r
- {\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_X = XFLAG_CLEAR;\r
- }\r
- FLAG_N = NFLAG_8(res); /* Undefined N behavior */\r
-}\r
-\r
-\r
-void m68k_op_nbcd_8_ix(void)\r
-{\r
- uint ea = EA_AY_IX_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1());\r
-\r
- if(res != 0x9a)\r
- {\r
- FLAG_V = ~res; /* Undefined V behavior */\r
-\r
- if((res & 0x0f) == 0xa)\r
- res = (res & 0xf0) + 0x10;\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
-\r
- FLAG_V &= res; /* Undefined V behavior part II */\r
-\r
- m68ki_write_8(ea, MASK_OUT_ABOVE_8(res));\r
-\r
- FLAG_Z |= res;\r
- FLAG_C = CFLAG_SET;\r
- FLAG_X = XFLAG_SET;\r
- }\r
- else\r
- {\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_X = XFLAG_CLEAR;\r
- }\r
- FLAG_N = NFLAG_8(res); /* Undefined N behavior */\r
-}\r
-\r
-\r
-void m68k_op_nbcd_8_aw(void)\r
-{\r
- uint ea = EA_AW_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1());\r
-\r
- if(res != 0x9a)\r
- {\r
- FLAG_V = ~res; /* Undefined V behavior */\r
-\r
- if((res & 0x0f) == 0xa)\r
- res = (res & 0xf0) + 0x10;\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
-\r
- FLAG_V &= res; /* Undefined V behavior part II */\r
-\r
- m68ki_write_8(ea, MASK_OUT_ABOVE_8(res));\r
-\r
- FLAG_Z |= res;\r
- FLAG_C = CFLAG_SET;\r
- FLAG_X = XFLAG_SET;\r
- }\r
- else\r
- {\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_X = XFLAG_CLEAR;\r
- }\r
- FLAG_N = NFLAG_8(res); /* Undefined N behavior */\r
-}\r
-\r
-\r
-void m68k_op_nbcd_8_al(void)\r
-{\r
- uint ea = EA_AL_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1());\r
-\r
- if(res != 0x9a)\r
- {\r
- FLAG_V = ~res; /* Undefined V behavior */\r
-\r
- if((res & 0x0f) == 0xa)\r
- res = (res & 0xf0) + 0x10;\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
-\r
- FLAG_V &= res; /* Undefined V behavior part II */\r
-\r
- m68ki_write_8(ea, MASK_OUT_ABOVE_8(res));\r
-\r
- FLAG_Z |= res;\r
- FLAG_C = CFLAG_SET;\r
- FLAG_X = XFLAG_SET;\r
- }\r
- else\r
- {\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_X = XFLAG_CLEAR;\r
- }\r
- FLAG_N = NFLAG_8(res); /* Undefined N behavior */\r
-}\r
-\r
-\r
-void m68k_op_neg_8_d(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint res = 0 - MASK_OUT_ABOVE_8(*r_dst);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_C = FLAG_X = CFLAG_8(res);\r
- FLAG_V = *r_dst & res;\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_neg_8_ai(void)\r
-{\r
- uint ea = EA_AY_AI_8();\r
- uint src = m68ki_read_8(ea);\r
- uint res = 0 - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_C = FLAG_X = CFLAG_8(res);\r
- FLAG_V = src & res;\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_neg_8_pi(void)\r
-{\r
- uint ea = EA_AY_PI_8();\r
- uint src = m68ki_read_8(ea);\r
- uint res = 0 - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_C = FLAG_X = CFLAG_8(res);\r
- FLAG_V = src & res;\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_neg_8_pi7(void)\r
-{\r
- uint ea = EA_A7_PI_8();\r
- uint src = m68ki_read_8(ea);\r
- uint res = 0 - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_C = FLAG_X = CFLAG_8(res);\r
- FLAG_V = src & res;\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_neg_8_pd(void)\r
-{\r
- uint ea = EA_AY_PD_8();\r
- uint src = m68ki_read_8(ea);\r
- uint res = 0 - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_C = FLAG_X = CFLAG_8(res);\r
- FLAG_V = src & res;\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_neg_8_pd7(void)\r
-{\r
- uint ea = EA_A7_PD_8();\r
- uint src = m68ki_read_8(ea);\r
- uint res = 0 - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_C = FLAG_X = CFLAG_8(res);\r
- FLAG_V = src & res;\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_neg_8_di(void)\r
-{\r
- uint ea = EA_AY_DI_8();\r
- uint src = m68ki_read_8(ea);\r
- uint res = 0 - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_C = FLAG_X = CFLAG_8(res);\r
- FLAG_V = src & res;\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_neg_8_ix(void)\r
-{\r
- uint ea = EA_AY_IX_8();\r
- uint src = m68ki_read_8(ea);\r
- uint res = 0 - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_C = FLAG_X = CFLAG_8(res);\r
- FLAG_V = src & res;\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_neg_8_aw(void)\r
-{\r
- uint ea = EA_AW_8();\r
- uint src = m68ki_read_8(ea);\r
- uint res = 0 - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_C = FLAG_X = CFLAG_8(res);\r
- FLAG_V = src & res;\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_neg_8_al(void)\r
-{\r
- uint ea = EA_AL_8();\r
- uint src = m68ki_read_8(ea);\r
- uint res = 0 - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_C = FLAG_X = CFLAG_8(res);\r
- FLAG_V = src & res;\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_neg_16_d(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint res = 0 - MASK_OUT_ABOVE_16(*r_dst);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_C = FLAG_X = CFLAG_16(res);\r
- FLAG_V = (*r_dst & res)>>8;\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_neg_16_ai(void)\r
-{\r
- uint ea = EA_AY_AI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = 0 - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_C = FLAG_X = CFLAG_16(res);\r
- FLAG_V = (src & res)>>8;\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_neg_16_pi(void)\r
-{\r
- uint ea = EA_AY_PI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = 0 - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_C = FLAG_X = CFLAG_16(res);\r
- FLAG_V = (src & res)>>8;\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_neg_16_pd(void)\r
-{\r
- uint ea = EA_AY_PD_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = 0 - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_C = FLAG_X = CFLAG_16(res);\r
- FLAG_V = (src & res)>>8;\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_neg_16_di(void)\r
-{\r
- uint ea = EA_AY_DI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = 0 - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_C = FLAG_X = CFLAG_16(res);\r
- FLAG_V = (src & res)>>8;\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_neg_16_ix(void)\r
-{\r
- uint ea = EA_AY_IX_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = 0 - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_C = FLAG_X = CFLAG_16(res);\r
- FLAG_V = (src & res)>>8;\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_neg_16_aw(void)\r
-{\r
- uint ea = EA_AW_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = 0 - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_C = FLAG_X = CFLAG_16(res);\r
- FLAG_V = (src & res)>>8;\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_neg_16_al(void)\r
-{\r
- uint ea = EA_AL_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = 0 - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_C = FLAG_X = CFLAG_16(res);\r
- FLAG_V = (src & res)>>8;\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_neg_32_d(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint res = 0 - *r_dst;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_C = FLAG_X = CFLAG_SUB_32(*r_dst, 0, res);\r
- FLAG_V = (*r_dst & res)>>24;\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_neg_32_ai(void)\r
-{\r
- uint ea = EA_AY_AI_32();\r
- uint src = m68ki_read_32(ea);\r
- uint res = 0 - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_C = FLAG_X = CFLAG_SUB_32(src, 0, res);\r
- FLAG_V = (src & res)>>24;\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_neg_32_pi(void)\r
-{\r
- uint ea = EA_AY_PI_32();\r
- uint src = m68ki_read_32(ea);\r
- uint res = 0 - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_C = FLAG_X = CFLAG_SUB_32(src, 0, res);\r
- FLAG_V = (src & res)>>24;\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_neg_32_pd(void)\r
-{\r
- uint ea = EA_AY_PD_32();\r
- uint src = m68ki_read_32(ea);\r
- uint res = 0 - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_C = FLAG_X = CFLAG_SUB_32(src, 0, res);\r
- FLAG_V = (src & res)>>24;\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_neg_32_di(void)\r
-{\r
- uint ea = EA_AY_DI_32();\r
- uint src = m68ki_read_32(ea);\r
- uint res = 0 - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_C = FLAG_X = CFLAG_SUB_32(src, 0, res);\r
- FLAG_V = (src & res)>>24;\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_neg_32_ix(void)\r
-{\r
- uint ea = EA_AY_IX_32();\r
- uint src = m68ki_read_32(ea);\r
- uint res = 0 - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_C = FLAG_X = CFLAG_SUB_32(src, 0, res);\r
- FLAG_V = (src & res)>>24;\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_neg_32_aw(void)\r
-{\r
- uint ea = EA_AW_32();\r
- uint src = m68ki_read_32(ea);\r
- uint res = 0 - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_C = FLAG_X = CFLAG_SUB_32(src, 0, res);\r
- FLAG_V = (src & res)>>24;\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_neg_32_al(void)\r
-{\r
- uint ea = EA_AL_32();\r
- uint src = m68ki_read_32(ea);\r
- uint res = 0 - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_C = FLAG_X = CFLAG_SUB_32(src, 0, res);\r
- FLAG_V = (src & res)>>24;\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_negx_8_d(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint res = 0 - MASK_OUT_ABOVE_8(*r_dst) - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = *r_dst & res;\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
- FLAG_Z |= res;\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
-}\r
-\r
-\r
-void m68k_op_negx_8_ai(void)\r
-{\r
- uint ea = EA_AY_AI_8();\r
- uint src = m68ki_read_8(ea);\r
- uint res = 0 - src - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = src & res;\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_negx_8_pi(void)\r
-{\r
- uint ea = EA_AY_PI_8();\r
- uint src = m68ki_read_8(ea);\r
- uint res = 0 - src - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = src & res;\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_negx_8_pi7(void)\r
-{\r
- uint ea = EA_A7_PI_8();\r
- uint src = m68ki_read_8(ea);\r
- uint res = 0 - src - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = src & res;\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_negx_8_pd(void)\r
-{\r
- uint ea = EA_AY_PD_8();\r
- uint src = m68ki_read_8(ea);\r
- uint res = 0 - src - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = src & res;\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_negx_8_pd7(void)\r
-{\r
- uint ea = EA_A7_PD_8();\r
- uint src = m68ki_read_8(ea);\r
- uint res = 0 - src - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = src & res;\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_negx_8_di(void)\r
-{\r
- uint ea = EA_AY_DI_8();\r
- uint src = m68ki_read_8(ea);\r
- uint res = 0 - src - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = src & res;\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_negx_8_ix(void)\r
-{\r
- uint ea = EA_AY_IX_8();\r
- uint src = m68ki_read_8(ea);\r
- uint res = 0 - src - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = src & res;\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_negx_8_aw(void)\r
-{\r
- uint ea = EA_AW_8();\r
- uint src = m68ki_read_8(ea);\r
- uint res = 0 - src - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = src & res;\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_negx_8_al(void)\r
-{\r
- uint ea = EA_AL_8();\r
- uint src = m68ki_read_8(ea);\r
- uint res = 0 - src - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = src & res;\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_negx_16_d(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint res = 0 - MASK_OUT_ABOVE_16(*r_dst) - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = (*r_dst & res)>>8;\r
-\r
- res = MASK_OUT_ABOVE_16(res);\r
- FLAG_Z |= res;\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
-}\r
-\r
-\r
-void m68k_op_negx_16_ai(void)\r
-{\r
- uint ea = EA_AY_AI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = 0 - MASK_OUT_ABOVE_16(src) - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = (src & res)>>8;\r
-\r
- res = MASK_OUT_ABOVE_16(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_16(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_negx_16_pi(void)\r
-{\r
- uint ea = EA_AY_PI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = 0 - MASK_OUT_ABOVE_16(src) - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = (src & res)>>8;\r
-\r
- res = MASK_OUT_ABOVE_16(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_16(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_negx_16_pd(void)\r
-{\r
- uint ea = EA_AY_PD_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = 0 - MASK_OUT_ABOVE_16(src) - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = (src & res)>>8;\r
-\r
- res = MASK_OUT_ABOVE_16(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_16(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_negx_16_di(void)\r
-{\r
- uint ea = EA_AY_DI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = 0 - MASK_OUT_ABOVE_16(src) - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = (src & res)>>8;\r
-\r
- res = MASK_OUT_ABOVE_16(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_16(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_negx_16_ix(void)\r
-{\r
- uint ea = EA_AY_IX_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = 0 - MASK_OUT_ABOVE_16(src) - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = (src & res)>>8;\r
-\r
- res = MASK_OUT_ABOVE_16(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_16(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_negx_16_aw(void)\r
-{\r
- uint ea = EA_AW_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = 0 - MASK_OUT_ABOVE_16(src) - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = (src & res)>>8;\r
-\r
- res = MASK_OUT_ABOVE_16(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_16(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_negx_16_al(void)\r
-{\r
- uint ea = EA_AL_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = 0 - MASK_OUT_ABOVE_16(src) - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = (src & res)>>8;\r
-\r
- res = MASK_OUT_ABOVE_16(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_16(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_negx_32_d(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint res = 0 - MASK_OUT_ABOVE_32(*r_dst) - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(*r_dst, 0, res);\r
- FLAG_V = (*r_dst & res)>>24;\r
-\r
- res = MASK_OUT_ABOVE_32(res);\r
- FLAG_Z |= res;\r
-\r
- *r_dst = res;\r
-}\r
-\r
-\r
-void m68k_op_negx_32_ai(void)\r
-{\r
- uint ea = EA_AY_AI_32();\r
- uint src = m68ki_read_32(ea);\r
- uint res = 0 - MASK_OUT_ABOVE_32(src) - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, 0, res);\r
- FLAG_V = (src & res)>>24;\r
-\r
- res = MASK_OUT_ABOVE_32(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_32(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_negx_32_pi(void)\r
-{\r
- uint ea = EA_AY_PI_32();\r
- uint src = m68ki_read_32(ea);\r
- uint res = 0 - MASK_OUT_ABOVE_32(src) - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, 0, res);\r
- FLAG_V = (src & res)>>24;\r
-\r
- res = MASK_OUT_ABOVE_32(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_32(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_negx_32_pd(void)\r
-{\r
- uint ea = EA_AY_PD_32();\r
- uint src = m68ki_read_32(ea);\r
- uint res = 0 - MASK_OUT_ABOVE_32(src) - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, 0, res);\r
- FLAG_V = (src & res)>>24;\r
-\r
- res = MASK_OUT_ABOVE_32(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_32(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_negx_32_di(void)\r
-{\r
- uint ea = EA_AY_DI_32();\r
- uint src = m68ki_read_32(ea);\r
- uint res = 0 - MASK_OUT_ABOVE_32(src) - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, 0, res);\r
- FLAG_V = (src & res)>>24;\r
-\r
- res = MASK_OUT_ABOVE_32(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_32(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_negx_32_ix(void)\r
-{\r
- uint ea = EA_AY_IX_32();\r
- uint src = m68ki_read_32(ea);\r
- uint res = 0 - MASK_OUT_ABOVE_32(src) - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, 0, res);\r
- FLAG_V = (src & res)>>24;\r
-\r
- res = MASK_OUT_ABOVE_32(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_32(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_negx_32_aw(void)\r
-{\r
- uint ea = EA_AW_32();\r
- uint src = m68ki_read_32(ea);\r
- uint res = 0 - MASK_OUT_ABOVE_32(src) - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, 0, res);\r
- FLAG_V = (src & res)>>24;\r
-\r
- res = MASK_OUT_ABOVE_32(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_32(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_negx_32_al(void)\r
-{\r
- uint ea = EA_AL_32();\r
- uint src = m68ki_read_32(ea);\r
- uint res = 0 - MASK_OUT_ABOVE_32(src) - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, 0, res);\r
- FLAG_V = (src & res)>>24;\r
-\r
- res = MASK_OUT_ABOVE_32(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_32(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_nop(void)\r
-{\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
-}\r
-\r
-\r
-void m68k_op_not_8_d(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint res = MASK_OUT_ABOVE_8(~*r_dst);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_not_8_ai(void)\r
-{\r
- uint ea = EA_AY_AI_8();\r
- uint res = MASK_OUT_ABOVE_8(~m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_not_8_pi(void)\r
-{\r
- uint ea = EA_AY_PI_8();\r
- uint res = MASK_OUT_ABOVE_8(~m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_not_8_pi7(void)\r
-{\r
- uint ea = EA_A7_PI_8();\r
- uint res = MASK_OUT_ABOVE_8(~m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_not_8_pd(void)\r
-{\r
- uint ea = EA_AY_PD_8();\r
- uint res = MASK_OUT_ABOVE_8(~m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_not_8_pd7(void)\r
-{\r
- uint ea = EA_A7_PD_8();\r
- uint res = MASK_OUT_ABOVE_8(~m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_not_8_di(void)\r
-{\r
- uint ea = EA_AY_DI_8();\r
- uint res = MASK_OUT_ABOVE_8(~m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_not_8_ix(void)\r
-{\r
- uint ea = EA_AY_IX_8();\r
- uint res = MASK_OUT_ABOVE_8(~m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_not_8_aw(void)\r
-{\r
- uint ea = EA_AW_8();\r
- uint res = MASK_OUT_ABOVE_8(~m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_not_8_al(void)\r
-{\r
- uint ea = EA_AL_8();\r
- uint res = MASK_OUT_ABOVE_8(~m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_not_16_d(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint res = MASK_OUT_ABOVE_16(~*r_dst);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_not_16_ai(void)\r
-{\r
- uint ea = EA_AY_AI_16();\r
- uint res = MASK_OUT_ABOVE_16(~m68ki_read_16(ea));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_not_16_pi(void)\r
-{\r
- uint ea = EA_AY_PI_16();\r
- uint res = MASK_OUT_ABOVE_16(~m68ki_read_16(ea));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_not_16_pd(void)\r
-{\r
- uint ea = EA_AY_PD_16();\r
- uint res = MASK_OUT_ABOVE_16(~m68ki_read_16(ea));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_not_16_di(void)\r
-{\r
- uint ea = EA_AY_DI_16();\r
- uint res = MASK_OUT_ABOVE_16(~m68ki_read_16(ea));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_not_16_ix(void)\r
-{\r
- uint ea = EA_AY_IX_16();\r
- uint res = MASK_OUT_ABOVE_16(~m68ki_read_16(ea));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_not_16_aw(void)\r
-{\r
- uint ea = EA_AW_16();\r
- uint res = MASK_OUT_ABOVE_16(~m68ki_read_16(ea));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_not_16_al(void)\r
-{\r
- uint ea = EA_AL_16();\r
- uint res = MASK_OUT_ABOVE_16(~m68ki_read_16(ea));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_not_32_d(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint res = *r_dst = MASK_OUT_ABOVE_32(~*r_dst);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_not_32_ai(void)\r
-{\r
- uint ea = EA_AY_AI_32();\r
- uint res = MASK_OUT_ABOVE_32(~m68ki_read_32(ea));\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_not_32_pi(void)\r
-{\r
- uint ea = EA_AY_PI_32();\r
- uint res = MASK_OUT_ABOVE_32(~m68ki_read_32(ea));\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_not_32_pd(void)\r
-{\r
- uint ea = EA_AY_PD_32();\r
- uint res = MASK_OUT_ABOVE_32(~m68ki_read_32(ea));\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_not_32_di(void)\r
-{\r
- uint ea = EA_AY_DI_32();\r
- uint res = MASK_OUT_ABOVE_32(~m68ki_read_32(ea));\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_not_32_ix(void)\r
-{\r
- uint ea = EA_AY_IX_32();\r
- uint res = MASK_OUT_ABOVE_32(~m68ki_read_32(ea));\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_not_32_aw(void)\r
-{\r
- uint ea = EA_AW_32();\r
- uint res = MASK_OUT_ABOVE_32(~m68ki_read_32(ea));\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_not_32_al(void)\r
-{\r
- uint ea = EA_AL_32();\r
- uint res = MASK_OUT_ABOVE_32(~m68ki_read_32(ea));\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_8_er_d(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_8((DX |= MASK_OUT_ABOVE_8(DY)));\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_8_er_ai(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_8((DX |= OPER_AY_AI_8()));\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_8_er_pi(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_8((DX |= OPER_AY_PI_8()));\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_8_er_pi7(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_8((DX |= OPER_A7_PI_8()));\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_8_er_pd(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_8((DX |= OPER_AY_PD_8()));\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_8_er_pd7(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_8((DX |= OPER_A7_PD_8()));\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_8_er_di(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_8((DX |= OPER_AY_DI_8()));\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_8_er_ix(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_8((DX |= OPER_AY_IX_8()));\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_8_er_aw(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_8((DX |= OPER_AW_8()));\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_8_er_al(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_8((DX |= OPER_AL_8()));\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_8_er_pcdi(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_8((DX |= OPER_PCDI_8()));\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_8_er_pcix(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_8((DX |= OPER_PCIX_8()));\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_8_er_i(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_8((DX |= OPER_I_8()));\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_16_er_d(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16((DX |= MASK_OUT_ABOVE_16(DY)));\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_16_er_ai(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16((DX |= OPER_AY_AI_16()));\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_16_er_pi(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16((DX |= OPER_AY_PI_16()));\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_16_er_pd(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16((DX |= OPER_AY_PD_16()));\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_16_er_di(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16((DX |= OPER_AY_DI_16()));\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_16_er_ix(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16((DX |= OPER_AY_IX_16()));\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_16_er_aw(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16((DX |= OPER_AW_16()));\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_16_er_al(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16((DX |= OPER_AL_16()));\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_16_er_pcdi(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16((DX |= OPER_PCDI_16()));\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_16_er_pcix(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16((DX |= OPER_PCIX_16()));\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_16_er_i(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16((DX |= OPER_I_16()));\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_32_er_d(void)\r
-{\r
- uint res = DX |= DY;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_32_er_ai(void)\r
-{\r
- uint res = DX |= OPER_AY_AI_32();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_32_er_pi(void)\r
-{\r
- uint res = DX |= OPER_AY_PI_32();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_32_er_pd(void)\r
-{\r
- uint res = DX |= OPER_AY_PD_32();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_32_er_di(void)\r
-{\r
- uint res = DX |= OPER_AY_DI_32();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_32_er_ix(void)\r
-{\r
- uint res = DX |= OPER_AY_IX_32();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_32_er_aw(void)\r
-{\r
- uint res = DX |= OPER_AW_32();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_32_er_al(void)\r
-{\r
- uint res = DX |= OPER_AL_32();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_32_er_pcdi(void)\r
-{\r
- uint res = DX |= OPER_PCDI_32();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_32_er_pcix(void)\r
-{\r
- uint res = DX |= OPER_PCIX_32();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_32_er_i(void)\r
-{\r
- uint res = DX |= OPER_I_32();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_8_re_ai(void)\r
-{\r
- uint ea = EA_AY_AI_8();\r
- uint res = MASK_OUT_ABOVE_8(DX | m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_8_re_pi(void)\r
-{\r
- uint ea = EA_AY_PI_8();\r
- uint res = MASK_OUT_ABOVE_8(DX | m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_8_re_pi7(void)\r
-{\r
- uint ea = EA_A7_PI_8();\r
- uint res = MASK_OUT_ABOVE_8(DX | m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_8_re_pd(void)\r
-{\r
- uint ea = EA_AY_PD_8();\r
- uint res = MASK_OUT_ABOVE_8(DX | m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_8_re_pd7(void)\r
-{\r
- uint ea = EA_A7_PD_8();\r
- uint res = MASK_OUT_ABOVE_8(DX | m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_8_re_di(void)\r
-{\r
- uint ea = EA_AY_DI_8();\r
- uint res = MASK_OUT_ABOVE_8(DX | m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_8_re_ix(void)\r
-{\r
- uint ea = EA_AY_IX_8();\r
- uint res = MASK_OUT_ABOVE_8(DX | m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_8_re_aw(void)\r
-{\r
- uint ea = EA_AW_8();\r
- uint res = MASK_OUT_ABOVE_8(DX | m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_8_re_al(void)\r
-{\r
- uint ea = EA_AL_8();\r
- uint res = MASK_OUT_ABOVE_8(DX | m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_16_re_ai(void)\r
-{\r
- uint ea = EA_AY_AI_16();\r
- uint res = MASK_OUT_ABOVE_16(DX | m68ki_read_16(ea));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_16_re_pi(void)\r
-{\r
- uint ea = EA_AY_PI_16();\r
- uint res = MASK_OUT_ABOVE_16(DX | m68ki_read_16(ea));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_16_re_pd(void)\r
-{\r
- uint ea = EA_AY_PD_16();\r
- uint res = MASK_OUT_ABOVE_16(DX | m68ki_read_16(ea));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_16_re_di(void)\r
-{\r
- uint ea = EA_AY_DI_16();\r
- uint res = MASK_OUT_ABOVE_16(DX | m68ki_read_16(ea));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_16_re_ix(void)\r
-{\r
- uint ea = EA_AY_IX_16();\r
- uint res = MASK_OUT_ABOVE_16(DX | m68ki_read_16(ea));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_16_re_aw(void)\r
-{\r
- uint ea = EA_AW_16();\r
- uint res = MASK_OUT_ABOVE_16(DX | m68ki_read_16(ea));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_16_re_al(void)\r
-{\r
- uint ea = EA_AL_16();\r
- uint res = MASK_OUT_ABOVE_16(DX | m68ki_read_16(ea));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_32_re_ai(void)\r
-{\r
- uint ea = EA_AY_AI_32();\r
- uint res = DX | m68ki_read_32(ea);\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_32_re_pi(void)\r
-{\r
- uint ea = EA_AY_PI_32();\r
- uint res = DX | m68ki_read_32(ea);\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_32_re_pd(void)\r
-{\r
- uint ea = EA_AY_PD_32();\r
- uint res = DX | m68ki_read_32(ea);\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_32_re_di(void)\r
-{\r
- uint ea = EA_AY_DI_32();\r
- uint res = DX | m68ki_read_32(ea);\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_32_re_ix(void)\r
-{\r
- uint ea = EA_AY_IX_32();\r
- uint res = DX | m68ki_read_32(ea);\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_32_re_aw(void)\r
-{\r
- uint ea = EA_AW_32();\r
- uint res = DX | m68ki_read_32(ea);\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_or_32_re_al(void)\r
-{\r
- uint ea = EA_AL_32();\r
- uint res = DX | m68ki_read_32(ea);\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ori_8_d(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_8((DY |= OPER_I_8()));\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ori_8_ai(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AY_AI_8();\r
- uint res = MASK_OUT_ABOVE_8(src | m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ori_8_pi(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AY_PI_8();\r
- uint res = MASK_OUT_ABOVE_8(src | m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ori_8_pi7(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_A7_PI_8();\r
- uint res = MASK_OUT_ABOVE_8(src | m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ori_8_pd(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AY_PD_8();\r
- uint res = MASK_OUT_ABOVE_8(src | m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ori_8_pd7(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_A7_PD_8();\r
- uint res = MASK_OUT_ABOVE_8(src | m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ori_8_di(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AY_DI_8();\r
- uint res = MASK_OUT_ABOVE_8(src | m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ori_8_ix(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AY_IX_8();\r
- uint res = MASK_OUT_ABOVE_8(src | m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ori_8_aw(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AW_8();\r
- uint res = MASK_OUT_ABOVE_8(src | m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ori_8_al(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AL_8();\r
- uint res = MASK_OUT_ABOVE_8(src | m68ki_read_8(ea));\r
-\r
- m68ki_write_8(ea, res);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ori_16_d(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16(DY |= OPER_I_16());\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ori_16_ai(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AY_AI_16();\r
- uint res = MASK_OUT_ABOVE_16(src | m68ki_read_16(ea));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ori_16_pi(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AY_PI_16();\r
- uint res = MASK_OUT_ABOVE_16(src | m68ki_read_16(ea));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ori_16_pd(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AY_PD_16();\r
- uint res = MASK_OUT_ABOVE_16(src | m68ki_read_16(ea));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ori_16_di(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AY_DI_16();\r
- uint res = MASK_OUT_ABOVE_16(src | m68ki_read_16(ea));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ori_16_ix(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AY_IX_16();\r
- uint res = MASK_OUT_ABOVE_16(src | m68ki_read_16(ea));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ori_16_aw(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AW_16();\r
- uint res = MASK_OUT_ABOVE_16(src | m68ki_read_16(ea));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ori_16_al(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AL_16();\r
- uint res = MASK_OUT_ABOVE_16(src | m68ki_read_16(ea));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ori_32_d(void)\r
-{\r
- uint res = DY |= OPER_I_32();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ori_32_ai(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AY_AI_32();\r
- uint res = src | m68ki_read_32(ea);\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ori_32_pi(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AY_PI_32();\r
- uint res = src | m68ki_read_32(ea);\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ori_32_pd(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AY_PD_32();\r
- uint res = src | m68ki_read_32(ea);\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ori_32_di(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AY_DI_32();\r
- uint res = src | m68ki_read_32(ea);\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ori_32_ix(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AY_IX_32();\r
- uint res = src | m68ki_read_32(ea);\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ori_32_aw(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AW_32();\r
- uint res = src | m68ki_read_32(ea);\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ori_32_al(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AL_32();\r
- uint res = src | m68ki_read_32(ea);\r
-\r
- m68ki_write_32(ea, res);\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ori_16_toc(void)\r
-{\r
- m68ki_set_ccr(m68ki_get_ccr() | OPER_I_16());\r
-}\r
-\r
-\r
-void m68k_op_ori_16_tos(void)\r
-{\r
- if(FLAG_S)\r
- {\r
- uint src = OPER_I_16();\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_set_sr(m68ki_get_sr() | src);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
-}\r
-\r
-\r
-void m68k_op_pack_16_rr(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- /* Note: DX and DY are reversed in Motorola's docs */\r
- uint src = DY + OPER_I_16();\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | ((src >> 4) & 0x00f0) | (src & 0x000f);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_pack_16_mm_ax7(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- /* Note: AX and AY are reversed in Motorola's docs */\r
- uint ea_src = EA_AY_PD_8();\r
- uint src = m68ki_read_8(ea_src);\r
- ea_src = EA_AY_PD_8();\r
- src = ((src << 8) | m68ki_read_8(ea_src)) + OPER_I_16();\r
-\r
- m68ki_write_8(EA_A7_PD_8(), ((src >> 4) & 0x00f0) | (src & 0x000f));\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_pack_16_mm_ay7(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- /* Note: AX and AY are reversed in Motorola's docs */\r
- uint ea_src = EA_A7_PD_8();\r
- uint src = m68ki_read_8(ea_src);\r
- ea_src = EA_A7_PD_8();\r
- src = ((src << 8) | m68ki_read_8(ea_src)) + OPER_I_16();\r
-\r
- m68ki_write_8(EA_AX_PD_8(), ((src >> 4) & 0x00f0) | (src & 0x000f));\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_pack_16_mm_axy7(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint ea_src = EA_A7_PD_8();\r
- uint src = m68ki_read_8(ea_src);\r
- ea_src = EA_A7_PD_8();\r
- src = ((src << 8) | m68ki_read_8(ea_src)) + OPER_I_16();\r
-\r
- m68ki_write_8(EA_A7_PD_8(), ((src >> 4) & 0x00f0) | (src & 0x000f));\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_pack_16_mm(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- /* Note: AX and AY are reversed in Motorola's docs */\r
- uint ea_src = EA_AY_PD_8();\r
- uint src = m68ki_read_8(ea_src);\r
- ea_src = EA_AY_PD_8();\r
- src = ((src << 8) | m68ki_read_8(ea_src)) + OPER_I_16();\r
-\r
- m68ki_write_8(EA_AX_PD_8(), ((src >> 4) & 0x00f0) | (src & 0x000f));\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_pea_32_ai(void)\r
-{\r
- uint ea = EA_AY_AI_32();\r
-\r
- m68ki_push_32(ea);\r
-}\r
-\r
-\r
-void m68k_op_pea_32_di(void)\r
-{\r
- uint ea = EA_AY_DI_32();\r
-\r
- m68ki_push_32(ea);\r
-}\r
-\r
-\r
-void m68k_op_pea_32_ix(void)\r
-{\r
- uint ea = EA_AY_IX_32();\r
-\r
- m68ki_push_32(ea);\r
-}\r
-\r
-\r
-void m68k_op_pea_32_aw(void)\r
-{\r
- uint ea = EA_AW_32();\r
-\r
- m68ki_push_32(ea);\r
-}\r
-\r
-\r
-void m68k_op_pea_32_al(void)\r
-{\r
- uint ea = EA_AL_32();\r
-\r
- m68ki_push_32(ea);\r
-}\r
-\r
-\r
-void m68k_op_pea_32_pcdi(void)\r
-{\r
- uint ea = EA_PCDI_32();\r
-\r
- m68ki_push_32(ea);\r
-}\r
-\r
-\r
-void m68k_op_pea_32_pcix(void)\r
-{\r
- uint ea = EA_PCIX_32();\r
-\r
- m68ki_push_32(ea);\r
-}\r
-\r
-\r
-void m68k_op_pflush_32(void)\r
-{\r
- if(CPU_TYPE_IS_040_PLUS(CPU_TYPE))\r
- {\r
- // Nothing to do, unless address translation cache is emulated\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_reset(void)\r
-{\r
- if(FLAG_S)\r
- {\r
- m68ki_output_reset(); /* auto-disable (see m68kcpu.h) */\r
- USE_CYCLES(CYC_RESET);\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
-}\r
-\r
-\r
-void m68k_op_ror_8_s(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint orig_shift = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint shift = orig_shift & 7;\r
- uint src = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = ROR_8(src, shift);\r
-\r
- if(orig_shift != 0)\r
- USE_CYCLES(orig_shift<<CYC_SHIFT);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = src << (9-orig_shift);\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ror_16_s(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint src = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = ROR_16(src, shift);\r
-\r
- if(shift != 0)\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = src << (9-shift);\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ror_32_s(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint64 src = *r_dst;\r
- uint res = ROR_32(src, shift);\r
-\r
- if(shift != 0)\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- *r_dst = res;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = src << (9-shift);\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ror_8_r(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint orig_shift = DX & 0x3f;\r
- uint shift = orig_shift & 7;\r
- uint src = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = ROR_8(src, shift);\r
-\r
- if(orig_shift != 0)\r
- {\r
- USE_CYCLES(orig_shift<<CYC_SHIFT);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
- FLAG_C = src << (8-((shift-1)&7));\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_N = NFLAG_8(src);\r
- FLAG_Z = src;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ror_16_r(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint orig_shift = DX & 0x3f;\r
- uint shift = orig_shift & 15;\r
- uint src = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = ROR_16(src, shift);\r
-\r
- if(orig_shift != 0)\r
- {\r
- USE_CYCLES(orig_shift<<CYC_SHIFT);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
- FLAG_C = (src >> ((shift - 1) & 15)) << 8;\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_N = NFLAG_16(src);\r
- FLAG_Z = src;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ror_32_r(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint orig_shift = DX & 0x3f;\r
- uint shift = orig_shift & 31;\r
- uint64 src = *r_dst;\r
- uint res = ROR_32(src, shift);\r
-\r
- if(orig_shift != 0)\r
- {\r
- USE_CYCLES(orig_shift<<CYC_SHIFT);\r
-\r
- *r_dst = res;\r
- FLAG_C = (src >> ((shift - 1) & 31)) << 8;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_N = NFLAG_32(src);\r
- FLAG_Z = src;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ror_16_ai(void)\r
-{\r
- uint ea = EA_AY_AI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = ROR_16(src, 1);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = src << 8;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ror_16_pi(void)\r
-{\r
- uint ea = EA_AY_PI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = ROR_16(src, 1);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = src << 8;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ror_16_pd(void)\r
-{\r
- uint ea = EA_AY_PD_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = ROR_16(src, 1);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = src << 8;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ror_16_di(void)\r
-{\r
- uint ea = EA_AY_DI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = ROR_16(src, 1);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = src << 8;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ror_16_ix(void)\r
-{\r
- uint ea = EA_AY_IX_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = ROR_16(src, 1);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = src << 8;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ror_16_aw(void)\r
-{\r
- uint ea = EA_AW_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = ROR_16(src, 1);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = src << 8;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_ror_16_al(void)\r
-{\r
- uint ea = EA_AL_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = ROR_16(src, 1);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = src << 8;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_rol_8_s(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint orig_shift = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint shift = orig_shift & 7;\r
- uint src = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = ROL_8(src, shift);\r
-\r
- if(orig_shift != 0)\r
- USE_CYCLES(orig_shift<<CYC_SHIFT);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_C = src << orig_shift;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_rol_16_s(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint src = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = ROL_16(src, shift);\r
-\r
- if(shift != 0)\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = src >> (8-shift);\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_rol_32_s(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint64 src = *r_dst;\r
- uint res = ROL_32(src, shift);\r
-\r
- if(shift != 0)\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- *r_dst = res;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_C = src >> (24-shift);\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_rol_8_r(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint orig_shift = DX & 0x3f;\r
- uint shift = orig_shift & 7;\r
- uint src = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = ROL_8(src, shift);\r
-\r
- if(orig_shift != 0)\r
- {\r
- USE_CYCLES(orig_shift<<CYC_SHIFT);\r
-\r
- if(shift != 0)\r
- {\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
- FLAG_C = src << shift;\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
- FLAG_C = (src & 1)<<8;\r
- FLAG_N = NFLAG_8(src);\r
- FLAG_Z = src;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_N = NFLAG_8(src);\r
- FLAG_Z = src;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_rol_16_r(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint orig_shift = DX & 0x3f;\r
- uint shift = orig_shift & 15;\r
- uint src = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = MASK_OUT_ABOVE_16(ROL_16(src, shift));\r
-\r
- if(orig_shift != 0)\r
- {\r
- USE_CYCLES(orig_shift<<CYC_SHIFT);\r
-\r
- if(shift != 0)\r
- {\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
- FLAG_C = (src << shift) >> 8;\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
- FLAG_C = (src & 1)<<8;\r
- FLAG_N = NFLAG_16(src);\r
- FLAG_Z = src;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_N = NFLAG_16(src);\r
- FLAG_Z = src;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_rol_32_r(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint orig_shift = DX & 0x3f;\r
- uint shift = orig_shift & 31;\r
- uint64 src = *r_dst;\r
- uint res = ROL_32(src, shift);\r
-\r
- if(orig_shift != 0)\r
- {\r
- USE_CYCLES(orig_shift<<CYC_SHIFT);\r
-\r
- *r_dst = res;\r
-\r
- FLAG_C = (src >> (32 - shift)) << 8;\r
- if (shift == 0) FLAG_C = src << 8; // notaz\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_N = NFLAG_32(src);\r
- FLAG_Z = src;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_rol_16_ai(void)\r
-{\r
- uint ea = EA_AY_AI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = MASK_OUT_ABOVE_16(ROL_16(src, 1));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = src >> 7;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_rol_16_pi(void)\r
-{\r
- uint ea = EA_AY_PI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = MASK_OUT_ABOVE_16(ROL_16(src, 1));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = src >> 7;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_rol_16_pd(void)\r
-{\r
- uint ea = EA_AY_PD_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = MASK_OUT_ABOVE_16(ROL_16(src, 1));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = src >> 7;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_rol_16_di(void)\r
-{\r
- uint ea = EA_AY_DI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = MASK_OUT_ABOVE_16(ROL_16(src, 1));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = src >> 7;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_rol_16_ix(void)\r
-{\r
- uint ea = EA_AY_IX_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = MASK_OUT_ABOVE_16(ROL_16(src, 1));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = src >> 7;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_rol_16_aw(void)\r
-{\r
- uint ea = EA_AW_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = MASK_OUT_ABOVE_16(ROL_16(src, 1));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = src >> 7;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_rol_16_al(void)\r
-{\r
- uint ea = EA_AL_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = MASK_OUT_ABOVE_16(ROL_16(src, 1));\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_C = src >> 7;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_roxr_8_s(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint src = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = ROR_9(src | (XFLAG_AS_1() << 8), shift);\r
-\r
- if(shift != 0)\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- FLAG_C = FLAG_X = res;\r
- res = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_roxr_16_s(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint src = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = ROR_17(src | (XFLAG_AS_1() << 16), shift);\r
-\r
- if(shift != 0)\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- FLAG_C = FLAG_X = res >> 8;\r
- res = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_roxr_32_s(void)\r
-{\r
-#if M68K_USE_64_BIT\r
-\r
- uint* r_dst = &DY;\r
- uint shift = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint64 src = *r_dst;\r
- uint64 res = src | (((uint64)XFLAG_AS_1()) << 32);\r
-\r
- if(shift != 0)\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- res = ROR_33_64(res, shift);\r
-\r
- FLAG_C = FLAG_X = res >> 24;\r
- res = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = res;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
-#else\r
-\r
- uint* r_dst = &DY;\r
- uint shift = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint src = *r_dst;\r
- uint res = MASK_OUT_ABOVE_32((ROR_33(src, shift) & ~(1 << (32 - shift))) | (XFLAG_AS_1() << (32 - shift)));\r
- uint new_x_flag = src & (1 << (shift - 1));\r
-\r
- if(shift != 0)\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- *r_dst = res;\r
-\r
- FLAG_C = FLAG_X = (new_x_flag != 0)<<8;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
-#endif\r
-}\r
-\r
-\r
-void m68k_op_roxr_8_r(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint orig_shift = DX & 0x3f;\r
-\r
- if(orig_shift != 0)\r
- {\r
- uint shift = orig_shift % 9;\r
- uint src = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = ROR_9(src | (XFLAG_AS_1() << 8), shift);\r
-\r
- USE_CYCLES(orig_shift<<CYC_SHIFT);\r
-\r
- FLAG_C = FLAG_X = res;\r
- res = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- FLAG_C = FLAG_X;\r
- FLAG_N = NFLAG_8(*r_dst);\r
- FLAG_Z = MASK_OUT_ABOVE_8(*r_dst);\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_roxr_16_r(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint orig_shift = DX & 0x3f;\r
-\r
- if(orig_shift != 0)\r
- {\r
- uint shift = orig_shift % 17;\r
- uint src = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = ROR_17(src | (XFLAG_AS_1() << 16), shift);\r
-\r
- USE_CYCLES(orig_shift<<CYC_SHIFT);\r
-\r
- FLAG_C = FLAG_X = res >> 8;\r
- res = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- FLAG_C = FLAG_X;\r
- FLAG_N = NFLAG_16(*r_dst);\r
- FLAG_Z = MASK_OUT_ABOVE_16(*r_dst);\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_roxr_32_r(void)\r
-{\r
-#if M68K_USE_64_BIT\r
-\r
- uint* r_dst = &DY;\r
- uint orig_shift = DX & 0x3f;\r
-\r
- if(orig_shift != 0)\r
- {\r
- uint shift = orig_shift % 33;\r
- uint64 src = *r_dst;\r
- uint64 res = src | (((uint64)XFLAG_AS_1()) << 32);\r
-\r
- res = ROR_33_64(res, shift);\r
-\r
- USE_CYCLES(orig_shift<<CYC_SHIFT);\r
-\r
- FLAG_C = FLAG_X = res >> 24;\r
- res = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = res;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- FLAG_C = FLAG_X;\r
- FLAG_N = NFLAG_32(*r_dst);\r
- FLAG_Z = *r_dst;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
-#else\r
-\r
- uint* r_dst = &DY;\r
- uint orig_shift = DX & 0x3f;\r
- uint shift = orig_shift % 33;\r
- uint src = *r_dst;\r
- uint res = MASK_OUT_ABOVE_32((ROR_33(src, shift) & ~(1 << (32 - shift))) | (XFLAG_AS_1() << (32 - shift)));\r
- uint new_x_flag = src & (1 << (shift - 1));\r
-\r
- if(orig_shift != 0)\r
- USE_CYCLES(orig_shift<<CYC_SHIFT);\r
-\r
- if(shift != 0)\r
- {\r
- *r_dst = res;\r
- FLAG_X = (new_x_flag != 0)<<8;\r
- }\r
- else\r
- res = src;\r
- FLAG_C = FLAG_X;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
-#endif\r
-}\r
-\r
-\r
-void m68k_op_roxr_16_ai(void)\r
-{\r
- uint ea = EA_AY_AI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = ROR_17(src | (XFLAG_AS_1() << 16), 1);\r
-\r
- FLAG_C = FLAG_X = res >> 8;\r
- res = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_roxr_16_pi(void)\r
-{\r
- uint ea = EA_AY_PI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = ROR_17(src | (XFLAG_AS_1() << 16), 1);\r
-\r
- FLAG_C = FLAG_X = res >> 8;\r
- res = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_roxr_16_pd(void)\r
-{\r
- uint ea = EA_AY_PD_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = ROR_17(src | (XFLAG_AS_1() << 16), 1);\r
-\r
- FLAG_C = FLAG_X = res >> 8;\r
- res = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_roxr_16_di(void)\r
-{\r
- uint ea = EA_AY_DI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = ROR_17(src | (XFLAG_AS_1() << 16), 1);\r
-\r
- FLAG_C = FLAG_X = res >> 8;\r
- res = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_roxr_16_ix(void)\r
-{\r
- uint ea = EA_AY_IX_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = ROR_17(src | (XFLAG_AS_1() << 16), 1);\r
-\r
- FLAG_C = FLAG_X = res >> 8;\r
- res = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_roxr_16_aw(void)\r
-{\r
- uint ea = EA_AW_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = ROR_17(src | (XFLAG_AS_1() << 16), 1);\r
-\r
- FLAG_C = FLAG_X = res >> 8;\r
- res = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_roxr_16_al(void)\r
-{\r
- uint ea = EA_AL_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = ROR_17(src | (XFLAG_AS_1() << 16), 1);\r
-\r
- FLAG_C = FLAG_X = res >> 8;\r
- res = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_roxl_8_s(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint src = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = ROL_9(src | (XFLAG_AS_1() << 8), shift);\r
-\r
- if(shift != 0)\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- FLAG_C = FLAG_X = res;\r
- res = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_roxl_16_s(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint shift = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint src = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = ROL_17(src | (XFLAG_AS_1() << 16), shift);\r
-\r
- if(shift != 0)\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- FLAG_C = FLAG_X = res >> 8;\r
- res = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_roxl_32_s(void)\r
-{\r
-#if M68K_USE_64_BIT\r
-\r
- uint* r_dst = &DY;\r
- uint shift = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint64 src = *r_dst;\r
- uint64 res = src | (((uint64)XFLAG_AS_1()) << 32);\r
-\r
- if(shift != 0)\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- res = ROL_33_64(res, shift);\r
-\r
- FLAG_C = FLAG_X = res >> 24;\r
- res = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = res;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
-#else\r
-\r
- uint* r_dst = &DY;\r
- uint shift = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint src = *r_dst;\r
- uint res = MASK_OUT_ABOVE_32((ROL_33(src, shift) & ~(1 << (shift - 1))) | (XFLAG_AS_1() << (shift - 1)));\r
- uint new_x_flag = src & (1 << (32 - shift));\r
-\r
- if(shift != 0)\r
- USE_CYCLES(shift<<CYC_SHIFT);\r
-\r
- *r_dst = res;\r
-\r
- FLAG_C = FLAG_X = (new_x_flag != 0)<<8;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
-#endif\r
-}\r
-\r
-\r
-void m68k_op_roxl_8_r(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint orig_shift = DX & 0x3f;\r
-\r
-\r
- if(orig_shift != 0)\r
- {\r
- uint shift = orig_shift % 9;\r
- uint src = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = ROL_9(src | (XFLAG_AS_1() << 8), shift);\r
-\r
- USE_CYCLES(orig_shift<<CYC_SHIFT);\r
-\r
- FLAG_C = FLAG_X = res;\r
- res = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- FLAG_C = FLAG_X;\r
- FLAG_N = NFLAG_8(*r_dst);\r
- FLAG_Z = MASK_OUT_ABOVE_8(*r_dst);\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_roxl_16_r(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint orig_shift = DX & 0x3f;\r
-\r
- if(orig_shift != 0)\r
- {\r
- uint shift = orig_shift % 17;\r
- uint src = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = ROL_17(src | (XFLAG_AS_1() << 16), shift);\r
-\r
- USE_CYCLES(orig_shift<<CYC_SHIFT);\r
-\r
- FLAG_C = FLAG_X = res >> 8;\r
- res = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- FLAG_C = FLAG_X;\r
- FLAG_N = NFLAG_16(*r_dst);\r
- FLAG_Z = MASK_OUT_ABOVE_16(*r_dst);\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_roxl_32_r(void)\r
-{\r
-#if M68K_USE_64_BIT\r
-\r
- uint* r_dst = &DY;\r
- uint orig_shift = DX & 0x3f;\r
-\r
- if(orig_shift != 0)\r
- {\r
- uint shift = orig_shift % 33;\r
- uint64 src = *r_dst;\r
- uint64 res = src | (((uint64)XFLAG_AS_1()) << 32);\r
-\r
- res = ROL_33_64(res, shift);\r
-\r
- USE_CYCLES(orig_shift<<CYC_SHIFT);\r
-\r
- FLAG_C = FLAG_X = res >> 24;\r
- res = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = res;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- return;\r
- }\r
-\r
- FLAG_C = FLAG_X;\r
- FLAG_N = NFLAG_32(*r_dst);\r
- FLAG_Z = *r_dst;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
-#else\r
-\r
- uint* r_dst = &DY;\r
- uint orig_shift = DX & 0x3f;\r
- uint shift = orig_shift % 33;\r
- uint src = *r_dst;\r
- uint res = MASK_OUT_ABOVE_32((ROL_33(src, shift) & ~(1 << (shift - 1))) | (XFLAG_AS_1() << (shift - 1)));\r
- uint new_x_flag = src & (1 << (32 - shift));\r
-\r
- if(orig_shift != 0)\r
- USE_CYCLES(orig_shift<<CYC_SHIFT);\r
-\r
- if(shift != 0)\r
- {\r
- *r_dst = res;\r
- FLAG_X = (new_x_flag != 0)<<8;\r
- }\r
- else\r
- res = src;\r
- FLAG_C = FLAG_X;\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
-\r
-#endif\r
-}\r
-\r
-\r
-void m68k_op_roxl_16_ai(void)\r
-{\r
- uint ea = EA_AY_AI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = ROL_17(src | (XFLAG_AS_1() << 16), 1);\r
-\r
- FLAG_C = FLAG_X = res >> 8;\r
- res = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_roxl_16_pi(void)\r
-{\r
- uint ea = EA_AY_PI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = ROL_17(src | (XFLAG_AS_1() << 16), 1);\r
-\r
- FLAG_C = FLAG_X = res >> 8;\r
- res = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_roxl_16_pd(void)\r
-{\r
- uint ea = EA_AY_PD_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = ROL_17(src | (XFLAG_AS_1() << 16), 1);\r
-\r
- FLAG_C = FLAG_X = res >> 8;\r
- res = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_roxl_16_di(void)\r
-{\r
- uint ea = EA_AY_DI_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = ROL_17(src | (XFLAG_AS_1() << 16), 1);\r
-\r
- FLAG_C = FLAG_X = res >> 8;\r
- res = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_roxl_16_ix(void)\r
-{\r
- uint ea = EA_AY_IX_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = ROL_17(src | (XFLAG_AS_1() << 16), 1);\r
-\r
- FLAG_C = FLAG_X = res >> 8;\r
- res = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_roxl_16_aw(void)\r
-{\r
- uint ea = EA_AW_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = ROL_17(src | (XFLAG_AS_1() << 16), 1);\r
-\r
- FLAG_C = FLAG_X = res >> 8;\r
- res = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_roxl_16_al(void)\r
-{\r
- uint ea = EA_AL_16();\r
- uint src = m68ki_read_16(ea);\r
- uint res = ROL_17(src | (XFLAG_AS_1() << 16), 1);\r
-\r
- FLAG_C = FLAG_X = res >> 8;\r
- res = MASK_OUT_ABOVE_16(res);\r
-\r
- m68ki_write_16(ea, res);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_rtd_32(void)\r
-{\r
- if(CPU_TYPE_IS_010_PLUS(CPU_TYPE))\r
- {\r
- uint new_pc = m68ki_pull_32();\r
-\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- REG_A[7] = MASK_OUT_ABOVE_32(REG_A[7] + MAKE_INT_16(OPER_I_16()));\r
- m68ki_jump(new_pc);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_rte_32(void)\r
-{\r
- if(FLAG_S)\r
- {\r
- uint new_sr;\r
- uint new_pc;\r
- uint format_word;\r
-\r
- m68ki_rte_callback(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
-\r
- if(CPU_TYPE_IS_000(CPU_TYPE))\r
- {\r
- new_sr = m68ki_pull_16();\r
- new_pc = m68ki_pull_32();\r
- m68ki_jump(new_pc);\r
- m68ki_set_sr(new_sr);\r
-\r
- CPU_INSTR_MODE = INSTRUCTION_YES;\r
- CPU_RUN_MODE = RUN_MODE_NORMAL;\r
-\r
- return;\r
- }\r
-\r
- if(CPU_TYPE_IS_010(CPU_TYPE))\r
- {\r
- format_word = m68ki_read_16(REG_A[7]+6) >> 12;\r
- if(format_word == 0)\r
- {\r
- new_sr = m68ki_pull_16();\r
- new_pc = m68ki_pull_32();\r
- m68ki_fake_pull_16(); /* format word */\r
- m68ki_jump(new_pc);\r
- m68ki_set_sr(new_sr);\r
- CPU_INSTR_MODE = INSTRUCTION_YES;\r
- CPU_RUN_MODE = RUN_MODE_NORMAL;\r
- return;\r
- }\r
- CPU_INSTR_MODE = INSTRUCTION_YES;\r
- CPU_RUN_MODE = RUN_MODE_NORMAL;\r
- /* Not handling bus fault (9) */\r
- m68ki_exception_format_error();\r
- return;\r
- }\r
-\r
- /* Otherwise it's 020 */\r
-rte_loop:\r
- format_word = m68ki_read_16(REG_A[7]+6) >> 12;\r
- switch(format_word)\r
- {\r
- case 0: /* Normal */\r
- new_sr = m68ki_pull_16();\r
- new_pc = m68ki_pull_32();\r
- m68ki_fake_pull_16(); /* format word */\r
- m68ki_jump(new_pc);\r
- m68ki_set_sr(new_sr);\r
- CPU_INSTR_MODE = INSTRUCTION_YES;\r
- CPU_RUN_MODE = RUN_MODE_NORMAL;\r
- return;\r
- case 1: /* Throwaway */\r
- new_sr = m68ki_pull_16();\r
- m68ki_fake_pull_32(); /* program counter */\r
- m68ki_fake_pull_16(); /* format word */\r
- m68ki_set_sr_noint(new_sr);\r
- goto rte_loop;\r
- case 2: /* Trap */\r
- new_sr = m68ki_pull_16();\r
- new_pc = m68ki_pull_32();\r
- m68ki_fake_pull_16(); /* format word */\r
- m68ki_fake_pull_32(); /* address */\r
- m68ki_jump(new_pc);\r
- m68ki_set_sr(new_sr);\r
- CPU_INSTR_MODE = INSTRUCTION_YES;\r
- CPU_RUN_MODE = RUN_MODE_NORMAL;\r
- return;\r
- }\r
- /* Not handling long or short bus fault */\r
- CPU_INSTR_MODE = INSTRUCTION_YES;\r
- CPU_RUN_MODE = RUN_MODE_NORMAL;\r
- m68ki_exception_format_error();\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
-}\r
-\r
-\r
-void m68k_op_rtm_32(void)\r
-{\r
- if(CPU_TYPE_IS_020_VARIANT(CPU_TYPE))\r
- {\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- M68K_DO_LOG((M68K_LOG_FILEHANDLE "%s at %08x: called unimplemented instruction %04x (%s)\n",\r
- m68ki_cpu_names[CPU_TYPE], ADDRESS_68K(REG_PC - 2), REG_IR,\r
- m68k_disassemble_quick(ADDRESS_68K(REG_PC - 2))));\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_rtr_32(void)\r
-{\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_set_ccr(m68ki_pull_16());\r
- m68ki_jump(m68ki_pull_32());\r
-}\r
-\r
-\r
-void m68k_op_rts_32(void)\r
-{\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- m68ki_jump(m68ki_pull_32());\r
-}\r
-\r
-\r
-void m68k_op_sbcd_8_rr(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = DY;\r
- uint dst = *r_dst;\r
- uint res = LOW_NIBBLE(dst) - LOW_NIBBLE(src) - XFLAG_AS_1();\r
-\r
-// FLAG_V = ~res; /* Undefined V behavior */\r
- FLAG_V = VFLAG_CLEAR; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to assume cleared. */\r
-\r
- if(res > 9)\r
- res -= 6;\r
- res += HIGH_NIBBLE(dst) - HIGH_NIBBLE(src);\r
- if(res > 0x99)\r
- {\r
- res += 0xa0;\r
- FLAG_X = FLAG_C = CFLAG_SET;\r
- FLAG_N = NFLAG_SET; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to follow carry. */\r
- }\r
- else\r
- FLAG_N = FLAG_X = FLAG_C = 0;\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
-\r
-// FLAG_V &= res; /* Undefined V behavior part II */\r
-// FLAG_N = NFLAG_8(res); /* Undefined N behavior */\r
- FLAG_Z |= res;\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
-}\r
-\r
-\r
-void m68k_op_sbcd_8_mm_ax7(void)\r
-{\r
- uint src = OPER_AY_PD_8();\r
- uint ea = EA_A7_PD_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = LOW_NIBBLE(dst) - LOW_NIBBLE(src) - XFLAG_AS_1();\r
-\r
-// FLAG_V = ~res; /* Undefined V behavior */\r
- FLAG_V = VFLAG_CLEAR; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to return zero. */\r
-\r
- if(res > 9)\r
- res -= 6;\r
- res += HIGH_NIBBLE(dst) - HIGH_NIBBLE(src);\r
- if(res > 0x99)\r
- {\r
- res += 0xa0;\r
- FLAG_X = FLAG_C = CFLAG_SET;\r
- FLAG_N = NFLAG_SET; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to follow carry. */\r
- }\r
- else\r
- FLAG_N = FLAG_X = FLAG_C = 0;\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
-\r
-// FLAG_V &= res; /* Undefined V behavior part II */\r
-// FLAG_N = NFLAG_8(res); /* Undefined N behavior */\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_sbcd_8_mm_ay7(void)\r
-{\r
- uint src = OPER_A7_PD_8();\r
- uint ea = EA_AX_PD_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = LOW_NIBBLE(dst) - LOW_NIBBLE(src) - XFLAG_AS_1();\r
-\r
-// FLAG_V = ~res; /* Undefined V behavior */\r
- FLAG_V = VFLAG_CLEAR; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to return zero. */\r
-\r
- if(res > 9)\r
- res -= 6;\r
- res += HIGH_NIBBLE(dst) - HIGH_NIBBLE(src);\r
- if(res > 0x99)\r
- {\r
- res += 0xa0;\r
- FLAG_X = FLAG_C = CFLAG_SET;\r
- FLAG_N = NFLAG_SET; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to follow carry. */\r
- }\r
- else\r
- FLAG_N = FLAG_X = FLAG_C = 0;\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
-\r
-// FLAG_V &= res; /* Undefined V behavior part II */\r
-// FLAG_N = NFLAG_8(res); /* Undefined N behavior */\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_sbcd_8_mm_axy7(void)\r
-{\r
- uint src = OPER_A7_PD_8();\r
- uint ea = EA_A7_PD_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = LOW_NIBBLE(dst) - LOW_NIBBLE(src) - XFLAG_AS_1();\r
-\r
-// FLAG_V = ~res; /* Undefined V behavior */\r
- FLAG_V = VFLAG_CLEAR; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to return zero. */\r
-\r
- if(res > 9)\r
- res -= 6;\r
- res += HIGH_NIBBLE(dst) - HIGH_NIBBLE(src);\r
- if(res > 0x99)\r
- {\r
- res += 0xa0;\r
- FLAG_X = FLAG_C = CFLAG_SET;\r
- FLAG_N = NFLAG_SET; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to follow carry. */\r
- }\r
- else\r
- FLAG_N = FLAG_X = FLAG_C = 0;\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
-\r
-// FLAG_V &= res; /* Undefined V behavior part II */\r
-// FLAG_N = NFLAG_8(res); /* Undefined N behavior */\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_sbcd_8_mm(void)\r
-{\r
- uint src = OPER_AY_PD_8();\r
- uint ea = EA_AX_PD_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = LOW_NIBBLE(dst) - LOW_NIBBLE(src) - XFLAG_AS_1();\r
-\r
-// FLAG_V = ~res; /* Undefined V behavior */\r
- FLAG_V = VFLAG_CLEAR; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to return zero. */\r
-\r
- if(res > 9)\r
- res -= 6;\r
- res += HIGH_NIBBLE(dst) - HIGH_NIBBLE(src);\r
- if(res > 0x99)\r
- {\r
- res += 0xa0;\r
- FLAG_X = FLAG_C = CFLAG_SET;\r
- FLAG_N = NFLAG_SET; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to follow carry. */\r
- }\r
- else\r
- FLAG_N = FLAG_X = FLAG_C = 0;\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
-\r
-// FLAG_V &= res; /* Undefined V behavior part II */\r
-// FLAG_N = NFLAG_8(res); /* Undefined N behavior */\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_st_8_d(void)\r
-{\r
- DY |= 0xff;\r
-}\r
-\r
-\r
-void m68k_op_st_8_ai(void)\r
-{\r
- m68ki_write_8(EA_AY_AI_8(), 0xff);\r
-}\r
-\r
-\r
-void m68k_op_st_8_pi(void)\r
-{\r
- m68ki_write_8(EA_AY_PI_8(), 0xff);\r
-}\r
-\r
-\r
-void m68k_op_st_8_pi7(void)\r
-{\r
- m68ki_write_8(EA_A7_PI_8(), 0xff);\r
-}\r
-\r
-\r
-void m68k_op_st_8_pd(void)\r
-{\r
- m68ki_write_8(EA_AY_PD_8(), 0xff);\r
-}\r
-\r
-\r
-void m68k_op_st_8_pd7(void)\r
-{\r
- m68ki_write_8(EA_A7_PD_8(), 0xff);\r
-}\r
-\r
-\r
-void m68k_op_st_8_di(void)\r
-{\r
- m68ki_write_8(EA_AY_DI_8(), 0xff);\r
-}\r
-\r
-\r
-void m68k_op_st_8_ix(void)\r
-{\r
- m68ki_write_8(EA_AY_IX_8(), 0xff);\r
-}\r
-\r
-\r
-void m68k_op_st_8_aw(void)\r
-{\r
- m68ki_write_8(EA_AW_8(), 0xff);\r
-}\r
-\r
-\r
-void m68k_op_st_8_al(void)\r
-{\r
- m68ki_write_8(EA_AL_8(), 0xff);\r
-}\r
-\r
-\r
-void m68k_op_sf_8_d(void)\r
-{\r
- DY &= 0xffffff00;\r
-}\r
-\r
-\r
-void m68k_op_sf_8_ai(void)\r
-{\r
- m68ki_write_8(EA_AY_AI_8(), 0);\r
-}\r
-\r
-\r
-void m68k_op_sf_8_pi(void)\r
-{\r
- m68ki_write_8(EA_AY_PI_8(), 0);\r
-}\r
-\r
-\r
-void m68k_op_sf_8_pi7(void)\r
-{\r
- m68ki_write_8(EA_A7_PI_8(), 0);\r
-}\r
-\r
-\r
-void m68k_op_sf_8_pd(void)\r
-{\r
- m68ki_write_8(EA_AY_PD_8(), 0);\r
-}\r
-\r
-\r
-void m68k_op_sf_8_pd7(void)\r
-{\r
- m68ki_write_8(EA_A7_PD_8(), 0);\r
-}\r
-\r
-\r
-void m68k_op_sf_8_di(void)\r
-{\r
- m68ki_write_8(EA_AY_DI_8(), 0);\r
-}\r
-\r
-\r
-void m68k_op_sf_8_ix(void)\r
-{\r
- m68ki_write_8(EA_AY_IX_8(), 0);\r
-}\r
-\r
-\r
-void m68k_op_sf_8_aw(void)\r
-{\r
- m68ki_write_8(EA_AW_8(), 0);\r
-}\r
-\r
-\r
-void m68k_op_sf_8_al(void)\r
-{\r
- m68ki_write_8(EA_AL_8(), 0);\r
-}\r
-\r
-\r
-void m68k_op_shi_8_d(void)\r
-{\r
- if(COND_HI())\r
- {\r
- DY |= 0xff;\r
- USE_CYCLES(CYC_SCC_R_TRUE);\r
- return;\r
- }\r
- DY &= 0xffffff00;\r
-}\r
-\r
-\r
-void m68k_op_sls_8_d(void)\r
-{\r
- if(COND_LS())\r
- {\r
- DY |= 0xff;\r
- USE_CYCLES(CYC_SCC_R_TRUE);\r
- return;\r
- }\r
- DY &= 0xffffff00;\r
-}\r
-\r
-\r
-void m68k_op_scc_8_d(void)\r
-{\r
- if(COND_CC())\r
- {\r
- DY |= 0xff;\r
- USE_CYCLES(CYC_SCC_R_TRUE);\r
- return;\r
- }\r
- DY &= 0xffffff00;\r
-}\r
-\r
-\r
-void m68k_op_scs_8_d(void)\r
-{\r
- if(COND_CS())\r
- {\r
- DY |= 0xff;\r
- USE_CYCLES(CYC_SCC_R_TRUE);\r
- return;\r
- }\r
- DY &= 0xffffff00;\r
-}\r
-\r
-\r
-void m68k_op_sne_8_d(void)\r
-{\r
- if(COND_NE())\r
- {\r
- DY |= 0xff;\r
- USE_CYCLES(CYC_SCC_R_TRUE);\r
- return;\r
- }\r
- DY &= 0xffffff00;\r
-}\r
-\r
-\r
-void m68k_op_seq_8_d(void)\r
-{\r
- if(COND_EQ())\r
- {\r
- DY |= 0xff;\r
- USE_CYCLES(CYC_SCC_R_TRUE);\r
- return;\r
- }\r
- DY &= 0xffffff00;\r
-}\r
-\r
-\r
-void m68k_op_svc_8_d(void)\r
-{\r
- if(COND_VC())\r
- {\r
- DY |= 0xff;\r
- USE_CYCLES(CYC_SCC_R_TRUE);\r
- return;\r
- }\r
- DY &= 0xffffff00;\r
-}\r
-\r
-\r
-void m68k_op_svs_8_d(void)\r
-{\r
- if(COND_VS())\r
- {\r
- DY |= 0xff;\r
- USE_CYCLES(CYC_SCC_R_TRUE);\r
- return;\r
- }\r
- DY &= 0xffffff00;\r
-}\r
-\r
-\r
-void m68k_op_spl_8_d(void)\r
-{\r
- if(COND_PL())\r
- {\r
- DY |= 0xff;\r
- USE_CYCLES(CYC_SCC_R_TRUE);\r
- return;\r
- }\r
- DY &= 0xffffff00;\r
-}\r
-\r
-\r
-void m68k_op_smi_8_d(void)\r
-{\r
- if(COND_MI())\r
- {\r
- DY |= 0xff;\r
- USE_CYCLES(CYC_SCC_R_TRUE);\r
- return;\r
- }\r
- DY &= 0xffffff00;\r
-}\r
-\r
-\r
-void m68k_op_sge_8_d(void)\r
-{\r
- if(COND_GE())\r
- {\r
- DY |= 0xff;\r
- USE_CYCLES(CYC_SCC_R_TRUE);\r
- return;\r
- }\r
- DY &= 0xffffff00;\r
-}\r
-\r
-\r
-void m68k_op_slt_8_d(void)\r
-{\r
- if(COND_LT())\r
- {\r
- DY |= 0xff;\r
- USE_CYCLES(CYC_SCC_R_TRUE);\r
- return;\r
- }\r
- DY &= 0xffffff00;\r
-}\r
-\r
-\r
-void m68k_op_sgt_8_d(void)\r
-{\r
- if(COND_GT())\r
- {\r
- DY |= 0xff;\r
- USE_CYCLES(CYC_SCC_R_TRUE);\r
- return;\r
- }\r
- DY &= 0xffffff00;\r
-}\r
-\r
-\r
-void m68k_op_sle_8_d(void)\r
-{\r
- if(COND_LE())\r
- {\r
- DY |= 0xff;\r
- USE_CYCLES(CYC_SCC_R_TRUE);\r
- return;\r
- }\r
- DY &= 0xffffff00;\r
-}\r
-\r
-\r
-void m68k_op_shi_8_ai(void)\r
-{\r
- m68ki_write_8(EA_AY_AI_8(), COND_HI() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_shi_8_pi(void)\r
-{\r
- m68ki_write_8(EA_AY_PI_8(), COND_HI() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_shi_8_pi7(void)\r
-{\r
- m68ki_write_8(EA_A7_PI_8(), COND_HI() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_shi_8_pd(void)\r
-{\r
- m68ki_write_8(EA_AY_PD_8(), COND_HI() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_shi_8_pd7(void)\r
-{\r
- m68ki_write_8(EA_A7_PD_8(), COND_HI() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_shi_8_di(void)\r
-{\r
- m68ki_write_8(EA_AY_DI_8(), COND_HI() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_shi_8_ix(void)\r
-{\r
- m68ki_write_8(EA_AY_IX_8(), COND_HI() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_shi_8_aw(void)\r
-{\r
- m68ki_write_8(EA_AW_8(), COND_HI() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_shi_8_al(void)\r
-{\r
- m68ki_write_8(EA_AL_8(), COND_HI() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sls_8_ai(void)\r
-{\r
- m68ki_write_8(EA_AY_AI_8(), COND_LS() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sls_8_pi(void)\r
-{\r
- m68ki_write_8(EA_AY_PI_8(), COND_LS() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sls_8_pi7(void)\r
-{\r
- m68ki_write_8(EA_A7_PI_8(), COND_LS() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sls_8_pd(void)\r
-{\r
- m68ki_write_8(EA_AY_PD_8(), COND_LS() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sls_8_pd7(void)\r
-{\r
- m68ki_write_8(EA_A7_PD_8(), COND_LS() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sls_8_di(void)\r
-{\r
- m68ki_write_8(EA_AY_DI_8(), COND_LS() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sls_8_ix(void)\r
-{\r
- m68ki_write_8(EA_AY_IX_8(), COND_LS() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sls_8_aw(void)\r
-{\r
- m68ki_write_8(EA_AW_8(), COND_LS() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sls_8_al(void)\r
-{\r
- m68ki_write_8(EA_AL_8(), COND_LS() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_scc_8_ai(void)\r
-{\r
- m68ki_write_8(EA_AY_AI_8(), COND_CC() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_scc_8_pi(void)\r
-{\r
- m68ki_write_8(EA_AY_PI_8(), COND_CC() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_scc_8_pi7(void)\r
-{\r
- m68ki_write_8(EA_A7_PI_8(), COND_CC() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_scc_8_pd(void)\r
-{\r
- m68ki_write_8(EA_AY_PD_8(), COND_CC() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_scc_8_pd7(void)\r
-{\r
- m68ki_write_8(EA_A7_PD_8(), COND_CC() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_scc_8_di(void)\r
-{\r
- m68ki_write_8(EA_AY_DI_8(), COND_CC() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_scc_8_ix(void)\r
-{\r
- m68ki_write_8(EA_AY_IX_8(), COND_CC() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_scc_8_aw(void)\r
-{\r
- m68ki_write_8(EA_AW_8(), COND_CC() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_scc_8_al(void)\r
-{\r
- m68ki_write_8(EA_AL_8(), COND_CC() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_scs_8_ai(void)\r
-{\r
- m68ki_write_8(EA_AY_AI_8(), COND_CS() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_scs_8_pi(void)\r
-{\r
- m68ki_write_8(EA_AY_PI_8(), COND_CS() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_scs_8_pi7(void)\r
-{\r
- m68ki_write_8(EA_A7_PI_8(), COND_CS() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_scs_8_pd(void)\r
-{\r
- m68ki_write_8(EA_AY_PD_8(), COND_CS() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_scs_8_pd7(void)\r
-{\r
- m68ki_write_8(EA_A7_PD_8(), COND_CS() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_scs_8_di(void)\r
-{\r
- m68ki_write_8(EA_AY_DI_8(), COND_CS() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_scs_8_ix(void)\r
-{\r
- m68ki_write_8(EA_AY_IX_8(), COND_CS() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_scs_8_aw(void)\r
-{\r
- m68ki_write_8(EA_AW_8(), COND_CS() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_scs_8_al(void)\r
-{\r
- m68ki_write_8(EA_AL_8(), COND_CS() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sne_8_ai(void)\r
-{\r
- m68ki_write_8(EA_AY_AI_8(), COND_NE() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sne_8_pi(void)\r
-{\r
- m68ki_write_8(EA_AY_PI_8(), COND_NE() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sne_8_pi7(void)\r
-{\r
- m68ki_write_8(EA_A7_PI_8(), COND_NE() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sne_8_pd(void)\r
-{\r
- m68ki_write_8(EA_AY_PD_8(), COND_NE() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sne_8_pd7(void)\r
-{\r
- m68ki_write_8(EA_A7_PD_8(), COND_NE() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sne_8_di(void)\r
-{\r
- m68ki_write_8(EA_AY_DI_8(), COND_NE() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sne_8_ix(void)\r
-{\r
- m68ki_write_8(EA_AY_IX_8(), COND_NE() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sne_8_aw(void)\r
-{\r
- m68ki_write_8(EA_AW_8(), COND_NE() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sne_8_al(void)\r
-{\r
- m68ki_write_8(EA_AL_8(), COND_NE() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_seq_8_ai(void)\r
-{\r
- m68ki_write_8(EA_AY_AI_8(), COND_EQ() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_seq_8_pi(void)\r
-{\r
- m68ki_write_8(EA_AY_PI_8(), COND_EQ() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_seq_8_pi7(void)\r
-{\r
- m68ki_write_8(EA_A7_PI_8(), COND_EQ() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_seq_8_pd(void)\r
-{\r
- m68ki_write_8(EA_AY_PD_8(), COND_EQ() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_seq_8_pd7(void)\r
-{\r
- m68ki_write_8(EA_A7_PD_8(), COND_EQ() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_seq_8_di(void)\r
-{\r
- m68ki_write_8(EA_AY_DI_8(), COND_EQ() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_seq_8_ix(void)\r
-{\r
- m68ki_write_8(EA_AY_IX_8(), COND_EQ() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_seq_8_aw(void)\r
-{\r
- m68ki_write_8(EA_AW_8(), COND_EQ() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_seq_8_al(void)\r
-{\r
- m68ki_write_8(EA_AL_8(), COND_EQ() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_svc_8_ai(void)\r
-{\r
- m68ki_write_8(EA_AY_AI_8(), COND_VC() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_svc_8_pi(void)\r
-{\r
- m68ki_write_8(EA_AY_PI_8(), COND_VC() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_svc_8_pi7(void)\r
-{\r
- m68ki_write_8(EA_A7_PI_8(), COND_VC() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_svc_8_pd(void)\r
-{\r
- m68ki_write_8(EA_AY_PD_8(), COND_VC() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_svc_8_pd7(void)\r
-{\r
- m68ki_write_8(EA_A7_PD_8(), COND_VC() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_svc_8_di(void)\r
-{\r
- m68ki_write_8(EA_AY_DI_8(), COND_VC() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_svc_8_ix(void)\r
-{\r
- m68ki_write_8(EA_AY_IX_8(), COND_VC() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_svc_8_aw(void)\r
-{\r
- m68ki_write_8(EA_AW_8(), COND_VC() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_svc_8_al(void)\r
-{\r
- m68ki_write_8(EA_AL_8(), COND_VC() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_svs_8_ai(void)\r
-{\r
- m68ki_write_8(EA_AY_AI_8(), COND_VS() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_svs_8_pi(void)\r
-{\r
- m68ki_write_8(EA_AY_PI_8(), COND_VS() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_svs_8_pi7(void)\r
-{\r
- m68ki_write_8(EA_A7_PI_8(), COND_VS() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_svs_8_pd(void)\r
-{\r
- m68ki_write_8(EA_AY_PD_8(), COND_VS() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_svs_8_pd7(void)\r
-{\r
- m68ki_write_8(EA_A7_PD_8(), COND_VS() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_svs_8_di(void)\r
-{\r
- m68ki_write_8(EA_AY_DI_8(), COND_VS() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_svs_8_ix(void)\r
-{\r
- m68ki_write_8(EA_AY_IX_8(), COND_VS() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_svs_8_aw(void)\r
-{\r
- m68ki_write_8(EA_AW_8(), COND_VS() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_svs_8_al(void)\r
-{\r
- m68ki_write_8(EA_AL_8(), COND_VS() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_spl_8_ai(void)\r
-{\r
- m68ki_write_8(EA_AY_AI_8(), COND_PL() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_spl_8_pi(void)\r
-{\r
- m68ki_write_8(EA_AY_PI_8(), COND_PL() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_spl_8_pi7(void)\r
-{\r
- m68ki_write_8(EA_A7_PI_8(), COND_PL() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_spl_8_pd(void)\r
-{\r
- m68ki_write_8(EA_AY_PD_8(), COND_PL() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_spl_8_pd7(void)\r
-{\r
- m68ki_write_8(EA_A7_PD_8(), COND_PL() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_spl_8_di(void)\r
-{\r
- m68ki_write_8(EA_AY_DI_8(), COND_PL() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_spl_8_ix(void)\r
-{\r
- m68ki_write_8(EA_AY_IX_8(), COND_PL() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_spl_8_aw(void)\r
-{\r
- m68ki_write_8(EA_AW_8(), COND_PL() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_spl_8_al(void)\r
-{\r
- m68ki_write_8(EA_AL_8(), COND_PL() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_smi_8_ai(void)\r
-{\r
- m68ki_write_8(EA_AY_AI_8(), COND_MI() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_smi_8_pi(void)\r
-{\r
- m68ki_write_8(EA_AY_PI_8(), COND_MI() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_smi_8_pi7(void)\r
-{\r
- m68ki_write_8(EA_A7_PI_8(), COND_MI() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_smi_8_pd(void)\r
-{\r
- m68ki_write_8(EA_AY_PD_8(), COND_MI() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_smi_8_pd7(void)\r
-{\r
- m68ki_write_8(EA_A7_PD_8(), COND_MI() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_smi_8_di(void)\r
-{\r
- m68ki_write_8(EA_AY_DI_8(), COND_MI() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_smi_8_ix(void)\r
-{\r
- m68ki_write_8(EA_AY_IX_8(), COND_MI() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_smi_8_aw(void)\r
-{\r
- m68ki_write_8(EA_AW_8(), COND_MI() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_smi_8_al(void)\r
-{\r
- m68ki_write_8(EA_AL_8(), COND_MI() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sge_8_ai(void)\r
-{\r
- m68ki_write_8(EA_AY_AI_8(), COND_GE() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sge_8_pi(void)\r
-{\r
- m68ki_write_8(EA_AY_PI_8(), COND_GE() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sge_8_pi7(void)\r
-{\r
- m68ki_write_8(EA_A7_PI_8(), COND_GE() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sge_8_pd(void)\r
-{\r
- m68ki_write_8(EA_AY_PD_8(), COND_GE() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sge_8_pd7(void)\r
-{\r
- m68ki_write_8(EA_A7_PD_8(), COND_GE() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sge_8_di(void)\r
-{\r
- m68ki_write_8(EA_AY_DI_8(), COND_GE() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sge_8_ix(void)\r
-{\r
- m68ki_write_8(EA_AY_IX_8(), COND_GE() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sge_8_aw(void)\r
-{\r
- m68ki_write_8(EA_AW_8(), COND_GE() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sge_8_al(void)\r
-{\r
- m68ki_write_8(EA_AL_8(), COND_GE() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_slt_8_ai(void)\r
-{\r
- m68ki_write_8(EA_AY_AI_8(), COND_LT() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_slt_8_pi(void)\r
-{\r
- m68ki_write_8(EA_AY_PI_8(), COND_LT() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_slt_8_pi7(void)\r
-{\r
- m68ki_write_8(EA_A7_PI_8(), COND_LT() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_slt_8_pd(void)\r
-{\r
- m68ki_write_8(EA_AY_PD_8(), COND_LT() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_slt_8_pd7(void)\r
-{\r
- m68ki_write_8(EA_A7_PD_8(), COND_LT() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_slt_8_di(void)\r
-{\r
- m68ki_write_8(EA_AY_DI_8(), COND_LT() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_slt_8_ix(void)\r
-{\r
- m68ki_write_8(EA_AY_IX_8(), COND_LT() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_slt_8_aw(void)\r
-{\r
- m68ki_write_8(EA_AW_8(), COND_LT() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_slt_8_al(void)\r
-{\r
- m68ki_write_8(EA_AL_8(), COND_LT() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sgt_8_ai(void)\r
-{\r
- m68ki_write_8(EA_AY_AI_8(), COND_GT() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sgt_8_pi(void)\r
-{\r
- m68ki_write_8(EA_AY_PI_8(), COND_GT() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sgt_8_pi7(void)\r
-{\r
- m68ki_write_8(EA_A7_PI_8(), COND_GT() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sgt_8_pd(void)\r
-{\r
- m68ki_write_8(EA_AY_PD_8(), COND_GT() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sgt_8_pd7(void)\r
-{\r
- m68ki_write_8(EA_A7_PD_8(), COND_GT() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sgt_8_di(void)\r
-{\r
- m68ki_write_8(EA_AY_DI_8(), COND_GT() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sgt_8_ix(void)\r
-{\r
- m68ki_write_8(EA_AY_IX_8(), COND_GT() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sgt_8_aw(void)\r
-{\r
- m68ki_write_8(EA_AW_8(), COND_GT() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sgt_8_al(void)\r
-{\r
- m68ki_write_8(EA_AL_8(), COND_GT() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sle_8_ai(void)\r
-{\r
- m68ki_write_8(EA_AY_AI_8(), COND_LE() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sle_8_pi(void)\r
-{\r
- m68ki_write_8(EA_AY_PI_8(), COND_LE() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sle_8_pi7(void)\r
-{\r
- m68ki_write_8(EA_A7_PI_8(), COND_LE() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sle_8_pd(void)\r
-{\r
- m68ki_write_8(EA_AY_PD_8(), COND_LE() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sle_8_pd7(void)\r
-{\r
- m68ki_write_8(EA_A7_PD_8(), COND_LE() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sle_8_di(void)\r
-{\r
- m68ki_write_8(EA_AY_DI_8(), COND_LE() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sle_8_ix(void)\r
-{\r
- m68ki_write_8(EA_AY_IX_8(), COND_LE() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sle_8_aw(void)\r
-{\r
- m68ki_write_8(EA_AW_8(), COND_LE() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_sle_8_al(void)\r
-{\r
- m68ki_write_8(EA_AL_8(), COND_LE() ? 0xff : 0);\r
-}\r
-\r
-\r
-void m68k_op_stop(void)\r
-{\r
- if(FLAG_S)\r
- {\r
- uint new_sr = OPER_I_16();\r
- m68ki_trace_t0(); /* auto-disable (see m68kcpu.h) */\r
- CPU_STOPPED |= STOP_LEVEL_STOP;\r
- m68ki_set_sr(new_sr);\r
- m68ki_remaining_cycles = 0;\r
- return;\r
- }\r
- m68ki_exception_privilege_violation();\r
-}\r
-\r
-\r
-void m68k_op_sub_8_er_d(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = MASK_OUT_ABOVE_8(DY);\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_8_er_ai(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_AI_8();\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_8_er_pi(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_PI_8();\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_8_er_pi7(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_A7_PI_8();\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_8_er_pd(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_PD_8();\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_8_er_pd7(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_A7_PD_8();\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_8_er_di(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_DI_8();\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_8_er_ix(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_IX_8();\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_8_er_aw(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AW_8();\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_8_er_al(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AL_8();\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_8_er_pcdi(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_PCDI_8();\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_8_er_pcix(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_PCIX_8();\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_8_er_i(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_I_8();\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_16_er_d(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = MASK_OUT_ABOVE_16(DY);\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_16_er_a(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = MASK_OUT_ABOVE_16(AY);\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_16_er_ai(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_AI_16();\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_16_er_pi(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_PI_16();\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_16_er_pd(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_PD_16();\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_16_er_di(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_DI_16();\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_16_er_ix(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_IX_16();\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_16_er_aw(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AW_16();\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_16_er_al(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AL_16();\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_16_er_pcdi(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_PCDI_16();\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_16_er_pcix(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_PCIX_16();\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_16_er_i(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_I_16();\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_32_er_d(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = DY;\r
- uint dst = *r_dst;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_32_er_a(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = AY;\r
- uint dst = *r_dst;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_32_er_ai(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_AI_32();\r
- uint dst = *r_dst;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_32_er_pi(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_PI_32();\r
- uint dst = *r_dst;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_32_er_pd(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_PD_32();\r
- uint dst = *r_dst;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_32_er_di(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_DI_32();\r
- uint dst = *r_dst;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_32_er_ix(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AY_IX_32();\r
- uint dst = *r_dst;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_32_er_aw(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AW_32();\r
- uint dst = *r_dst;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_32_er_al(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_AL_32();\r
- uint dst = *r_dst;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_32_er_pcdi(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_PCDI_32();\r
- uint dst = *r_dst;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_32_er_pcix(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_PCIX_32();\r
- uint dst = *r_dst;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_32_er_i(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = OPER_I_32();\r
- uint dst = *r_dst;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
-\r
- *r_dst = FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_sub_8_re_ai(void)\r
-{\r
- uint ea = EA_AY_AI_8();\r
- uint src = MASK_OUT_ABOVE_8(DX);\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_sub_8_re_pi(void)\r
-{\r
- uint ea = EA_AY_PI_8();\r
- uint src = MASK_OUT_ABOVE_8(DX);\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_sub_8_re_pi7(void)\r
-{\r
- uint ea = EA_A7_PI_8();\r
- uint src = MASK_OUT_ABOVE_8(DX);\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_sub_8_re_pd(void)\r
-{\r
- uint ea = EA_AY_PD_8();\r
- uint src = MASK_OUT_ABOVE_8(DX);\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_sub_8_re_pd7(void)\r
-{\r
- uint ea = EA_A7_PD_8();\r
- uint src = MASK_OUT_ABOVE_8(DX);\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_sub_8_re_di(void)\r
-{\r
- uint ea = EA_AY_DI_8();\r
- uint src = MASK_OUT_ABOVE_8(DX);\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_sub_8_re_ix(void)\r
-{\r
- uint ea = EA_AY_IX_8();\r
- uint src = MASK_OUT_ABOVE_8(DX);\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_sub_8_re_aw(void)\r
-{\r
- uint ea = EA_AW_8();\r
- uint src = MASK_OUT_ABOVE_8(DX);\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_sub_8_re_al(void)\r
-{\r
- uint ea = EA_AL_8();\r
- uint src = MASK_OUT_ABOVE_8(DX);\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_sub_16_re_ai(void)\r
-{\r
- uint ea = EA_AY_AI_16();\r
- uint src = MASK_OUT_ABOVE_16(DX);\r
- uint dst = m68ki_read_16(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_sub_16_re_pi(void)\r
-{\r
- uint ea = EA_AY_PI_16();\r
- uint src = MASK_OUT_ABOVE_16(DX);\r
- uint dst = m68ki_read_16(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_sub_16_re_pd(void)\r
-{\r
- uint ea = EA_AY_PD_16();\r
- uint src = MASK_OUT_ABOVE_16(DX);\r
- uint dst = m68ki_read_16(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_sub_16_re_di(void)\r
-{\r
- uint ea = EA_AY_DI_16();\r
- uint src = MASK_OUT_ABOVE_16(DX);\r
- uint dst = m68ki_read_16(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_sub_16_re_ix(void)\r
-{\r
- uint ea = EA_AY_IX_16();\r
- uint src = MASK_OUT_ABOVE_16(DX);\r
- uint dst = m68ki_read_16(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_sub_16_re_aw(void)\r
-{\r
- uint ea = EA_AW_16();\r
- uint src = MASK_OUT_ABOVE_16(DX);\r
- uint dst = m68ki_read_16(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_sub_16_re_al(void)\r
-{\r
- uint ea = EA_AL_16();\r
- uint src = MASK_OUT_ABOVE_16(DX);\r
- uint dst = m68ki_read_16(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_sub_32_re_ai(void)\r
-{\r
- uint ea = EA_AY_AI_32();\r
- uint src = DX;\r
- uint dst = m68ki_read_32(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_sub_32_re_pi(void)\r
-{\r
- uint ea = EA_AY_PI_32();\r
- uint src = DX;\r
- uint dst = m68ki_read_32(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_sub_32_re_pd(void)\r
-{\r
- uint ea = EA_AY_PD_32();\r
- uint src = DX;\r
- uint dst = m68ki_read_32(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_sub_32_re_di(void)\r
-{\r
- uint ea = EA_AY_DI_32();\r
- uint src = DX;\r
- uint dst = m68ki_read_32(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_sub_32_re_ix(void)\r
-{\r
- uint ea = EA_AY_IX_32();\r
- uint src = DX;\r
- uint dst = m68ki_read_32(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_sub_32_re_aw(void)\r
-{\r
- uint ea = EA_AW_32();\r
- uint src = DX;\r
- uint dst = m68ki_read_32(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_sub_32_re_al(void)\r
-{\r
- uint ea = EA_AL_32();\r
- uint src = DX;\r
- uint dst = m68ki_read_32(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_suba_16_d(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst - MAKE_INT_16(DY));\r
-}\r
-\r
-\r
-void m68k_op_suba_16_a(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst - MAKE_INT_16(AY));\r
-}\r
-\r
-\r
-void m68k_op_suba_16_ai(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst - MAKE_INT_16(OPER_AY_AI_16()));\r
-}\r
-\r
-\r
-void m68k_op_suba_16_pi(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst - MAKE_INT_16(OPER_AY_PI_16()));\r
-}\r
-\r
-\r
-void m68k_op_suba_16_pd(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst - MAKE_INT_16(OPER_AY_PD_16()));\r
-}\r
-\r
-\r
-void m68k_op_suba_16_di(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst - MAKE_INT_16(OPER_AY_DI_16()));\r
-}\r
-\r
-\r
-void m68k_op_suba_16_ix(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst - MAKE_INT_16(OPER_AY_IX_16()));\r
-}\r
-\r
-\r
-void m68k_op_suba_16_aw(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst - MAKE_INT_16(OPER_AW_16()));\r
-}\r
-\r
-\r
-void m68k_op_suba_16_al(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst - MAKE_INT_16(OPER_AL_16()));\r
-}\r
-\r
-\r
-void m68k_op_suba_16_pcdi(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst - MAKE_INT_16(OPER_PCDI_16()));\r
-}\r
-\r
-\r
-void m68k_op_suba_16_pcix(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst - MAKE_INT_16(OPER_PCIX_16()));\r
-}\r
-\r
-\r
-void m68k_op_suba_16_i(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst - MAKE_INT_16(OPER_I_16()));\r
-}\r
-\r
-\r
-void m68k_op_suba_32_d(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst - DY);\r
-}\r
-\r
-\r
-void m68k_op_suba_32_a(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst - AY);\r
-}\r
-\r
-\r
-void m68k_op_suba_32_ai(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst - OPER_AY_AI_32());\r
-}\r
-\r
-\r
-void m68k_op_suba_32_pi(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst - OPER_AY_PI_32());\r
-}\r
-\r
-\r
-void m68k_op_suba_32_pd(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst - OPER_AY_PD_32());\r
-}\r
-\r
-\r
-void m68k_op_suba_32_di(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst - OPER_AY_DI_32());\r
-}\r
-\r
-\r
-void m68k_op_suba_32_ix(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst - OPER_AY_IX_32());\r
-}\r
-\r
-\r
-void m68k_op_suba_32_aw(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst - OPER_AW_32());\r
-}\r
-\r
-\r
-void m68k_op_suba_32_al(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst - OPER_AL_32());\r
-}\r
-\r
-\r
-void m68k_op_suba_32_pcdi(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst - OPER_PCDI_32());\r
-}\r
-\r
-\r
-void m68k_op_suba_32_pcix(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst - OPER_PCIX_32());\r
-}\r
-\r
-\r
-void m68k_op_suba_32_i(void)\r
-{\r
- uint* r_dst = &AX;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst - OPER_I_32());\r
-}\r
-\r
-\r
-void m68k_op_subi_8_d(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint src = OPER_I_8();\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_subi_8_ai(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AY_AI_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subi_8_pi(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AY_PI_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subi_8_pi7(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_A7_PI_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subi_8_pd(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AY_PD_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subi_8_pd7(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_A7_PD_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subi_8_di(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AY_DI_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subi_8_ix(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AY_IX_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subi_8_aw(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AW_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subi_8_al(void)\r
-{\r
- uint src = OPER_I_8();\r
- uint ea = EA_AL_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subi_16_d(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint src = OPER_I_16();\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_subi_16_ai(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AY_AI_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subi_16_pi(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AY_PI_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subi_16_pd(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AY_PD_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subi_16_di(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AY_DI_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subi_16_ix(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AY_IX_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subi_16_aw(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AW_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subi_16_al(void)\r
-{\r
- uint src = OPER_I_16();\r
- uint ea = EA_AL_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subi_32_d(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint src = OPER_I_32();\r
- uint dst = *r_dst;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
-\r
- *r_dst = FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_subi_32_ai(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AY_AI_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subi_32_pi(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AY_PI_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subi_32_pd(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AY_PD_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subi_32_di(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AY_DI_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subi_32_ix(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AY_IX_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subi_32_aw(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AW_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subi_32_al(void)\r
-{\r
- uint src = OPER_I_32();\r
- uint ea = EA_AL_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subq_8_d(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_subq_8_ai(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_AI_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subq_8_pi(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_PI_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subq_8_pi7(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_A7_PI_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subq_8_pd(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_PD_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subq_8_pd7(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_A7_PD_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subq_8_di(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_DI_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subq_8_ix(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_IX_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subq_8_aw(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AW_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subq_8_al(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AL_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = MASK_OUT_ABOVE_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- m68ki_write_8(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subq_16_d(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_subq_16_a(void)\r
-{\r
- uint* r_dst = &AY;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst - ((((REG_IR >> 9) - 1) & 7) + 1));\r
-}\r
-\r
-\r
-void m68k_op_subq_16_ai(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_AI_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subq_16_pi(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_PI_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subq_16_pd(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_PD_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subq_16_di(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_DI_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subq_16_ix(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_IX_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subq_16_aw(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AW_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subq_16_al(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AL_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = MASK_OUT_ABOVE_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
-\r
- m68ki_write_16(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subq_32_d(void)\r
-{\r
- uint* r_dst = &DY;\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint dst = *r_dst;\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
-\r
- *r_dst = FLAG_Z;\r
-}\r
-\r
-\r
-void m68k_op_subq_32_a(void)\r
-{\r
- uint* r_dst = &AY;\r
-\r
- *r_dst = MASK_OUT_ABOVE_32(*r_dst - ((((REG_IR >> 9) - 1) & 7) + 1));\r
-}\r
-\r
-\r
-void m68k_op_subq_32_ai(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_AI_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subq_32_pi(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_PI_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subq_32_pd(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_PD_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subq_32_di(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_DI_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subq_32_ix(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AY_IX_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subq_32_aw(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AW_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subq_32_al(void)\r
-{\r
- uint src = (((REG_IR >> 9) - 1) & 7) + 1;\r
- uint ea = EA_AL_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = dst - src;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = MASK_OUT_ABOVE_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
-\r
- m68ki_write_32(ea, FLAG_Z);\r
-}\r
-\r
-\r
-void m68k_op_subx_8_rr(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = MASK_OUT_ABOVE_8(DY);\r
- uint dst = MASK_OUT_ABOVE_8(*r_dst);\r
- uint res = dst - src - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
- FLAG_Z |= res;\r
-\r
- *r_dst = MASK_OUT_BELOW_8(*r_dst) | res;\r
-}\r
-\r
-\r
-void m68k_op_subx_16_rr(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = MASK_OUT_ABOVE_16(DY);\r
- uint dst = MASK_OUT_ABOVE_16(*r_dst);\r
- uint res = dst - src - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
-\r
- res = MASK_OUT_ABOVE_16(res);\r
- FLAG_Z |= res;\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | res;\r
-}\r
-\r
-\r
-void m68k_op_subx_32_rr(void)\r
-{\r
- uint* r_dst = &DX;\r
- uint src = DY;\r
- uint dst = *r_dst;\r
- uint res = dst - src - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
-\r
- res = MASK_OUT_ABOVE_32(res);\r
- FLAG_Z |= res;\r
-\r
- *r_dst = res;\r
-}\r
-\r
-\r
-void m68k_op_subx_8_mm_ax7(void)\r
-{\r
- uint src = OPER_AY_PD_8();\r
- uint ea = EA_A7_PD_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_subx_8_mm_ay7(void)\r
-{\r
- uint src = OPER_A7_PD_8();\r
- uint ea = EA_AX_PD_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_subx_8_mm_axy7(void)\r
-{\r
- uint src = OPER_A7_PD_8();\r
- uint ea = EA_A7_PD_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_subx_8_mm(void)\r
-{\r
- uint src = OPER_AY_PD_8();\r
- uint ea = EA_AX_PD_8();\r
- uint dst = m68ki_read_8(ea);\r
- uint res = dst - src - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_X = FLAG_C = CFLAG_8(res);\r
- FLAG_V = VFLAG_SUB_8(src, dst, res);\r
-\r
- res = MASK_OUT_ABOVE_8(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_8(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_subx_16_mm(void)\r
-{\r
- uint src = OPER_AY_PD_16();\r
- uint ea = EA_AX_PD_16();\r
- uint dst = m68ki_read_16(ea);\r
- uint res = dst - src - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_X = FLAG_C = CFLAG_16(res);\r
- FLAG_V = VFLAG_SUB_16(src, dst, res);\r
-\r
- res = MASK_OUT_ABOVE_16(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_16(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_subx_32_mm(void)\r
-{\r
- uint src = OPER_AY_PD_32();\r
- uint ea = EA_AX_PD_32();\r
- uint dst = m68ki_read_32(ea);\r
- uint res = dst - src - XFLAG_AS_1();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_X = FLAG_C = CFLAG_SUB_32(src, dst, res);\r
- FLAG_V = VFLAG_SUB_32(src, dst, res);\r
-\r
- res = MASK_OUT_ABOVE_32(res);\r
- FLAG_Z |= res;\r
-\r
- m68ki_write_32(ea, res);\r
-}\r
-\r
-\r
-void m68k_op_swap_32(void)\r
-{\r
- uint* r_dst = &DY;\r
-\r
- FLAG_Z = MASK_OUT_ABOVE_32(*r_dst<<16);\r
- *r_dst = (*r_dst>>16) | FLAG_Z;\r
-\r
- FLAG_Z = *r_dst;\r
- FLAG_N = NFLAG_32(*r_dst);\r
- FLAG_C = CFLAG_CLEAR;\r
- FLAG_V = VFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_tas_8_d(void)\r
-{\r
- uint* r_dst = &DY;\r
-\r
- FLAG_Z = MASK_OUT_ABOVE_8(*r_dst);\r
- FLAG_N = NFLAG_8(*r_dst);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- *r_dst |= 0x80;\r
-}\r
-\r
-\r
-void m68k_op_tas_8_ai(void)\r
-{\r
- uint ea = EA_AY_AI_8();\r
- uint dst = m68ki_read_8(ea);\r
-\r
- FLAG_Z = dst;\r
- FLAG_N = NFLAG_8(dst);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-// m68ki_write_8(ea, dst | 0x80); // notaz: genesis, but only to mem\r
-}\r
-\r
-\r
-void m68k_op_tas_8_pi(void)\r
-{\r
- uint ea = EA_AY_PI_8();\r
- uint dst = m68ki_read_8(ea);\r
-\r
- FLAG_Z = dst;\r
- FLAG_N = NFLAG_8(dst);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-// m68ki_write_8(ea, dst | 0x80); // notaz: genesis, but only to mem\r
-}\r
-\r
-\r
-void m68k_op_tas_8_pi7(void)\r
-{\r
- uint ea = EA_A7_PI_8();\r
- uint dst = m68ki_read_8(ea);\r
-\r
- FLAG_Z = dst;\r
- FLAG_N = NFLAG_8(dst);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-// m68ki_write_8(ea, dst | 0x80); // notaz: genesis, but only to mem\r
-}\r
-\r
-\r
-void m68k_op_tas_8_pd(void)\r
-{\r
- uint ea = EA_AY_PD_8();\r
- uint dst = m68ki_read_8(ea);\r
-\r
- FLAG_Z = dst;\r
- FLAG_N = NFLAG_8(dst);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-// m68ki_write_8(ea, dst | 0x80); // notaz: genesis, but only to mem\r
-}\r
-\r
-\r
-void m68k_op_tas_8_pd7(void)\r
-{\r
- uint ea = EA_A7_PD_8();\r
- uint dst = m68ki_read_8(ea);\r
-\r
- FLAG_Z = dst;\r
- FLAG_N = NFLAG_8(dst);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-// m68ki_write_8(ea, dst | 0x80); // notaz: genesis, but only to mem\r
-}\r
-\r
-\r
-void m68k_op_tas_8_di(void)\r
-{\r
- uint ea = EA_AY_DI_8();\r
- uint dst = m68ki_read_8(ea);\r
-\r
- FLAG_Z = dst;\r
- FLAG_N = NFLAG_8(dst);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-// m68ki_write_8(ea, dst | 0x80); // notaz: genesis, but only to mem\r
-}\r
-\r
-\r
-void m68k_op_tas_8_ix(void)\r
-{\r
- uint ea = EA_AY_IX_8();\r
- uint dst = m68ki_read_8(ea);\r
-\r
- FLAG_Z = dst;\r
- FLAG_N = NFLAG_8(dst);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-// m68ki_write_8(ea, dst | 0x80); // notaz: genesis, but only to mem\r
-}\r
-\r
-\r
-void m68k_op_tas_8_aw(void)\r
-{\r
- uint ea = EA_AW_8();\r
- uint dst = m68ki_read_8(ea);\r
-\r
- FLAG_Z = dst;\r
- FLAG_N = NFLAG_8(dst);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-// m68ki_write_8(ea, dst | 0x80); // notaz: genesis, but only to mem\r
-}\r
-\r
-\r
-void m68k_op_tas_8_al(void)\r
-{\r
- uint ea = EA_AL_8();\r
- uint dst = m68ki_read_8(ea);\r
-\r
- FLAG_Z = dst;\r
- FLAG_N = NFLAG_8(dst);\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-// m68ki_write_8(ea, dst | 0x80); // notaz: genesis, but only to mem\r
-}\r
-\r
-\r
-void m68k_op_trap(void)\r
-{\r
- /* Trap#n stacks exception frame type 0 */\r
- m68ki_exception_trapN(EXCEPTION_TRAP_BASE + (REG_IR & 0xf)); /* HJB 990403 */\r
-}\r
-\r
-\r
-void m68k_op_trapt(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapt_16(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapt_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapf(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapf_16(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- REG_PC += 2;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapf_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- REG_PC += 4;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_traphi(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_HI())\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapls(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_LS())\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapcc(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_CC())\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapcs(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_CS())\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapne(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_NE())\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapeq(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_EQ())\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapvc(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_VC())\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapvs(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_VS())\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trappl(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_PL())\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapmi(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_MI())\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapge(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_GE())\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_traplt(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_LT())\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapgt(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_GT())\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_traple(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_LE())\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_traphi_16(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_HI())\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- REG_PC += 2;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapls_16(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_LS())\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- REG_PC += 2;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapcc_16(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_CC())\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- REG_PC += 2;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapcs_16(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_CS())\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- REG_PC += 2;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapne_16(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_NE())\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- REG_PC += 2;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapeq_16(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_EQ())\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- REG_PC += 2;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapvc_16(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_VC())\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- REG_PC += 2;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapvs_16(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_VS())\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- REG_PC += 2;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trappl_16(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_PL())\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- REG_PC += 2;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapmi_16(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_MI())\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- REG_PC += 2;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapge_16(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_GE())\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- REG_PC += 2;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_traplt_16(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_LT())\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- REG_PC += 2;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapgt_16(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_GT())\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- REG_PC += 2;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_traple_16(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_LE())\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- REG_PC += 2;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_traphi_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_HI())\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- REG_PC += 4;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapls_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_LS())\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- REG_PC += 4;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapcc_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_CC())\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- REG_PC += 4;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapcs_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_CS())\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- REG_PC += 4;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapne_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_NE())\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- REG_PC += 4;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapeq_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_EQ())\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- REG_PC += 4;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapvc_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_VC())\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- REG_PC += 4;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapvs_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_VS())\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- REG_PC += 4;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trappl_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_PL())\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- REG_PC += 4;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapmi_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_MI())\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- REG_PC += 4;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapge_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_GE())\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- REG_PC += 4;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_traplt_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_LT())\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- REG_PC += 4;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapgt_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_GT())\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- REG_PC += 4;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_traple_32(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- if(COND_LE())\r
- {\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
- return;\r
- }\r
- REG_PC += 4;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_trapv(void)\r
-{\r
- if(COND_VC())\r
- {\r
- return;\r
- }\r
- m68ki_exception_trap(EXCEPTION_TRAPV); /* HJB 990403 */\r
-}\r
-\r
-\r
-void m68k_op_tst_8_d(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_8(DY);\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_tst_8_ai(void)\r
-{\r
- uint res = OPER_AY_AI_8();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_tst_8_pi(void)\r
-{\r
- uint res = OPER_AY_PI_8();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_tst_8_pi7(void)\r
-{\r
- uint res = OPER_A7_PI_8();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_tst_8_pd(void)\r
-{\r
- uint res = OPER_AY_PD_8();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_tst_8_pd7(void)\r
-{\r
- uint res = OPER_A7_PD_8();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_tst_8_di(void)\r
-{\r
- uint res = OPER_AY_DI_8();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_tst_8_ix(void)\r
-{\r
- uint res = OPER_AY_IX_8();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_tst_8_aw(void)\r
-{\r
- uint res = OPER_AW_8();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_tst_8_al(void)\r
-{\r
- uint res = OPER_AL_8();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_tst_8_pcdi(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint res = OPER_PCDI_8();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_tst_8_pcix(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint res = OPER_PCIX_8();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_tst_8_i(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint res = OPER_I_8();\r
-\r
- FLAG_N = NFLAG_8(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_tst_16_d(void)\r
-{\r
- uint res = MASK_OUT_ABOVE_16(DY);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_tst_16_a(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint res = MAKE_INT_16(AY);\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_tst_16_ai(void)\r
-{\r
- uint res = OPER_AY_AI_16();\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_tst_16_pi(void)\r
-{\r
- uint res = OPER_AY_PI_16();\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_tst_16_pd(void)\r
-{\r
- uint res = OPER_AY_PD_16();\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_tst_16_di(void)\r
-{\r
- uint res = OPER_AY_DI_16();\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_tst_16_ix(void)\r
-{\r
- uint res = OPER_AY_IX_16();\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_tst_16_aw(void)\r
-{\r
- uint res = OPER_AW_16();\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_tst_16_al(void)\r
-{\r
- uint res = OPER_AL_16();\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_tst_16_pcdi(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint res = OPER_PCDI_16();\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_tst_16_pcix(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint res = OPER_PCIX_16();\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_tst_16_i(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint res = OPER_I_16();\r
-\r
- FLAG_N = NFLAG_16(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_tst_32_d(void)\r
-{\r
- uint res = DY;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_tst_32_a(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint res = AY;\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_tst_32_ai(void)\r
-{\r
- uint res = OPER_AY_AI_32();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_tst_32_pi(void)\r
-{\r
- uint res = OPER_AY_PI_32();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_tst_32_pd(void)\r
-{\r
- uint res = OPER_AY_PD_32();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_tst_32_di(void)\r
-{\r
- uint res = OPER_AY_DI_32();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_tst_32_ix(void)\r
-{\r
- uint res = OPER_AY_IX_32();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_tst_32_aw(void)\r
-{\r
- uint res = OPER_AW_32();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_tst_32_al(void)\r
-{\r
- uint res = OPER_AL_32();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
-}\r
-\r
-\r
-void m68k_op_tst_32_pcdi(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint res = OPER_PCDI_32();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_tst_32_pcix(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint res = OPER_PCIX_32();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_tst_32_i(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint res = OPER_I_32();\r
-\r
- FLAG_N = NFLAG_32(res);\r
- FLAG_Z = res;\r
- FLAG_V = VFLAG_CLEAR;\r
- FLAG_C = CFLAG_CLEAR;\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_unlk_32_a7(void)\r
-{\r
- REG_A[7] = m68ki_read_32(REG_A[7]);\r
-}\r
-\r
-\r
-void m68k_op_unlk_32(void)\r
-{\r
- uint* r_dst = &AY;\r
-\r
- REG_A[7] = *r_dst;\r
- *r_dst = m68ki_pull_32();\r
-}\r
-\r
-\r
-void m68k_op_unpk_16_rr(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- /* Note: DX and DY are reversed in Motorola's docs */\r
- uint src = DY;\r
- uint* r_dst = &DX;\r
-\r
- *r_dst = MASK_OUT_BELOW_16(*r_dst) | (((((src << 4) & 0x0f00) | (src & 0x000f)) + OPER_I_16()) & 0xffff);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_unpk_16_mm_ax7(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- /* Note: AX and AY are reversed in Motorola's docs */\r
- uint src = OPER_AY_PD_8();\r
- uint ea_dst;\r
-\r
- src = (((src << 4) & 0x0f00) | (src & 0x000f)) + OPER_I_16();\r
- ea_dst = EA_A7_PD_8();\r
- m68ki_write_8(ea_dst, (src >> 8) & 0xff);\r
- ea_dst = EA_A7_PD_8();\r
- m68ki_write_8(ea_dst, src & 0xff);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_unpk_16_mm_ay7(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- /* Note: AX and AY are reversed in Motorola's docs */\r
- uint src = OPER_A7_PD_8();\r
- uint ea_dst;\r
-\r
- src = (((src << 4) & 0x0f00) | (src & 0x000f)) + OPER_I_16();\r
- ea_dst = EA_AX_PD_8();\r
- m68ki_write_8(ea_dst, (src >> 8) & 0xff);\r
- ea_dst = EA_AX_PD_8();\r
- m68ki_write_8(ea_dst, src & 0xff);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_unpk_16_mm_axy7(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- uint src = OPER_A7_PD_8();\r
- uint ea_dst;\r
-\r
- src = (((src << 4) & 0x0f00) | (src & 0x000f)) + OPER_I_16();\r
- ea_dst = EA_A7_PD_8();\r
- m68ki_write_8(ea_dst, (src >> 8) & 0xff);\r
- ea_dst = EA_A7_PD_8();\r
- m68ki_write_8(ea_dst, src & 0xff);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-void m68k_op_unpk_16_mm(void)\r
-{\r
- if(CPU_TYPE_IS_EC020_PLUS(CPU_TYPE))\r
- {\r
- /* Note: AX and AY are reversed in Motorola's docs */\r
- uint src = OPER_AY_PD_8();\r
- uint ea_dst;\r
-\r
- src = (((src << 4) & 0x0f00) | (src & 0x000f)) + OPER_I_16();\r
- ea_dst = EA_AX_PD_8();\r
- m68ki_write_8(ea_dst, (src >> 8) & 0xff);\r
- ea_dst = EA_AX_PD_8();\r
- m68ki_write_8(ea_dst, src & 0xff);\r
- return;\r
- }\r
- m68ki_exception_illegal();\r
-}\r
-\r
-\r
-/* ======================================================================== */\r
-/* ============================== END OF FILE ============================= */\r
-/* ======================================================================== */\r
-\r
-\r
+++ /dev/null
-/* ======================================================================== */\r
-/* ========================= OPCODE TABLE BUILDER ========================= */\r
-/* ======================================================================== */\r
-\r
-#include "m68kops.h"\r
-\r
-#define NUM_CPU_TYPES 4\r
-\r
-void (*m68ki_instruction_jump_table[0x10000])(void); /* opcode handler jump table */\r
-unsigned char m68ki_cycles[NUM_CPU_TYPES][0x10000]; /* Cycles used by CPU type */\r
-\r
-/* This is used to generate the opcode handler jump table */\r
-typedef struct\r
-{\r
- void (*opcode_handler)(void); /* handler function */\r
- unsigned int mask; /* mask on opcode */\r
- unsigned int match; /* what to match after masking */\r
- unsigned char cycles[NUM_CPU_TYPES]; /* cycles each cpu type takes */\r
-} opcode_handler_struct;\r
-\r
-\r
-/* Opcode handler table */\r
-static opcode_handler_struct m68k_opcode_handler_table[] =\r
-{\r
-/* function mask match 000 010 020 040 */\r
- {m68k_op_1010 , 0xf000, 0xa000, { 4, 4, 4, 4}},\r
- {m68k_op_1111 , 0xf000, 0xf000, { 4, 4, 4, 4}},\r
- {m68k_op_moveq_32 , 0xf100, 0x7000, { 4, 4, 2, 2}},\r
- {m68k_op_cpbcc_32 , 0xf180, 0xf080, { 0, 0, 4, 0}},\r
- {m68k_op_cpgen_32 , 0xf1c0, 0xf000, { 0, 0, 4, 0}},\r
- {m68k_op_cpscc_32 , 0xf1c0, 0xf040, { 0, 0, 4, 0}},\r
- {m68k_op_bra_8 , 0xff00, 0x6000, { 10, 10, 10, 10}},\r
- {m68k_op_bsr_8 , 0xff00, 0x6100, { 18, 18, 7, 7}},\r
- {m68k_op_bhi_8 , 0xff00, 0x6200, { 10, 10, 6, 6}},\r
- {m68k_op_bls_8 , 0xff00, 0x6300, { 10, 10, 6, 6}},\r
- {m68k_op_bcc_8 , 0xff00, 0x6400, { 10, 10, 6, 6}},\r
- {m68k_op_bcs_8 , 0xff00, 0x6500, { 10, 10, 6, 6}},\r
- {m68k_op_bne_8 , 0xff00, 0x6600, { 10, 10, 6, 6}},\r
- {m68k_op_beq_8 , 0xff00, 0x6700, { 10, 10, 6, 6}},\r
- {m68k_op_bvc_8 , 0xff00, 0x6800, { 10, 10, 6, 6}},\r
- {m68k_op_bvs_8 , 0xff00, 0x6900, { 10, 10, 6, 6}},\r
- {m68k_op_bpl_8 , 0xff00, 0x6a00, { 10, 10, 6, 6}},\r
- {m68k_op_bmi_8 , 0xff00, 0x6b00, { 10, 10, 6, 6}},\r
- {m68k_op_bge_8 , 0xff00, 0x6c00, { 10, 10, 6, 6}},\r
- {m68k_op_blt_8 , 0xff00, 0x6d00, { 10, 10, 6, 6}},\r
- {m68k_op_bgt_8 , 0xff00, 0x6e00, { 10, 10, 6, 6}},\r
- {m68k_op_ble_8 , 0xff00, 0x6f00, { 10, 10, 6, 6}},\r
- {m68k_op_btst_32_r_d , 0xf1f8, 0x0100, { 6, 6, 4, 4}},\r
- {m68k_op_movep_16_er , 0xf1f8, 0x0108, { 16, 16, 12, 12}},\r
- {m68k_op_btst_8_r_ai , 0xf1f8, 0x0110, { 8, 8, 8, 8}},\r
- {m68k_op_btst_8_r_pi , 0xf1f8, 0x0118, { 8, 8, 8, 8}},\r
- {m68k_op_btst_8_r_pd , 0xf1f8, 0x0120, { 10, 10, 9, 9}},\r
- {m68k_op_btst_8_r_di , 0xf1f8, 0x0128, { 12, 12, 9, 9}},\r
- {m68k_op_btst_8_r_ix , 0xf1f8, 0x0130, { 14, 14, 11, 11}},\r
- {m68k_op_bchg_32_r_d , 0xf1f8, 0x0140, { 8, 8, 4, 4}},\r
- {m68k_op_movep_32_er , 0xf1f8, 0x0148, { 24, 24, 18, 18}},\r
- {m68k_op_bchg_8_r_ai , 0xf1f8, 0x0150, { 12, 12, 8, 8}},\r
- {m68k_op_bchg_8_r_pi , 0xf1f8, 0x0158, { 12, 12, 8, 8}},\r
- {m68k_op_bchg_8_r_pd , 0xf1f8, 0x0160, { 14, 14, 9, 9}},\r
- {m68k_op_bchg_8_r_di , 0xf1f8, 0x0168, { 16, 16, 9, 9}},\r
- {m68k_op_bchg_8_r_ix , 0xf1f8, 0x0170, { 18, 18, 11, 11}},\r
- {m68k_op_bclr_32_r_d , 0xf1f8, 0x0180, { 10, 10, 4, 4}},\r
- {m68k_op_movep_16_re , 0xf1f8, 0x0188, { 16, 16, 11, 11}},\r
- {m68k_op_bclr_8_r_ai , 0xf1f8, 0x0190, { 12, 14, 8, 8}},\r
- {m68k_op_bclr_8_r_pi , 0xf1f8, 0x0198, { 12, 14, 8, 8}},\r
- {m68k_op_bclr_8_r_pd , 0xf1f8, 0x01a0, { 14, 16, 9, 9}},\r
- {m68k_op_bclr_8_r_di , 0xf1f8, 0x01a8, { 16, 18, 9, 9}},\r
- {m68k_op_bclr_8_r_ix , 0xf1f8, 0x01b0, { 18, 20, 11, 11}},\r
- {m68k_op_bset_32_r_d , 0xf1f8, 0x01c0, { 8, 8, 4, 4}},\r
- {m68k_op_movep_32_re , 0xf1f8, 0x01c8, { 24, 24, 17, 17}},\r
- {m68k_op_bset_8_r_ai , 0xf1f8, 0x01d0, { 12, 12, 8, 8}},\r
- {m68k_op_bset_8_r_pi , 0xf1f8, 0x01d8, { 12, 12, 8, 8}},\r
- {m68k_op_bset_8_r_pd , 0xf1f8, 0x01e0, { 14, 14, 9, 9}},\r
- {m68k_op_bset_8_r_di , 0xf1f8, 0x01e8, { 16, 16, 9, 9}},\r
- {m68k_op_bset_8_r_ix , 0xf1f8, 0x01f0, { 18, 18, 11, 11}},\r
- {m68k_op_move_8_d_d , 0xf1f8, 0x1000, { 4, 4, 2, 2}},\r
- {m68k_op_move_8_d_ai , 0xf1f8, 0x1010, { 8, 8, 6, 6}},\r
- {m68k_op_move_8_d_pi , 0xf1f8, 0x1018, { 8, 8, 6, 6}},\r
- {m68k_op_move_8_d_pd , 0xf1f8, 0x1020, { 10, 10, 7, 7}},\r
- {m68k_op_move_8_d_di , 0xf1f8, 0x1028, { 12, 12, 7, 7}},\r
- {m68k_op_move_8_d_ix , 0xf1f8, 0x1030, { 14, 14, 9, 9}},\r
- {m68k_op_move_8_ai_d , 0xf1f8, 0x1080, { 8, 8, 4, 4}},\r
- {m68k_op_move_8_ai_ai , 0xf1f8, 0x1090, { 12, 12, 8, 8}},\r
- {m68k_op_move_8_ai_pi , 0xf1f8, 0x1098, { 12, 12, 8, 8}},\r
- {m68k_op_move_8_ai_pd , 0xf1f8, 0x10a0, { 14, 14, 9, 9}},\r
- {m68k_op_move_8_ai_di , 0xf1f8, 0x10a8, { 16, 16, 9, 9}},\r
- {m68k_op_move_8_ai_ix , 0xf1f8, 0x10b0, { 18, 18, 11, 11}},\r
- {m68k_op_move_8_pi_d , 0xf1f8, 0x10c0, { 8, 8, 4, 4}},\r
- {m68k_op_move_8_pi_ai , 0xf1f8, 0x10d0, { 12, 12, 8, 8}},\r
- {m68k_op_move_8_pi_pi , 0xf1f8, 0x10d8, { 12, 12, 8, 8}},\r
- {m68k_op_move_8_pi_pd , 0xf1f8, 0x10e0, { 14, 14, 9, 9}},\r
- {m68k_op_move_8_pi_di , 0xf1f8, 0x10e8, { 16, 16, 9, 9}},\r
- {m68k_op_move_8_pi_ix , 0xf1f8, 0x10f0, { 18, 18, 11, 11}},\r
- {m68k_op_move_8_pd_d , 0xf1f8, 0x1100, { 8, 8, 5, 5}},\r
- {m68k_op_move_8_pd_ai , 0xf1f8, 0x1110, { 12, 12, 9, 9}},\r
- {m68k_op_move_8_pd_pi , 0xf1f8, 0x1118, { 12, 12, 9, 9}},\r
- {m68k_op_move_8_pd_pd , 0xf1f8, 0x1120, { 14, 14, 10, 10}},\r
- {m68k_op_move_8_pd_di , 0xf1f8, 0x1128, { 16, 16, 10, 10}},\r
- {m68k_op_move_8_pd_ix , 0xf1f8, 0x1130, { 18, 18, 12, 12}},\r
- {m68k_op_move_8_di_d , 0xf1f8, 0x1140, { 12, 12, 5, 5}},\r
- {m68k_op_move_8_di_ai , 0xf1f8, 0x1150, { 16, 16, 9, 9}},\r
- {m68k_op_move_8_di_pi , 0xf1f8, 0x1158, { 16, 16, 9, 9}},\r
- {m68k_op_move_8_di_pd , 0xf1f8, 0x1160, { 18, 18, 10, 10}},\r
- {m68k_op_move_8_di_di , 0xf1f8, 0x1168, { 20, 20, 10, 10}},\r
- {m68k_op_move_8_di_ix , 0xf1f8, 0x1170, { 22, 22, 12, 12}},\r
- {m68k_op_move_8_ix_d , 0xf1f8, 0x1180, { 14, 14, 7, 7}},\r
- {m68k_op_move_8_ix_ai , 0xf1f8, 0x1190, { 18, 18, 11, 11}},\r
- {m68k_op_move_8_ix_pi , 0xf1f8, 0x1198, { 18, 18, 11, 11}},\r
- {m68k_op_move_8_ix_pd , 0xf1f8, 0x11a0, { 20, 20, 12, 12}},\r
- {m68k_op_move_8_ix_di , 0xf1f8, 0x11a8, { 22, 22, 12, 12}},\r
- {m68k_op_move_8_ix_ix , 0xf1f8, 0x11b0, { 24, 24, 14, 14}},\r
- {m68k_op_move_32_d_d , 0xf1f8, 0x2000, { 4, 4, 2, 2}},\r
- {m68k_op_move_32_d_a , 0xf1f8, 0x2008, { 4, 4, 2, 2}},\r
- {m68k_op_move_32_d_ai , 0xf1f8, 0x2010, { 12, 12, 6, 6}},\r
- {m68k_op_move_32_d_pi , 0xf1f8, 0x2018, { 12, 12, 6, 6}},\r
- {m68k_op_move_32_d_pd , 0xf1f8, 0x2020, { 14, 14, 7, 7}},\r
- {m68k_op_move_32_d_di , 0xf1f8, 0x2028, { 16, 16, 7, 7}},\r
- {m68k_op_move_32_d_ix , 0xf1f8, 0x2030, { 18, 18, 9, 9}},\r
- {m68k_op_movea_32_d , 0xf1f8, 0x2040, { 4, 4, 2, 2}},\r
- {m68k_op_movea_32_a , 0xf1f8, 0x2048, { 4, 4, 2, 2}},\r
- {m68k_op_movea_32_ai , 0xf1f8, 0x2050, { 12, 12, 6, 6}},\r
- {m68k_op_movea_32_pi , 0xf1f8, 0x2058, { 12, 12, 6, 6}},\r
- {m68k_op_movea_32_pd , 0xf1f8, 0x2060, { 14, 14, 7, 7}},\r
- {m68k_op_movea_32_di , 0xf1f8, 0x2068, { 16, 16, 7, 7}},\r
- {m68k_op_movea_32_ix , 0xf1f8, 0x2070, { 18, 18, 9, 9}},\r
- {m68k_op_move_32_ai_d , 0xf1f8, 0x2080, { 12, 12, 4, 4}},\r
- {m68k_op_move_32_ai_a , 0xf1f8, 0x2088, { 12, 12, 4, 4}},\r
- {m68k_op_move_32_ai_ai , 0xf1f8, 0x2090, { 20, 20, 8, 8}},\r
- {m68k_op_move_32_ai_pi , 0xf1f8, 0x2098, { 20, 20, 8, 8}},\r
- {m68k_op_move_32_ai_pd , 0xf1f8, 0x20a0, { 22, 22, 9, 9}},\r
- {m68k_op_move_32_ai_di , 0xf1f8, 0x20a8, { 24, 24, 9, 9}},\r
- {m68k_op_move_32_ai_ix , 0xf1f8, 0x20b0, { 26, 26, 11, 11}},\r
- {m68k_op_move_32_pi_d , 0xf1f8, 0x20c0, { 12, 12, 4, 4}},\r
- {m68k_op_move_32_pi_a , 0xf1f8, 0x20c8, { 12, 12, 4, 4}},\r
- {m68k_op_move_32_pi_ai , 0xf1f8, 0x20d0, { 20, 20, 8, 8}},\r
- {m68k_op_move_32_pi_pi , 0xf1f8, 0x20d8, { 20, 20, 8, 8}},\r
- {m68k_op_move_32_pi_pd , 0xf1f8, 0x20e0, { 22, 22, 9, 9}},\r
- {m68k_op_move_32_pi_di , 0xf1f8, 0x20e8, { 24, 24, 9, 9}},\r
- {m68k_op_move_32_pi_ix , 0xf1f8, 0x20f0, { 26, 26, 11, 11}},\r
- {m68k_op_move_32_pd_d , 0xf1f8, 0x2100, { 12, 14, 5, 5}},\r
- {m68k_op_move_32_pd_a , 0xf1f8, 0x2108, { 12, 14, 5, 5}},\r
- {m68k_op_move_32_pd_ai , 0xf1f8, 0x2110, { 20, 22, 9, 9}},\r
- {m68k_op_move_32_pd_pi , 0xf1f8, 0x2118, { 20, 22, 9, 9}},\r
- {m68k_op_move_32_pd_pd , 0xf1f8, 0x2120, { 22, 24, 10, 10}},\r
- {m68k_op_move_32_pd_di , 0xf1f8, 0x2128, { 24, 26, 10, 10}},\r
- {m68k_op_move_32_pd_ix , 0xf1f8, 0x2130, { 26, 28, 12, 12}},\r
- {m68k_op_move_32_di_d , 0xf1f8, 0x2140, { 16, 16, 5, 5}},\r
- {m68k_op_move_32_di_a , 0xf1f8, 0x2148, { 16, 16, 5, 5}},\r
- {m68k_op_move_32_di_ai , 0xf1f8, 0x2150, { 24, 24, 9, 9}},\r
- {m68k_op_move_32_di_pi , 0xf1f8, 0x2158, { 24, 24, 9, 9}},\r
- {m68k_op_move_32_di_pd , 0xf1f8, 0x2160, { 26, 26, 10, 10}},\r
- {m68k_op_move_32_di_di , 0xf1f8, 0x2168, { 28, 28, 10, 10}},\r
- {m68k_op_move_32_di_ix , 0xf1f8, 0x2170, { 30, 30, 12, 12}},\r
- {m68k_op_move_32_ix_d , 0xf1f8, 0x2180, { 18, 18, 7, 7}},\r
- {m68k_op_move_32_ix_a , 0xf1f8, 0x2188, { 18, 18, 7, 7}},\r
- {m68k_op_move_32_ix_ai , 0xf1f8, 0x2190, { 26, 26, 11, 11}},\r
- {m68k_op_move_32_ix_pi , 0xf1f8, 0x2198, { 26, 26, 11, 11}},\r
- {m68k_op_move_32_ix_pd , 0xf1f8, 0x21a0, { 28, 28, 12, 12}},\r
- {m68k_op_move_32_ix_di , 0xf1f8, 0x21a8, { 30, 30, 12, 12}},\r
- {m68k_op_move_32_ix_ix , 0xf1f8, 0x21b0, { 32, 32, 14, 14}},\r
- {m68k_op_move_16_d_d , 0xf1f8, 0x3000, { 4, 4, 2, 2}},\r
- {m68k_op_move_16_d_a , 0xf1f8, 0x3008, { 4, 4, 2, 2}},\r
- {m68k_op_move_16_d_ai , 0xf1f8, 0x3010, { 8, 8, 6, 6}},\r
- {m68k_op_move_16_d_pi , 0xf1f8, 0x3018, { 8, 8, 6, 6}},\r
- {m68k_op_move_16_d_pd , 0xf1f8, 0x3020, { 10, 10, 7, 7}},\r
- {m68k_op_move_16_d_di , 0xf1f8, 0x3028, { 12, 12, 7, 7}},\r
- {m68k_op_move_16_d_ix , 0xf1f8, 0x3030, { 14, 14, 9, 9}},\r
- {m68k_op_movea_16_d , 0xf1f8, 0x3040, { 4, 4, 2, 2}},\r
- {m68k_op_movea_16_a , 0xf1f8, 0x3048, { 4, 4, 2, 2}},\r
- {m68k_op_movea_16_ai , 0xf1f8, 0x3050, { 8, 8, 6, 6}},\r
- {m68k_op_movea_16_pi , 0xf1f8, 0x3058, { 8, 8, 6, 6}},\r
- {m68k_op_movea_16_pd , 0xf1f8, 0x3060, { 10, 10, 7, 7}},\r
- {m68k_op_movea_16_di , 0xf1f8, 0x3068, { 12, 12, 7, 7}},\r
- {m68k_op_movea_16_ix , 0xf1f8, 0x3070, { 14, 14, 9, 9}},\r
- {m68k_op_move_16_ai_d , 0xf1f8, 0x3080, { 8, 8, 4, 4}},\r
- {m68k_op_move_16_ai_a , 0xf1f8, 0x3088, { 8, 8, 4, 4}},\r
- {m68k_op_move_16_ai_ai , 0xf1f8, 0x3090, { 12, 12, 8, 8}},\r
- {m68k_op_move_16_ai_pi , 0xf1f8, 0x3098, { 12, 12, 8, 8}},\r
- {m68k_op_move_16_ai_pd , 0xf1f8, 0x30a0, { 14, 14, 9, 9}},\r
- {m68k_op_move_16_ai_di , 0xf1f8, 0x30a8, { 16, 16, 9, 9}},\r
- {m68k_op_move_16_ai_ix , 0xf1f8, 0x30b0, { 18, 18, 11, 11}},\r
- {m68k_op_move_16_pi_d , 0xf1f8, 0x30c0, { 8, 8, 4, 4}},\r
- {m68k_op_move_16_pi_a , 0xf1f8, 0x30c8, { 8, 8, 4, 4}},\r
- {m68k_op_move_16_pi_ai , 0xf1f8, 0x30d0, { 12, 12, 8, 8}},\r
- {m68k_op_move_16_pi_pi , 0xf1f8, 0x30d8, { 12, 12, 8, 8}},\r
- {m68k_op_move_16_pi_pd , 0xf1f8, 0x30e0, { 14, 14, 9, 9}},\r
- {m68k_op_move_16_pi_di , 0xf1f8, 0x30e8, { 16, 16, 9, 9}},\r
- {m68k_op_move_16_pi_ix , 0xf1f8, 0x30f0, { 18, 18, 11, 11}},\r
- {m68k_op_move_16_pd_d , 0xf1f8, 0x3100, { 8, 8, 5, 5}},\r
- {m68k_op_move_16_pd_a , 0xf1f8, 0x3108, { 8, 8, 5, 5}},\r
- {m68k_op_move_16_pd_ai , 0xf1f8, 0x3110, { 12, 12, 9, 9}},\r
- {m68k_op_move_16_pd_pi , 0xf1f8, 0x3118, { 12, 12, 9, 9}},\r
- {m68k_op_move_16_pd_pd , 0xf1f8, 0x3120, { 14, 14, 10, 10}},\r
- {m68k_op_move_16_pd_di , 0xf1f8, 0x3128, { 16, 16, 10, 10}},\r
- {m68k_op_move_16_pd_ix , 0xf1f8, 0x3130, { 18, 18, 12, 12}},\r
- {m68k_op_move_16_di_d , 0xf1f8, 0x3140, { 12, 12, 5, 5}},\r
- {m68k_op_move_16_di_a , 0xf1f8, 0x3148, { 12, 12, 5, 5}},\r
- {m68k_op_move_16_di_ai , 0xf1f8, 0x3150, { 16, 16, 9, 9}},\r
- {m68k_op_move_16_di_pi , 0xf1f8, 0x3158, { 16, 16, 9, 9}},\r
- {m68k_op_move_16_di_pd , 0xf1f8, 0x3160, { 18, 18, 10, 10}},\r
- {m68k_op_move_16_di_di , 0xf1f8, 0x3168, { 20, 20, 10, 10}},\r
- {m68k_op_move_16_di_ix , 0xf1f8, 0x3170, { 22, 22, 12, 12}},\r
- {m68k_op_move_16_ix_d , 0xf1f8, 0x3180, { 14, 14, 7, 7}},\r
- {m68k_op_move_16_ix_a , 0xf1f8, 0x3188, { 14, 14, 7, 7}},\r
- {m68k_op_move_16_ix_ai , 0xf1f8, 0x3190, { 18, 18, 11, 11}},\r
- {m68k_op_move_16_ix_pi , 0xf1f8, 0x3198, { 18, 18, 11, 11}},\r
- {m68k_op_move_16_ix_pd , 0xf1f8, 0x31a0, { 20, 20, 12, 12}},\r
- {m68k_op_move_16_ix_di , 0xf1f8, 0x31a8, { 22, 22, 12, 12}},\r
- {m68k_op_move_16_ix_ix , 0xf1f8, 0x31b0, { 24, 24, 14, 14}},\r
- {m68k_op_chk_32_d , 0xf1f8, 0x4100, { 0, 0, 8, 8}},\r
- {m68k_op_chk_32_ai , 0xf1f8, 0x4110, { 0, 0, 12, 12}},\r
- {m68k_op_chk_32_pi , 0xf1f8, 0x4118, { 0, 0, 12, 12}},\r
- {m68k_op_chk_32_pd , 0xf1f8, 0x4120, { 0, 0, 13, 13}},\r
- {m68k_op_chk_32_di , 0xf1f8, 0x4128, { 0, 0, 13, 13}},\r
- {m68k_op_chk_32_ix , 0xf1f8, 0x4130, { 0, 0, 15, 15}},\r
- {m68k_op_chk_16_d , 0xf1f8, 0x4180, { 10, 8, 8, 8}},\r
- {m68k_op_chk_16_ai , 0xf1f8, 0x4190, { 14, 12, 12, 12}},\r
- {m68k_op_chk_16_pi , 0xf1f8, 0x4198, { 14, 12, 12, 12}},\r
- {m68k_op_chk_16_pd , 0xf1f8, 0x41a0, { 16, 14, 13, 13}},\r
- {m68k_op_chk_16_di , 0xf1f8, 0x41a8, { 18, 16, 13, 13}},\r
- {m68k_op_chk_16_ix , 0xf1f8, 0x41b0, { 20, 18, 15, 15}},\r
- {m68k_op_lea_32_ai , 0xf1f8, 0x41d0, { 4, 4, 6, 6}},\r
- {m68k_op_lea_32_di , 0xf1f8, 0x41e8, { 8, 8, 7, 7}},\r
- {m68k_op_lea_32_ix , 0xf1f8, 0x41f0, { 12, 12, 9, 9}},\r
- {m68k_op_addq_8_d , 0xf1f8, 0x5000, { 4, 4, 2, 2}},\r
- {m68k_op_addq_8_ai , 0xf1f8, 0x5010, { 12, 12, 8, 8}},\r
- {m68k_op_addq_8_pi , 0xf1f8, 0x5018, { 12, 12, 8, 8}},\r
- {m68k_op_addq_8_pd , 0xf1f8, 0x5020, { 14, 14, 9, 9}},\r
- {m68k_op_addq_8_di , 0xf1f8, 0x5028, { 16, 16, 9, 9}},\r
- {m68k_op_addq_8_ix , 0xf1f8, 0x5030, { 18, 18, 11, 11}},\r
- {m68k_op_addq_16_d , 0xf1f8, 0x5040, { 4, 4, 2, 2}},\r
- {m68k_op_addq_16_a , 0xf1f8, 0x5048, { 4, 4, 2, 2}},\r
- {m68k_op_addq_16_ai , 0xf1f8, 0x5050, { 12, 12, 8, 8}},\r
- {m68k_op_addq_16_pi , 0xf1f8, 0x5058, { 12, 12, 8, 8}},\r
- {m68k_op_addq_16_pd , 0xf1f8, 0x5060, { 14, 14, 9, 9}},\r
- {m68k_op_addq_16_di , 0xf1f8, 0x5068, { 16, 16, 9, 9}},\r
- {m68k_op_addq_16_ix , 0xf1f8, 0x5070, { 18, 18, 11, 11}},\r
- {m68k_op_addq_32_d , 0xf1f8, 0x5080, { 8, 8, 2, 2}},\r
- {m68k_op_addq_32_a , 0xf1f8, 0x5088, { 8, 8, 2, 2}},\r
- {m68k_op_addq_32_ai , 0xf1f8, 0x5090, { 20, 20, 8, 8}},\r
- {m68k_op_addq_32_pi , 0xf1f8, 0x5098, { 20, 20, 8, 8}},\r
- {m68k_op_addq_32_pd , 0xf1f8, 0x50a0, { 22, 22, 9, 9}},\r
- {m68k_op_addq_32_di , 0xf1f8, 0x50a8, { 24, 24, 9, 9}},\r
- {m68k_op_addq_32_ix , 0xf1f8, 0x50b0, { 26, 26, 11, 11}},\r
- {m68k_op_subq_8_d , 0xf1f8, 0x5100, { 4, 4, 2, 2}},\r
- {m68k_op_subq_8_ai , 0xf1f8, 0x5110, { 12, 12, 8, 8}},\r
- {m68k_op_subq_8_pi , 0xf1f8, 0x5118, { 12, 12, 8, 8}},\r
- {m68k_op_subq_8_pd , 0xf1f8, 0x5120, { 14, 14, 9, 9}},\r
- {m68k_op_subq_8_di , 0xf1f8, 0x5128, { 16, 16, 9, 9}},\r
- {m68k_op_subq_8_ix , 0xf1f8, 0x5130, { 18, 18, 11, 11}},\r
- {m68k_op_subq_16_d , 0xf1f8, 0x5140, { 4, 4, 2, 2}},\r
- {m68k_op_subq_16_a , 0xf1f8, 0x5148, { 8, 4, 2, 2}},\r
- {m68k_op_subq_16_ai , 0xf1f8, 0x5150, { 12, 12, 8, 8}},\r
- {m68k_op_subq_16_pi , 0xf1f8, 0x5158, { 12, 12, 8, 8}},\r
- {m68k_op_subq_16_pd , 0xf1f8, 0x5160, { 14, 14, 9, 9}},\r
- {m68k_op_subq_16_di , 0xf1f8, 0x5168, { 16, 16, 9, 9}},\r
- {m68k_op_subq_16_ix , 0xf1f8, 0x5170, { 18, 18, 11, 11}},\r
- {m68k_op_subq_32_d , 0xf1f8, 0x5180, { 8, 8, 2, 2}},\r
- {m68k_op_subq_32_a , 0xf1f8, 0x5188, { 8, 8, 2, 2}},\r
- {m68k_op_subq_32_ai , 0xf1f8, 0x5190, { 20, 20, 8, 8}},\r
- {m68k_op_subq_32_pi , 0xf1f8, 0x5198, { 20, 20, 8, 8}},\r
- {m68k_op_subq_32_pd , 0xf1f8, 0x51a0, { 22, 22, 9, 9}},\r
- {m68k_op_subq_32_di , 0xf1f8, 0x51a8, { 24, 24, 9, 9}},\r
- {m68k_op_subq_32_ix , 0xf1f8, 0x51b0, { 26, 26, 11, 11}},\r
- {m68k_op_or_8_er_d , 0xf1f8, 0x8000, { 4, 4, 2, 2}},\r
- {m68k_op_or_8_er_ai , 0xf1f8, 0x8010, { 8, 8, 6, 6}},\r
- {m68k_op_or_8_er_pi , 0xf1f8, 0x8018, { 8, 8, 6, 6}},\r
- {m68k_op_or_8_er_pd , 0xf1f8, 0x8020, { 10, 10, 7, 7}},\r
- {m68k_op_or_8_er_di , 0xf1f8, 0x8028, { 12, 12, 7, 7}},\r
- {m68k_op_or_8_er_ix , 0xf1f8, 0x8030, { 14, 14, 9, 9}},\r
- {m68k_op_or_16_er_d , 0xf1f8, 0x8040, { 4, 4, 2, 2}},\r
- {m68k_op_or_16_er_ai , 0xf1f8, 0x8050, { 8, 8, 6, 6}},\r
- {m68k_op_or_16_er_pi , 0xf1f8, 0x8058, { 8, 8, 6, 6}},\r
- {m68k_op_or_16_er_pd , 0xf1f8, 0x8060, { 10, 10, 7, 7}},\r
- {m68k_op_or_16_er_di , 0xf1f8, 0x8068, { 12, 12, 7, 7}},\r
- {m68k_op_or_16_er_ix , 0xf1f8, 0x8070, { 14, 14, 9, 9}},\r
- {m68k_op_or_32_er_d , 0xf1f8, 0x8080, { 8, 6, 2, 2}},\r
- {m68k_op_or_32_er_ai , 0xf1f8, 0x8090, { 14, 14, 6, 6}},\r
- {m68k_op_or_32_er_pi , 0xf1f8, 0x8098, { 14, 14, 6, 6}},\r
- {m68k_op_or_32_er_pd , 0xf1f8, 0x80a0, { 16, 16, 7, 7}},\r
- {m68k_op_or_32_er_di , 0xf1f8, 0x80a8, { 18, 18, 7, 7}},\r
- {m68k_op_or_32_er_ix , 0xf1f8, 0x80b0, { 20, 20, 9, 9}},\r
- {m68k_op_divu_16_d , 0xf1f8, 0x80c0, {140, 108, 44, 44}},\r
- {m68k_op_divu_16_ai , 0xf1f8, 0x80d0, {144, 112, 48, 48}},\r
- {m68k_op_divu_16_pi , 0xf1f8, 0x80d8, {144, 112, 48, 48}},\r
- {m68k_op_divu_16_pd , 0xf1f8, 0x80e0, {146, 114, 49, 49}},\r
- {m68k_op_divu_16_di , 0xf1f8, 0x80e8, {148, 116, 49, 49}},\r
- {m68k_op_divu_16_ix , 0xf1f8, 0x80f0, {150, 118, 51, 51}},\r
- {m68k_op_sbcd_8_rr , 0xf1f8, 0x8100, { 6, 6, 4, 4}},\r
- {m68k_op_sbcd_8_mm , 0xf1f8, 0x8108, { 18, 18, 16, 16}},\r
- {m68k_op_or_8_re_ai , 0xf1f8, 0x8110, { 12, 12, 8, 8}},\r
- {m68k_op_or_8_re_pi , 0xf1f8, 0x8118, { 12, 12, 8, 8}},\r
- {m68k_op_or_8_re_pd , 0xf1f8, 0x8120, { 14, 14, 9, 9}},\r
- {m68k_op_or_8_re_di , 0xf1f8, 0x8128, { 16, 16, 9, 9}},\r
- {m68k_op_or_8_re_ix , 0xf1f8, 0x8130, { 18, 18, 11, 11}},\r
- {m68k_op_pack_16_rr , 0xf1f8, 0x8140, { 0, 0, 6, 6}},\r
- {m68k_op_pack_16_mm , 0xf1f8, 0x8148, { 0, 0, 13, 13}},\r
- {m68k_op_or_16_re_ai , 0xf1f8, 0x8150, { 12, 12, 8, 8}},\r
- {m68k_op_or_16_re_pi , 0xf1f8, 0x8158, { 12, 12, 8, 8}},\r
- {m68k_op_or_16_re_pd , 0xf1f8, 0x8160, { 14, 14, 9, 9}},\r
- {m68k_op_or_16_re_di , 0xf1f8, 0x8168, { 16, 16, 9, 9}},\r
- {m68k_op_or_16_re_ix , 0xf1f8, 0x8170, { 18, 18, 11, 11}},\r
- {m68k_op_unpk_16_rr , 0xf1f8, 0x8180, { 0, 0, 8, 8}},\r
- {m68k_op_unpk_16_mm , 0xf1f8, 0x8188, { 0, 0, 13, 13}},\r
- {m68k_op_or_32_re_ai , 0xf1f8, 0x8190, { 20, 20, 8, 8}},\r
- {m68k_op_or_32_re_pi , 0xf1f8, 0x8198, { 20, 20, 8, 8}},\r
- {m68k_op_or_32_re_pd , 0xf1f8, 0x81a0, { 22, 22, 9, 9}},\r
- {m68k_op_or_32_re_di , 0xf1f8, 0x81a8, { 24, 24, 9, 9}},\r
- {m68k_op_or_32_re_ix , 0xf1f8, 0x81b0, { 26, 26, 11, 11}},\r
- {m68k_op_divs_16_d , 0xf1f8, 0x81c0, {158, 122, 56, 56}},\r
- {m68k_op_divs_16_ai , 0xf1f8, 0x81d0, {162, 126, 60, 60}},\r
- {m68k_op_divs_16_pi , 0xf1f8, 0x81d8, {162, 126, 60, 60}},\r
- {m68k_op_divs_16_pd , 0xf1f8, 0x81e0, {164, 128, 61, 61}},\r
- {m68k_op_divs_16_di , 0xf1f8, 0x81e8, {166, 130, 61, 61}},\r
- {m68k_op_divs_16_ix , 0xf1f8, 0x81f0, {168, 132, 63, 63}},\r
- {m68k_op_sub_8_er_d , 0xf1f8, 0x9000, { 4, 4, 2, 2}},\r
- {m68k_op_sub_8_er_ai , 0xf1f8, 0x9010, { 8, 8, 6, 6}},\r
- {m68k_op_sub_8_er_pi , 0xf1f8, 0x9018, { 8, 8, 6, 6}},\r
- {m68k_op_sub_8_er_pd , 0xf1f8, 0x9020, { 10, 10, 7, 7}},\r
- {m68k_op_sub_8_er_di , 0xf1f8, 0x9028, { 12, 12, 7, 7}},\r
- {m68k_op_sub_8_er_ix , 0xf1f8, 0x9030, { 14, 14, 9, 9}},\r
- {m68k_op_sub_16_er_d , 0xf1f8, 0x9040, { 4, 4, 2, 2}},\r
- {m68k_op_sub_16_er_a , 0xf1f8, 0x9048, { 4, 4, 2, 2}},\r
- {m68k_op_sub_16_er_ai , 0xf1f8, 0x9050, { 8, 8, 6, 6}},\r
- {m68k_op_sub_16_er_pi , 0xf1f8, 0x9058, { 8, 8, 6, 6}},\r
- {m68k_op_sub_16_er_pd , 0xf1f8, 0x9060, { 10, 10, 7, 7}},\r
- {m68k_op_sub_16_er_di , 0xf1f8, 0x9068, { 12, 12, 7, 7}},\r
- {m68k_op_sub_16_er_ix , 0xf1f8, 0x9070, { 14, 14, 9, 9}},\r
- {m68k_op_sub_32_er_d , 0xf1f8, 0x9080, { 8, 6, 2, 2}},\r
- {m68k_op_sub_32_er_a , 0xf1f8, 0x9088, { 8, 6, 2, 2}},\r
- {m68k_op_sub_32_er_ai , 0xf1f8, 0x9090, { 14, 14, 6, 6}},\r
- {m68k_op_sub_32_er_pi , 0xf1f8, 0x9098, { 14, 14, 6, 6}},\r
- {m68k_op_sub_32_er_pd , 0xf1f8, 0x90a0, { 16, 16, 7, 7}},\r
- {m68k_op_sub_32_er_di , 0xf1f8, 0x90a8, { 18, 18, 7, 7}},\r
- {m68k_op_sub_32_er_ix , 0xf1f8, 0x90b0, { 20, 20, 9, 9}},\r
- {m68k_op_suba_16_d , 0xf1f8, 0x90c0, { 8, 8, 2, 2}},\r
- {m68k_op_suba_16_a , 0xf1f8, 0x90c8, { 8, 8, 2, 2}},\r
- {m68k_op_suba_16_ai , 0xf1f8, 0x90d0, { 12, 12, 6, 6}},\r
- {m68k_op_suba_16_pi , 0xf1f8, 0x90d8, { 12, 12, 6, 6}},\r
- {m68k_op_suba_16_pd , 0xf1f8, 0x90e0, { 14, 14, 7, 7}},\r
- {m68k_op_suba_16_di , 0xf1f8, 0x90e8, { 16, 16, 7, 7}},\r
- {m68k_op_suba_16_ix , 0xf1f8, 0x90f0, { 18, 18, 9, 9}},\r
- {m68k_op_subx_8_rr , 0xf1f8, 0x9100, { 4, 4, 2, 2}},\r
- {m68k_op_subx_8_mm , 0xf1f8, 0x9108, { 18, 18, 12, 12}},\r
- {m68k_op_sub_8_re_ai , 0xf1f8, 0x9110, { 12, 12, 8, 8}},\r
- {m68k_op_sub_8_re_pi , 0xf1f8, 0x9118, { 12, 12, 8, 8}},\r
- {m68k_op_sub_8_re_pd , 0xf1f8, 0x9120, { 14, 14, 9, 9}},\r
- {m68k_op_sub_8_re_di , 0xf1f8, 0x9128, { 16, 16, 9, 9}},\r
- {m68k_op_sub_8_re_ix , 0xf1f8, 0x9130, { 18, 18, 11, 11}},\r
- {m68k_op_subx_16_rr , 0xf1f8, 0x9140, { 4, 4, 2, 2}},\r
- {m68k_op_subx_16_mm , 0xf1f8, 0x9148, { 18, 18, 12, 12}},\r
- {m68k_op_sub_16_re_ai , 0xf1f8, 0x9150, { 12, 12, 8, 8}},\r
- {m68k_op_sub_16_re_pi , 0xf1f8, 0x9158, { 12, 12, 8, 8}},\r
- {m68k_op_sub_16_re_pd , 0xf1f8, 0x9160, { 14, 14, 9, 9}},\r
- {m68k_op_sub_16_re_di , 0xf1f8, 0x9168, { 16, 16, 9, 9}},\r
- {m68k_op_sub_16_re_ix , 0xf1f8, 0x9170, { 18, 18, 11, 11}},\r
- {m68k_op_subx_32_rr , 0xf1f8, 0x9180, { 8, 6, 2, 2}},\r
- {m68k_op_subx_32_mm , 0xf1f8, 0x9188, { 30, 30, 12, 12}},\r
- {m68k_op_sub_32_re_ai , 0xf1f8, 0x9190, { 20, 20, 8, 8}},\r
- {m68k_op_sub_32_re_pi , 0xf1f8, 0x9198, { 20, 20, 8, 8}},\r
- {m68k_op_sub_32_re_pd , 0xf1f8, 0x91a0, { 22, 22, 9, 9}},\r
- {m68k_op_sub_32_re_di , 0xf1f8, 0x91a8, { 24, 24, 9, 9}},\r
- {m68k_op_sub_32_re_ix , 0xf1f8, 0x91b0, { 26, 26, 11, 11}},\r
- {m68k_op_suba_32_d , 0xf1f8, 0x91c0, { 8, 6, 2, 2}},\r
- {m68k_op_suba_32_a , 0xf1f8, 0x91c8, { 8, 6, 2, 2}},\r
- {m68k_op_suba_32_ai , 0xf1f8, 0x91d0, { 14, 14, 6, 6}},\r
- {m68k_op_suba_32_pi , 0xf1f8, 0x91d8, { 14, 14, 6, 6}},\r
- {m68k_op_suba_32_pd , 0xf1f8, 0x91e0, { 16, 16, 7, 7}},\r
- {m68k_op_suba_32_di , 0xf1f8, 0x91e8, { 18, 18, 7, 7}},\r
- {m68k_op_suba_32_ix , 0xf1f8, 0x91f0, { 20, 20, 9, 9}},\r
- {m68k_op_cmp_8_d , 0xf1f8, 0xb000, { 4, 4, 2, 2}},\r
- {m68k_op_cmp_8_ai , 0xf1f8, 0xb010, { 8, 8, 6, 6}},\r
- {m68k_op_cmp_8_pi , 0xf1f8, 0xb018, { 8, 8, 6, 6}},\r
- {m68k_op_cmp_8_pd , 0xf1f8, 0xb020, { 10, 10, 7, 7}},\r
- {m68k_op_cmp_8_di , 0xf1f8, 0xb028, { 12, 12, 7, 7}},\r
- {m68k_op_cmp_8_ix , 0xf1f8, 0xb030, { 14, 14, 9, 9}},\r
- {m68k_op_cmp_16_d , 0xf1f8, 0xb040, { 4, 4, 2, 2}},\r
- {m68k_op_cmp_16_a , 0xf1f8, 0xb048, { 4, 4, 2, 2}},\r
- {m68k_op_cmp_16_ai , 0xf1f8, 0xb050, { 8, 8, 6, 6}},\r
- {m68k_op_cmp_16_pi , 0xf1f8, 0xb058, { 8, 8, 6, 6}},\r
- {m68k_op_cmp_16_pd , 0xf1f8, 0xb060, { 10, 10, 7, 7}},\r
- {m68k_op_cmp_16_di , 0xf1f8, 0xb068, { 12, 12, 7, 7}},\r
- {m68k_op_cmp_16_ix , 0xf1f8, 0xb070, { 14, 14, 9, 9}},\r
- {m68k_op_cmp_32_d , 0xf1f8, 0xb080, { 6, 6, 2, 2}},\r
- {m68k_op_cmp_32_a , 0xf1f8, 0xb088, { 6, 6, 2, 2}},\r
- {m68k_op_cmp_32_ai , 0xf1f8, 0xb090, { 14, 14, 6, 6}},\r
- {m68k_op_cmp_32_pi , 0xf1f8, 0xb098, { 14, 14, 6, 6}},\r
- {m68k_op_cmp_32_pd , 0xf1f8, 0xb0a0, { 16, 16, 7, 7}},\r
- {m68k_op_cmp_32_di , 0xf1f8, 0xb0a8, { 18, 18, 7, 7}},\r
- {m68k_op_cmp_32_ix , 0xf1f8, 0xb0b0, { 20, 20, 9, 9}},\r
- {m68k_op_cmpa_16_d , 0xf1f8, 0xb0c0, { 6, 6, 4, 4}},\r
- {m68k_op_cmpa_16_a , 0xf1f8, 0xb0c8, { 6, 6, 4, 4}},\r
- {m68k_op_cmpa_16_ai , 0xf1f8, 0xb0d0, { 10, 10, 8, 8}},\r
- {m68k_op_cmpa_16_pi , 0xf1f8, 0xb0d8, { 10, 10, 8, 8}},\r
- {m68k_op_cmpa_16_pd , 0xf1f8, 0xb0e0, { 12, 12, 9, 9}},\r
- {m68k_op_cmpa_16_di , 0xf1f8, 0xb0e8, { 14, 14, 9, 9}},\r
- {m68k_op_cmpa_16_ix , 0xf1f8, 0xb0f0, { 16, 16, 11, 11}},\r
- {m68k_op_eor_8_d , 0xf1f8, 0xb100, { 4, 4, 2, 2}},\r
- {m68k_op_cmpm_8 , 0xf1f8, 0xb108, { 12, 12, 9, 9}},\r
- {m68k_op_eor_8_ai , 0xf1f8, 0xb110, { 12, 12, 8, 8}},\r
- {m68k_op_eor_8_pi , 0xf1f8, 0xb118, { 12, 12, 8, 8}},\r
- {m68k_op_eor_8_pd , 0xf1f8, 0xb120, { 14, 14, 9, 9}},\r
- {m68k_op_eor_8_di , 0xf1f8, 0xb128, { 16, 16, 9, 9}},\r
- {m68k_op_eor_8_ix , 0xf1f8, 0xb130, { 18, 18, 11, 11}},\r
- {m68k_op_eor_16_d , 0xf1f8, 0xb140, { 4, 4, 2, 2}},\r
- {m68k_op_cmpm_16 , 0xf1f8, 0xb148, { 12, 12, 9, 9}},\r
- {m68k_op_eor_16_ai , 0xf1f8, 0xb150, { 12, 12, 8, 8}},\r
- {m68k_op_eor_16_pi , 0xf1f8, 0xb158, { 12, 12, 8, 8}},\r
- {m68k_op_eor_16_pd , 0xf1f8, 0xb160, { 14, 14, 9, 9}},\r
- {m68k_op_eor_16_di , 0xf1f8, 0xb168, { 16, 16, 9, 9}},\r
- {m68k_op_eor_16_ix , 0xf1f8, 0xb170, { 18, 18, 11, 11}},\r
- {m68k_op_eor_32_d , 0xf1f8, 0xb180, { 8, 6, 2, 2}},\r
- {m68k_op_cmpm_32 , 0xf1f8, 0xb188, { 20, 20, 9, 9}},\r
- {m68k_op_eor_32_ai , 0xf1f8, 0xb190, { 20, 20, 8, 8}},\r
- {m68k_op_eor_32_pi , 0xf1f8, 0xb198, { 20, 20, 8, 8}},\r
- {m68k_op_eor_32_pd , 0xf1f8, 0xb1a0, { 22, 22, 9, 9}},\r
- {m68k_op_eor_32_di , 0xf1f8, 0xb1a8, { 24, 24, 9, 9}},\r
- {m68k_op_eor_32_ix , 0xf1f8, 0xb1b0, { 26, 26, 11, 11}},\r
- {m68k_op_cmpa_32_d , 0xf1f8, 0xb1c0, { 6, 6, 4, 4}},\r
- {m68k_op_cmpa_32_a , 0xf1f8, 0xb1c8, { 6, 6, 4, 4}},\r
- {m68k_op_cmpa_32_ai , 0xf1f8, 0xb1d0, { 14, 14, 8, 8}},\r
- {m68k_op_cmpa_32_pi , 0xf1f8, 0xb1d8, { 14, 14, 8, 8}},\r
- {m68k_op_cmpa_32_pd , 0xf1f8, 0xb1e0, { 16, 16, 9, 9}},\r
- {m68k_op_cmpa_32_di , 0xf1f8, 0xb1e8, { 18, 18, 9, 9}},\r
- {m68k_op_cmpa_32_ix , 0xf1f8, 0xb1f0, { 20, 20, 11, 11}},\r
- {m68k_op_and_8_er_d , 0xf1f8, 0xc000, { 4, 4, 2, 2}},\r
- {m68k_op_and_8_er_ai , 0xf1f8, 0xc010, { 8, 8, 6, 6}},\r
- {m68k_op_and_8_er_pi , 0xf1f8, 0xc018, { 8, 8, 6, 6}},\r
- {m68k_op_and_8_er_pd , 0xf1f8, 0xc020, { 10, 10, 7, 7}},\r
- {m68k_op_and_8_er_di , 0xf1f8, 0xc028, { 12, 12, 7, 7}},\r
- {m68k_op_and_8_er_ix , 0xf1f8, 0xc030, { 14, 14, 9, 9}},\r
- {m68k_op_and_16_er_d , 0xf1f8, 0xc040, { 4, 4, 2, 2}},\r
- {m68k_op_and_16_er_ai , 0xf1f8, 0xc050, { 8, 8, 6, 6}},\r
- {m68k_op_and_16_er_pi , 0xf1f8, 0xc058, { 8, 8, 6, 6}},\r
- {m68k_op_and_16_er_pd , 0xf1f8, 0xc060, { 10, 10, 7, 7}},\r
- {m68k_op_and_16_er_di , 0xf1f8, 0xc068, { 12, 12, 7, 7}},\r
- {m68k_op_and_16_er_ix , 0xf1f8, 0xc070, { 14, 14, 9, 9}},\r
- {m68k_op_and_32_er_d , 0xf1f8, 0xc080, { 8, 6, 2, 2}},\r
- {m68k_op_and_32_er_ai , 0xf1f8, 0xc090, { 14, 14, 6, 6}},\r
- {m68k_op_and_32_er_pi , 0xf1f8, 0xc098, { 14, 14, 6, 6}},\r
- {m68k_op_and_32_er_pd , 0xf1f8, 0xc0a0, { 16, 16, 7, 7}},\r
- {m68k_op_and_32_er_di , 0xf1f8, 0xc0a8, { 18, 18, 7, 7}},\r
- {m68k_op_and_32_er_ix , 0xf1f8, 0xc0b0, { 20, 20, 9, 9}},\r
- {m68k_op_mulu_16_d , 0xf1f8, 0xc0c0, { 54, 30, 27, 27}},\r
- {m68k_op_mulu_16_ai , 0xf1f8, 0xc0d0, { 58, 34, 31, 31}},\r
- {m68k_op_mulu_16_pi , 0xf1f8, 0xc0d8, { 58, 34, 31, 31}},\r
- {m68k_op_mulu_16_pd , 0xf1f8, 0xc0e0, { 60, 36, 32, 32}},\r
- {m68k_op_mulu_16_di , 0xf1f8, 0xc0e8, { 62, 38, 32, 32}},\r
- {m68k_op_mulu_16_ix , 0xf1f8, 0xc0f0, { 64, 40, 34, 34}},\r
- {m68k_op_abcd_8_rr , 0xf1f8, 0xc100, { 6, 6, 4, 4}},\r
- {m68k_op_abcd_8_mm , 0xf1f8, 0xc108, { 18, 18, 16, 16}},\r
- {m68k_op_and_8_re_ai , 0xf1f8, 0xc110, { 12, 12, 8, 8}},\r
- {m68k_op_and_8_re_pi , 0xf1f8, 0xc118, { 12, 12, 8, 8}},\r
- {m68k_op_and_8_re_pd , 0xf1f8, 0xc120, { 14, 14, 9, 9}},\r
- {m68k_op_and_8_re_di , 0xf1f8, 0xc128, { 16, 16, 9, 9}},\r
- {m68k_op_and_8_re_ix , 0xf1f8, 0xc130, { 18, 18, 11, 11}},\r
- {m68k_op_exg_32_dd , 0xf1f8, 0xc140, { 6, 6, 2, 2}},\r
- {m68k_op_exg_32_aa , 0xf1f8, 0xc148, { 6, 6, 2, 2}},\r
- {m68k_op_and_16_re_ai , 0xf1f8, 0xc150, { 12, 12, 8, 8}},\r
- {m68k_op_and_16_re_pi , 0xf1f8, 0xc158, { 12, 12, 8, 8}},\r
- {m68k_op_and_16_re_pd , 0xf1f8, 0xc160, { 14, 14, 9, 9}},\r
- {m68k_op_and_16_re_di , 0xf1f8, 0xc168, { 16, 16, 9, 9}},\r
- {m68k_op_and_16_re_ix , 0xf1f8, 0xc170, { 18, 18, 11, 11}},\r
- {m68k_op_exg_32_da , 0xf1f8, 0xc188, { 6, 6, 2, 2}},\r
- {m68k_op_and_32_re_ai , 0xf1f8, 0xc190, { 20, 20, 8, 8}},\r
- {m68k_op_and_32_re_pi , 0xf1f8, 0xc198, { 20, 20, 8, 8}},\r
- {m68k_op_and_32_re_pd , 0xf1f8, 0xc1a0, { 22, 22, 9, 9}},\r
- {m68k_op_and_32_re_di , 0xf1f8, 0xc1a8, { 24, 24, 9, 9}},\r
- {m68k_op_and_32_re_ix , 0xf1f8, 0xc1b0, { 26, 26, 11, 11}},\r
- {m68k_op_muls_16_d , 0xf1f8, 0xc1c0, { 54, 32, 27, 27}},\r
- {m68k_op_muls_16_ai , 0xf1f8, 0xc1d0, { 58, 36, 31, 31}},\r
- {m68k_op_muls_16_pi , 0xf1f8, 0xc1d8, { 58, 36, 31, 31}},\r
- {m68k_op_muls_16_pd , 0xf1f8, 0xc1e0, { 60, 38, 32, 32}},\r
- {m68k_op_muls_16_di , 0xf1f8, 0xc1e8, { 62, 40, 32, 32}},\r
- {m68k_op_muls_16_ix , 0xf1f8, 0xc1f0, { 64, 42, 34, 34}},\r
- {m68k_op_add_8_er_d , 0xf1f8, 0xd000, { 4, 4, 2, 2}},\r
- {m68k_op_add_8_er_ai , 0xf1f8, 0xd010, { 8, 8, 6, 6}},\r
- {m68k_op_add_8_er_pi , 0xf1f8, 0xd018, { 8, 8, 6, 6}},\r
- {m68k_op_add_8_er_pd , 0xf1f8, 0xd020, { 10, 10, 7, 7}},\r
- {m68k_op_add_8_er_di , 0xf1f8, 0xd028, { 12, 12, 7, 7}},\r
- {m68k_op_add_8_er_ix , 0xf1f8, 0xd030, { 14, 14, 9, 9}},\r
- {m68k_op_add_16_er_d , 0xf1f8, 0xd040, { 4, 4, 2, 2}},\r
- {m68k_op_add_16_er_a , 0xf1f8, 0xd048, { 4, 4, 2, 2}},\r
- {m68k_op_add_16_er_ai , 0xf1f8, 0xd050, { 8, 8, 6, 6}},\r
- {m68k_op_add_16_er_pi , 0xf1f8, 0xd058, { 8, 8, 6, 6}},\r
- {m68k_op_add_16_er_pd , 0xf1f8, 0xd060, { 10, 10, 7, 7}},\r
- {m68k_op_add_16_er_di , 0xf1f8, 0xd068, { 12, 12, 7, 7}},\r
- {m68k_op_add_16_er_ix , 0xf1f8, 0xd070, { 14, 14, 9, 9}},\r
- {m68k_op_add_32_er_d , 0xf1f8, 0xd080, { 8, 6, 2, 2}},\r
- {m68k_op_add_32_er_a , 0xf1f8, 0xd088, { 8, 6, 2, 2}},\r
- {m68k_op_add_32_er_ai , 0xf1f8, 0xd090, { 14, 14, 6, 6}},\r
- {m68k_op_add_32_er_pi , 0xf1f8, 0xd098, { 14, 14, 6, 6}},\r
- {m68k_op_add_32_er_pd , 0xf1f8, 0xd0a0, { 16, 16, 7, 7}},\r
- {m68k_op_add_32_er_di , 0xf1f8, 0xd0a8, { 18, 18, 7, 7}},\r
- {m68k_op_add_32_er_ix , 0xf1f8, 0xd0b0, { 20, 20, 9, 9}},\r
- {m68k_op_adda_16_d , 0xf1f8, 0xd0c0, { 8, 8, 2, 2}},\r
- {m68k_op_adda_16_a , 0xf1f8, 0xd0c8, { 8, 8, 2, 2}},\r
- {m68k_op_adda_16_ai , 0xf1f8, 0xd0d0, { 12, 12, 6, 6}},\r
- {m68k_op_adda_16_pi , 0xf1f8, 0xd0d8, { 12, 12, 6, 6}},\r
- {m68k_op_adda_16_pd , 0xf1f8, 0xd0e0, { 14, 14, 7, 7}},\r
- {m68k_op_adda_16_di , 0xf1f8, 0xd0e8, { 16, 16, 7, 7}},\r
- {m68k_op_adda_16_ix , 0xf1f8, 0xd0f0, { 18, 18, 9, 9}},\r
- {m68k_op_addx_8_rr , 0xf1f8, 0xd100, { 4, 4, 2, 2}},\r
- {m68k_op_addx_8_mm , 0xf1f8, 0xd108, { 18, 18, 12, 12}},\r
- {m68k_op_add_8_re_ai , 0xf1f8, 0xd110, { 12, 12, 8, 8}},\r
- {m68k_op_add_8_re_pi , 0xf1f8, 0xd118, { 12, 12, 8, 8}},\r
- {m68k_op_add_8_re_pd , 0xf1f8, 0xd120, { 14, 14, 9, 9}},\r
- {m68k_op_add_8_re_di , 0xf1f8, 0xd128, { 16, 16, 9, 9}},\r
- {m68k_op_add_8_re_ix , 0xf1f8, 0xd130, { 18, 18, 11, 11}},\r
- {m68k_op_addx_16_rr , 0xf1f8, 0xd140, { 4, 4, 2, 2}},\r
- {m68k_op_addx_16_mm , 0xf1f8, 0xd148, { 18, 18, 12, 12}},\r
- {m68k_op_add_16_re_ai , 0xf1f8, 0xd150, { 12, 12, 8, 8}},\r
- {m68k_op_add_16_re_pi , 0xf1f8, 0xd158, { 12, 12, 8, 8}},\r
- {m68k_op_add_16_re_pd , 0xf1f8, 0xd160, { 14, 14, 9, 9}},\r
- {m68k_op_add_16_re_di , 0xf1f8, 0xd168, { 16, 16, 9, 9}},\r
- {m68k_op_add_16_re_ix , 0xf1f8, 0xd170, { 18, 18, 11, 11}},\r
- {m68k_op_addx_32_rr , 0xf1f8, 0xd180, { 8, 6, 2, 2}},\r
- {m68k_op_addx_32_mm , 0xf1f8, 0xd188, { 30, 30, 12, 12}},\r
- {m68k_op_add_32_re_ai , 0xf1f8, 0xd190, { 20, 20, 8, 8}},\r
- {m68k_op_add_32_re_pi , 0xf1f8, 0xd198, { 20, 20, 8, 8}},\r
- {m68k_op_add_32_re_pd , 0xf1f8, 0xd1a0, { 22, 22, 9, 9}},\r
- {m68k_op_add_32_re_di , 0xf1f8, 0xd1a8, { 24, 24, 9, 9}},\r
- {m68k_op_add_32_re_ix , 0xf1f8, 0xd1b0, { 26, 26, 11, 11}},\r
- {m68k_op_adda_32_d , 0xf1f8, 0xd1c0, { 8, 6, 2, 2}},\r
- {m68k_op_adda_32_a , 0xf1f8, 0xd1c8, { 8, 6, 2, 2}},\r
- {m68k_op_adda_32_ai , 0xf1f8, 0xd1d0, { 14, 14, 6, 6}},\r
- {m68k_op_adda_32_pi , 0xf1f8, 0xd1d8, { 14, 14, 6, 6}},\r
- {m68k_op_adda_32_pd , 0xf1f8, 0xd1e0, { 16, 16, 7, 7}},\r
- {m68k_op_adda_32_di , 0xf1f8, 0xd1e8, { 18, 18, 7, 7}},\r
- {m68k_op_adda_32_ix , 0xf1f8, 0xd1f0, { 20, 20, 9, 9}},\r
- {m68k_op_asr_8_s , 0xf1f8, 0xe000, { 6, 6, 6, 6}},\r
- {m68k_op_lsr_8_s , 0xf1f8, 0xe008, { 6, 6, 4, 4}},\r
- {m68k_op_roxr_8_s , 0xf1f8, 0xe010, { 6, 6, 12, 12}},\r
- {m68k_op_ror_8_s , 0xf1f8, 0xe018, { 6, 6, 8, 8}},\r
- {m68k_op_asr_8_r , 0xf1f8, 0xe020, { 6, 6, 6, 6}},\r
- {m68k_op_lsr_8_r , 0xf1f8, 0xe028, { 6, 6, 6, 6}},\r
- {m68k_op_roxr_8_r , 0xf1f8, 0xe030, { 6, 6, 12, 12}},\r
- {m68k_op_ror_8_r , 0xf1f8, 0xe038, { 6, 6, 8, 8}},\r
- {m68k_op_asr_16_s , 0xf1f8, 0xe040, { 6, 6, 6, 6}},\r
- {m68k_op_lsr_16_s , 0xf1f8, 0xe048, { 6, 6, 4, 4}},\r
- {m68k_op_roxr_16_s , 0xf1f8, 0xe050, { 6, 6, 12, 12}},\r
- {m68k_op_ror_16_s , 0xf1f8, 0xe058, { 6, 6, 8, 8}},\r
- {m68k_op_asr_16_r , 0xf1f8, 0xe060, { 6, 6, 6, 6}},\r
- {m68k_op_lsr_16_r , 0xf1f8, 0xe068, { 6, 6, 6, 6}},\r
- {m68k_op_roxr_16_r , 0xf1f8, 0xe070, { 6, 6, 12, 12}},\r
- {m68k_op_ror_16_r , 0xf1f8, 0xe078, { 6, 6, 8, 8}},\r
- {m68k_op_asr_32_s , 0xf1f8, 0xe080, { 8, 8, 6, 6}},\r
- {m68k_op_lsr_32_s , 0xf1f8, 0xe088, { 8, 8, 4, 4}},\r
- {m68k_op_roxr_32_s , 0xf1f8, 0xe090, { 8, 8, 12, 12}},\r
- {m68k_op_ror_32_s , 0xf1f8, 0xe098, { 8, 8, 8, 8}},\r
- {m68k_op_asr_32_r , 0xf1f8, 0xe0a0, { 8, 8, 6, 6}},\r
- {m68k_op_lsr_32_r , 0xf1f8, 0xe0a8, { 8, 8, 6, 6}},\r
- {m68k_op_roxr_32_r , 0xf1f8, 0xe0b0, { 8, 8, 12, 12}},\r
- {m68k_op_ror_32_r , 0xf1f8, 0xe0b8, { 8, 8, 8, 8}},\r
- {m68k_op_asl_8_s , 0xf1f8, 0xe100, { 6, 6, 8, 8}},\r
- {m68k_op_lsl_8_s , 0xf1f8, 0xe108, { 6, 6, 4, 4}},\r
- {m68k_op_roxl_8_s , 0xf1f8, 0xe110, { 6, 6, 12, 12}},\r
- {m68k_op_rol_8_s , 0xf1f8, 0xe118, { 6, 6, 8, 8}},\r
- {m68k_op_asl_8_r , 0xf1f8, 0xe120, { 6, 6, 8, 8}},\r
- {m68k_op_lsl_8_r , 0xf1f8, 0xe128, { 6, 6, 6, 6}},\r
- {m68k_op_roxl_8_r , 0xf1f8, 0xe130, { 6, 6, 12, 12}},\r
- {m68k_op_rol_8_r , 0xf1f8, 0xe138, { 6, 6, 8, 8}},\r
- {m68k_op_asl_16_s , 0xf1f8, 0xe140, { 6, 6, 8, 8}},\r
- {m68k_op_lsl_16_s , 0xf1f8, 0xe148, { 6, 6, 4, 4}},\r
- {m68k_op_roxl_16_s , 0xf1f8, 0xe150, { 6, 6, 12, 12}},\r
- {m68k_op_rol_16_s , 0xf1f8, 0xe158, { 6, 6, 8, 8}},\r
- {m68k_op_asl_16_r , 0xf1f8, 0xe160, { 6, 6, 8, 8}},\r
- {m68k_op_lsl_16_r , 0xf1f8, 0xe168, { 6, 6, 6, 6}},\r
- {m68k_op_roxl_16_r , 0xf1f8, 0xe170, { 6, 6, 12, 12}},\r
- {m68k_op_rol_16_r , 0xf1f8, 0xe178, { 6, 6, 8, 8}},\r
- {m68k_op_asl_32_s , 0xf1f8, 0xe180, { 8, 8, 8, 8}},\r
- {m68k_op_lsl_32_s , 0xf1f8, 0xe188, { 8, 8, 4, 4}},\r
- {m68k_op_roxl_32_s , 0xf1f8, 0xe190, { 8, 8, 12, 12}},\r
- {m68k_op_rol_32_s , 0xf1f8, 0xe198, { 8, 8, 8, 8}},\r
- {m68k_op_asl_32_r , 0xf1f8, 0xe1a0, { 8, 8, 8, 8}},\r
- {m68k_op_lsl_32_r , 0xf1f8, 0xe1a8, { 8, 8, 6, 6}},\r
- {m68k_op_roxl_32_r , 0xf1f8, 0xe1b0, { 8, 8, 12, 12}},\r
- {m68k_op_rol_32_r , 0xf1f8, 0xe1b8, { 8, 8, 8, 8}},\r
- {m68k_op_cpdbcc_32 , 0xf1f8, 0xf048, { 0, 0, 4, 0}},\r
- {m68k_op_cptrapcc_32 , 0xf1f8, 0xf078, { 0, 0, 4, 0}},\r
- {m68k_op_rtm_32 , 0xfff0, 0x06c0, { 0, 0, 19, 19}},\r
- {m68k_op_trap , 0xfff0, 0x4e40, { 4, 4, 4, 4}},\r
- {m68k_op_btst_8_r_pi7 , 0xf1ff, 0x011f, { 8, 8, 8, 8}},\r
- {m68k_op_btst_8_r_pd7 , 0xf1ff, 0x0127, { 10, 10, 9, 9}},\r
- {m68k_op_btst_8_r_aw , 0xf1ff, 0x0138, { 12, 12, 8, 8}},\r
- {m68k_op_btst_8_r_al , 0xf1ff, 0x0139, { 16, 16, 8, 8}},\r
- {m68k_op_btst_8_r_pcdi , 0xf1ff, 0x013a, { 12, 12, 9, 9}},\r
- {m68k_op_btst_8_r_pcix , 0xf1ff, 0x013b, { 14, 14, 11, 11}},\r
- {m68k_op_btst_8_r_i , 0xf1ff, 0x013c, { 8, 8, 6, 6}},\r
- {m68k_op_bchg_8_r_pi7 , 0xf1ff, 0x015f, { 12, 12, 8, 8}},\r
- {m68k_op_bchg_8_r_pd7 , 0xf1ff, 0x0167, { 14, 14, 9, 9}},\r
- {m68k_op_bchg_8_r_aw , 0xf1ff, 0x0178, { 16, 16, 8, 8}},\r
- {m68k_op_bchg_8_r_al , 0xf1ff, 0x0179, { 20, 20, 8, 8}},\r
- {m68k_op_bclr_8_r_pi7 , 0xf1ff, 0x019f, { 12, 14, 8, 8}},\r
- {m68k_op_bclr_8_r_pd7 , 0xf1ff, 0x01a7, { 14, 16, 9, 9}},\r
- {m68k_op_bclr_8_r_aw , 0xf1ff, 0x01b8, { 16, 18, 8, 8}},\r
- {m68k_op_bclr_8_r_al , 0xf1ff, 0x01b9, { 20, 22, 8, 8}},\r
- {m68k_op_bset_8_r_pi7 , 0xf1ff, 0x01df, { 12, 12, 8, 8}},\r
- {m68k_op_bset_8_r_pd7 , 0xf1ff, 0x01e7, { 14, 14, 9, 9}},\r
- {m68k_op_bset_8_r_aw , 0xf1ff, 0x01f8, { 16, 16, 8, 8}},\r
- {m68k_op_bset_8_r_al , 0xf1ff, 0x01f9, { 20, 20, 8, 8}},\r
- {m68k_op_move_8_d_pi7 , 0xf1ff, 0x101f, { 8, 8, 6, 6}},\r
- {m68k_op_move_8_d_pd7 , 0xf1ff, 0x1027, { 10, 10, 7, 7}},\r
- {m68k_op_move_8_d_aw , 0xf1ff, 0x1038, { 12, 12, 6, 6}},\r
- {m68k_op_move_8_d_al , 0xf1ff, 0x1039, { 16, 16, 6, 6}},\r
- {m68k_op_move_8_d_pcdi , 0xf1ff, 0x103a, { 12, 12, 7, 7}},\r
- {m68k_op_move_8_d_pcix , 0xf1ff, 0x103b, { 14, 14, 9, 9}},\r
- {m68k_op_move_8_d_i , 0xf1ff, 0x103c, { 8, 8, 4, 4}},\r
- {m68k_op_move_8_ai_pi7 , 0xf1ff, 0x109f, { 12, 12, 8, 8}},\r
- {m68k_op_move_8_ai_pd7 , 0xf1ff, 0x10a7, { 14, 14, 9, 9}},\r
- {m68k_op_move_8_ai_aw , 0xf1ff, 0x10b8, { 16, 16, 8, 8}},\r
- {m68k_op_move_8_ai_al , 0xf1ff, 0x10b9, { 20, 20, 8, 8}},\r
- {m68k_op_move_8_ai_pcdi , 0xf1ff, 0x10ba, { 16, 16, 9, 9}},\r
- {m68k_op_move_8_ai_pcix , 0xf1ff, 0x10bb, { 18, 18, 11, 11}},\r
- {m68k_op_move_8_ai_i , 0xf1ff, 0x10bc, { 12, 12, 6, 6}},\r
- {m68k_op_move_8_pi_pi7 , 0xf1ff, 0x10df, { 12, 12, 8, 8}},\r
- {m68k_op_move_8_pi_pd7 , 0xf1ff, 0x10e7, { 14, 14, 9, 9}},\r
- {m68k_op_move_8_pi_aw , 0xf1ff, 0x10f8, { 16, 16, 8, 8}},\r
- {m68k_op_move_8_pi_al , 0xf1ff, 0x10f9, { 20, 20, 8, 8}},\r
- {m68k_op_move_8_pi_pcdi , 0xf1ff, 0x10fa, { 16, 16, 9, 9}},\r
- {m68k_op_move_8_pi_pcix , 0xf1ff, 0x10fb, { 18, 18, 11, 11}},\r
- {m68k_op_move_8_pi_i , 0xf1ff, 0x10fc, { 12, 12, 6, 6}},\r
- {m68k_op_move_8_pd_pi7 , 0xf1ff, 0x111f, { 12, 12, 9, 9}},\r
- {m68k_op_move_8_pd_pd7 , 0xf1ff, 0x1127, { 14, 14, 10, 10}},\r
- {m68k_op_move_8_pd_aw , 0xf1ff, 0x1138, { 16, 16, 9, 9}},\r
- {m68k_op_move_8_pd_al , 0xf1ff, 0x1139, { 20, 20, 9, 9}},\r
- {m68k_op_move_8_pd_pcdi , 0xf1ff, 0x113a, { 16, 16, 10, 10}},\r
- {m68k_op_move_8_pd_pcix , 0xf1ff, 0x113b, { 18, 18, 12, 12}},\r
- {m68k_op_move_8_pd_i , 0xf1ff, 0x113c, { 12, 12, 7, 7}},\r
- {m68k_op_move_8_di_pi7 , 0xf1ff, 0x115f, { 16, 16, 9, 9}},\r
- {m68k_op_move_8_di_pd7 , 0xf1ff, 0x1167, { 18, 18, 10, 10}},\r
- {m68k_op_move_8_di_aw , 0xf1ff, 0x1178, { 20, 20, 9, 9}},\r
- {m68k_op_move_8_di_al , 0xf1ff, 0x1179, { 24, 24, 9, 9}},\r
- {m68k_op_move_8_di_pcdi , 0xf1ff, 0x117a, { 20, 20, 10, 10}},\r
- {m68k_op_move_8_di_pcix , 0xf1ff, 0x117b, { 22, 22, 12, 12}},\r
- {m68k_op_move_8_di_i , 0xf1ff, 0x117c, { 16, 16, 7, 7}},\r
- {m68k_op_move_8_ix_pi7 , 0xf1ff, 0x119f, { 18, 18, 11, 11}},\r
- {m68k_op_move_8_ix_pd7 , 0xf1ff, 0x11a7, { 20, 20, 12, 12}},\r
- {m68k_op_move_8_ix_aw , 0xf1ff, 0x11b8, { 22, 22, 11, 11}},\r
- {m68k_op_move_8_ix_al , 0xf1ff, 0x11b9, { 26, 26, 11, 11}},\r
- {m68k_op_move_8_ix_pcdi , 0xf1ff, 0x11ba, { 22, 22, 12, 12}},\r
- {m68k_op_move_8_ix_pcix , 0xf1ff, 0x11bb, { 24, 24, 14, 14}},\r
- {m68k_op_move_8_ix_i , 0xf1ff, 0x11bc, { 18, 18, 9, 9}},\r
- {m68k_op_move_32_d_aw , 0xf1ff, 0x2038, { 16, 16, 6, 6}},\r
- {m68k_op_move_32_d_al , 0xf1ff, 0x2039, { 20, 20, 6, 6}},\r
- {m68k_op_move_32_d_pcdi , 0xf1ff, 0x203a, { 16, 16, 7, 7}},\r
- {m68k_op_move_32_d_pcix , 0xf1ff, 0x203b, { 18, 18, 9, 9}},\r
- {m68k_op_move_32_d_i , 0xf1ff, 0x203c, { 12, 12, 6, 6}},\r
- {m68k_op_movea_32_aw , 0xf1ff, 0x2078, { 16, 16, 6, 6}},\r
- {m68k_op_movea_32_al , 0xf1ff, 0x2079, { 20, 20, 6, 6}},\r
- {m68k_op_movea_32_pcdi , 0xf1ff, 0x207a, { 16, 16, 7, 7}},\r
- {m68k_op_movea_32_pcix , 0xf1ff, 0x207b, { 18, 18, 9, 9}},\r
- {m68k_op_movea_32_i , 0xf1ff, 0x207c, { 12, 12, 6, 6}},\r
- {m68k_op_move_32_ai_aw , 0xf1ff, 0x20b8, { 24, 24, 8, 8}},\r
- {m68k_op_move_32_ai_al , 0xf1ff, 0x20b9, { 28, 28, 8, 8}},\r
- {m68k_op_move_32_ai_pcdi , 0xf1ff, 0x20ba, { 24, 24, 9, 9}},\r
- {m68k_op_move_32_ai_pcix , 0xf1ff, 0x20bb, { 26, 26, 11, 11}},\r
- {m68k_op_move_32_ai_i , 0xf1ff, 0x20bc, { 20, 20, 8, 8}},\r
- {m68k_op_move_32_pi_aw , 0xf1ff, 0x20f8, { 24, 24, 8, 8}},\r
- {m68k_op_move_32_pi_al , 0xf1ff, 0x20f9, { 28, 28, 8, 8}},\r
- {m68k_op_move_32_pi_pcdi , 0xf1ff, 0x20fa, { 24, 24, 9, 9}},\r
- {m68k_op_move_32_pi_pcix , 0xf1ff, 0x20fb, { 26, 26, 11, 11}},\r
- {m68k_op_move_32_pi_i , 0xf1ff, 0x20fc, { 20, 20, 8, 8}},\r
- {m68k_op_move_32_pd_aw , 0xf1ff, 0x2138, { 24, 26, 9, 9}},\r
- {m68k_op_move_32_pd_al , 0xf1ff, 0x2139, { 28, 30, 9, 9}},\r
- {m68k_op_move_32_pd_pcdi , 0xf1ff, 0x213a, { 24, 26, 10, 10}},\r
- {m68k_op_move_32_pd_pcix , 0xf1ff, 0x213b, { 26, 28, 12, 12}},\r
- {m68k_op_move_32_pd_i , 0xf1ff, 0x213c, { 20, 22, 9, 9}},\r
- {m68k_op_move_32_di_aw , 0xf1ff, 0x2178, { 28, 28, 9, 9}},\r
- {m68k_op_move_32_di_al , 0xf1ff, 0x2179, { 32, 32, 9, 9}},\r
- {m68k_op_move_32_di_pcdi , 0xf1ff, 0x217a, { 28, 28, 10, 10}},\r
- {m68k_op_move_32_di_pcix , 0xf1ff, 0x217b, { 30, 30, 12, 12}},\r
- {m68k_op_move_32_di_i , 0xf1ff, 0x217c, { 24, 24, 9, 9}},\r
- {m68k_op_move_32_ix_aw , 0xf1ff, 0x21b8, { 30, 30, 11, 11}},\r
- {m68k_op_move_32_ix_al , 0xf1ff, 0x21b9, { 34, 34, 11, 11}},\r
- {m68k_op_move_32_ix_pcdi , 0xf1ff, 0x21ba, { 30, 30, 12, 12}},\r
- {m68k_op_move_32_ix_pcix , 0xf1ff, 0x21bb, { 32, 32, 14, 14}},\r
- {m68k_op_move_32_ix_i , 0xf1ff, 0x21bc, { 26, 26, 11, 11}},\r
- {m68k_op_move_16_d_aw , 0xf1ff, 0x3038, { 12, 12, 6, 6}},\r
- {m68k_op_move_16_d_al , 0xf1ff, 0x3039, { 16, 16, 6, 6}},\r
- {m68k_op_move_16_d_pcdi , 0xf1ff, 0x303a, { 12, 12, 7, 7}},\r
- {m68k_op_move_16_d_pcix , 0xf1ff, 0x303b, { 14, 14, 9, 9}},\r
- {m68k_op_move_16_d_i , 0xf1ff, 0x303c, { 8, 8, 4, 4}},\r
- {m68k_op_movea_16_aw , 0xf1ff, 0x3078, { 12, 12, 6, 6}},\r
- {m68k_op_movea_16_al , 0xf1ff, 0x3079, { 16, 16, 6, 6}},\r
- {m68k_op_movea_16_pcdi , 0xf1ff, 0x307a, { 12, 12, 7, 7}},\r
- {m68k_op_movea_16_pcix , 0xf1ff, 0x307b, { 14, 14, 9, 9}},\r
- {m68k_op_movea_16_i , 0xf1ff, 0x307c, { 8, 8, 4, 4}},\r
- {m68k_op_move_16_ai_aw , 0xf1ff, 0x30b8, { 16, 16, 8, 8}},\r
- {m68k_op_move_16_ai_al , 0xf1ff, 0x30b9, { 20, 20, 8, 8}},\r
- {m68k_op_move_16_ai_pcdi , 0xf1ff, 0x30ba, { 16, 16, 9, 9}},\r
- {m68k_op_move_16_ai_pcix , 0xf1ff, 0x30bb, { 18, 18, 11, 11}},\r
- {m68k_op_move_16_ai_i , 0xf1ff, 0x30bc, { 12, 12, 6, 6}},\r
- {m68k_op_move_16_pi_aw , 0xf1ff, 0x30f8, { 16, 16, 8, 8}},\r
- {m68k_op_move_16_pi_al , 0xf1ff, 0x30f9, { 20, 20, 8, 8}},\r
- {m68k_op_move_16_pi_pcdi , 0xf1ff, 0x30fa, { 16, 16, 9, 9}},\r
- {m68k_op_move_16_pi_pcix , 0xf1ff, 0x30fb, { 18, 18, 11, 11}},\r
- {m68k_op_move_16_pi_i , 0xf1ff, 0x30fc, { 12, 12, 6, 6}},\r
- {m68k_op_move_16_pd_aw , 0xf1ff, 0x3138, { 16, 16, 9, 9}},\r
- {m68k_op_move_16_pd_al , 0xf1ff, 0x3139, { 20, 20, 9, 9}},\r
- {m68k_op_move_16_pd_pcdi , 0xf1ff, 0x313a, { 16, 16, 10, 10}},\r
- {m68k_op_move_16_pd_pcix , 0xf1ff, 0x313b, { 18, 18, 12, 12}},\r
- {m68k_op_move_16_pd_i , 0xf1ff, 0x313c, { 12, 12, 7, 7}},\r
- {m68k_op_move_16_di_aw , 0xf1ff, 0x3178, { 20, 20, 9, 9}},\r
- {m68k_op_move_16_di_al , 0xf1ff, 0x3179, { 24, 24, 9, 9}},\r
- {m68k_op_move_16_di_pcdi , 0xf1ff, 0x317a, { 20, 20, 10, 10}},\r
- {m68k_op_move_16_di_pcix , 0xf1ff, 0x317b, { 22, 22, 12, 12}},\r
- {m68k_op_move_16_di_i , 0xf1ff, 0x317c, { 16, 16, 7, 7}},\r
- {m68k_op_move_16_ix_aw , 0xf1ff, 0x31b8, { 22, 22, 11, 11}},\r
- {m68k_op_move_16_ix_al , 0xf1ff, 0x31b9, { 26, 26, 11, 11}},\r
- {m68k_op_move_16_ix_pcdi , 0xf1ff, 0x31ba, { 22, 22, 12, 12}},\r
- {m68k_op_move_16_ix_pcix , 0xf1ff, 0x31bb, { 24, 24, 14, 14}},\r
- {m68k_op_move_16_ix_i , 0xf1ff, 0x31bc, { 18, 18, 9, 9}},\r
- {m68k_op_chk_32_aw , 0xf1ff, 0x4138, { 0, 0, 12, 12}},\r
- {m68k_op_chk_32_al , 0xf1ff, 0x4139, { 0, 0, 12, 12}},\r
- {m68k_op_chk_32_pcdi , 0xf1ff, 0x413a, { 0, 0, 13, 13}},\r
- {m68k_op_chk_32_pcix , 0xf1ff, 0x413b, { 0, 0, 15, 15}},\r
- {m68k_op_chk_32_i , 0xf1ff, 0x413c, { 0, 0, 12, 12}},\r
- {m68k_op_chk_16_aw , 0xf1ff, 0x41b8, { 18, 16, 12, 12}},\r
- {m68k_op_chk_16_al , 0xf1ff, 0x41b9, { 22, 20, 12, 12}},\r
- {m68k_op_chk_16_pcdi , 0xf1ff, 0x41ba, { 18, 16, 13, 13}},\r
- {m68k_op_chk_16_pcix , 0xf1ff, 0x41bb, { 20, 18, 15, 15}},\r
- {m68k_op_chk_16_i , 0xf1ff, 0x41bc, { 14, 12, 10, 10}},\r
- {m68k_op_lea_32_aw , 0xf1ff, 0x41f8, { 8, 8, 6, 6}},\r
- {m68k_op_lea_32_al , 0xf1ff, 0x41f9, { 12, 12, 6, 6}},\r
- {m68k_op_lea_32_pcdi , 0xf1ff, 0x41fa, { 8, 8, 7, 7}},\r
- {m68k_op_lea_32_pcix , 0xf1ff, 0x41fb, { 12, 12, 9, 9}},\r
- {m68k_op_addq_8_pi7 , 0xf1ff, 0x501f, { 12, 12, 8, 8}},\r
- {m68k_op_addq_8_pd7 , 0xf1ff, 0x5027, { 14, 14, 9, 9}},\r
- {m68k_op_addq_8_aw , 0xf1ff, 0x5038, { 16, 16, 8, 8}},\r
- {m68k_op_addq_8_al , 0xf1ff, 0x5039, { 20, 20, 8, 8}},\r
- {m68k_op_addq_16_aw , 0xf1ff, 0x5078, { 16, 16, 8, 8}},\r
- {m68k_op_addq_16_al , 0xf1ff, 0x5079, { 20, 20, 8, 8}},\r
- {m68k_op_addq_32_aw , 0xf1ff, 0x50b8, { 24, 24, 8, 8}},\r
- {m68k_op_addq_32_al , 0xf1ff, 0x50b9, { 28, 28, 8, 8}},\r
- {m68k_op_subq_8_pi7 , 0xf1ff, 0x511f, { 12, 12, 8, 8}},\r
- {m68k_op_subq_8_pd7 , 0xf1ff, 0x5127, { 14, 14, 9, 9}},\r
- {m68k_op_subq_8_aw , 0xf1ff, 0x5138, { 16, 16, 8, 8}},\r
- {m68k_op_subq_8_al , 0xf1ff, 0x5139, { 20, 20, 8, 8}},\r
- {m68k_op_subq_16_aw , 0xf1ff, 0x5178, { 16, 16, 8, 8}},\r
- {m68k_op_subq_16_al , 0xf1ff, 0x5179, { 20, 20, 8, 8}},\r
- {m68k_op_subq_32_aw , 0xf1ff, 0x51b8, { 24, 24, 8, 8}},\r
- {m68k_op_subq_32_al , 0xf1ff, 0x51b9, { 28, 28, 8, 8}},\r
- {m68k_op_or_8_er_pi7 , 0xf1ff, 0x801f, { 8, 8, 6, 6}},\r
- {m68k_op_or_8_er_pd7 , 0xf1ff, 0x8027, { 10, 10, 7, 7}},\r
- {m68k_op_or_8_er_aw , 0xf1ff, 0x8038, { 12, 12, 6, 6}},\r
- {m68k_op_or_8_er_al , 0xf1ff, 0x8039, { 16, 16, 6, 6}},\r
- {m68k_op_or_8_er_pcdi , 0xf1ff, 0x803a, { 12, 12, 7, 7}},\r
- {m68k_op_or_8_er_pcix , 0xf1ff, 0x803b, { 14, 14, 9, 9}},\r
- {m68k_op_or_8_er_i , 0xf1ff, 0x803c, { 8, 8, 4, 4}},\r
- {m68k_op_or_16_er_aw , 0xf1ff, 0x8078, { 12, 12, 6, 6}},\r
- {m68k_op_or_16_er_al , 0xf1ff, 0x8079, { 16, 16, 6, 6}},\r
- {m68k_op_or_16_er_pcdi , 0xf1ff, 0x807a, { 12, 12, 7, 7}},\r
- {m68k_op_or_16_er_pcix , 0xf1ff, 0x807b, { 14, 14, 9, 9}},\r
- {m68k_op_or_16_er_i , 0xf1ff, 0x807c, { 8, 8, 4, 4}},\r
- {m68k_op_or_32_er_aw , 0xf1ff, 0x80b8, { 18, 18, 6, 6}},\r
- {m68k_op_or_32_er_al , 0xf1ff, 0x80b9, { 22, 22, 6, 6}},\r
- {m68k_op_or_32_er_pcdi , 0xf1ff, 0x80ba, { 18, 18, 7, 7}},\r
- {m68k_op_or_32_er_pcix , 0xf1ff, 0x80bb, { 20, 20, 9, 9}},\r
- {m68k_op_or_32_er_i , 0xf1ff, 0x80bc, { 16, 14, 6, 6}},\r
- {m68k_op_divu_16_aw , 0xf1ff, 0x80f8, {148, 116, 48, 48}},\r
- {m68k_op_divu_16_al , 0xf1ff, 0x80f9, {152, 120, 48, 48}},\r
- {m68k_op_divu_16_pcdi , 0xf1ff, 0x80fa, {148, 116, 49, 49}},\r
- {m68k_op_divu_16_pcix , 0xf1ff, 0x80fb, {150, 118, 51, 51}},\r
- {m68k_op_divu_16_i , 0xf1ff, 0x80fc, {144, 112, 46, 46}},\r
- {m68k_op_sbcd_8_mm_ay7 , 0xf1ff, 0x810f, { 18, 18, 16, 16}},\r
- {m68k_op_or_8_re_pi7 , 0xf1ff, 0x811f, { 12, 12, 8, 8}},\r
- {m68k_op_or_8_re_pd7 , 0xf1ff, 0x8127, { 14, 14, 9, 9}},\r
- {m68k_op_or_8_re_aw , 0xf1ff, 0x8138, { 16, 16, 8, 8}},\r
- {m68k_op_or_8_re_al , 0xf1ff, 0x8139, { 20, 20, 8, 8}},\r
- {m68k_op_pack_16_mm_ay7 , 0xf1ff, 0x814f, { 0, 0, 13, 13}},\r
- {m68k_op_or_16_re_aw , 0xf1ff, 0x8178, { 16, 16, 8, 8}},\r
- {m68k_op_or_16_re_al , 0xf1ff, 0x8179, { 20, 20, 8, 8}},\r
- {m68k_op_unpk_16_mm_ay7 , 0xf1ff, 0x818f, { 0, 0, 13, 13}},\r
- {m68k_op_or_32_re_aw , 0xf1ff, 0x81b8, { 24, 24, 8, 8}},\r
- {m68k_op_or_32_re_al , 0xf1ff, 0x81b9, { 28, 28, 8, 8}},\r
- {m68k_op_divs_16_aw , 0xf1ff, 0x81f8, {166, 130, 60, 60}},\r
- {m68k_op_divs_16_al , 0xf1ff, 0x81f9, {170, 134, 60, 60}},\r
- {m68k_op_divs_16_pcdi , 0xf1ff, 0x81fa, {166, 130, 61, 61}},\r
- {m68k_op_divs_16_pcix , 0xf1ff, 0x81fb, {168, 132, 63, 63}},\r
- {m68k_op_divs_16_i , 0xf1ff, 0x81fc, {162, 126, 58, 58}},\r
- {m68k_op_sub_8_er_pi7 , 0xf1ff, 0x901f, { 8, 8, 6, 6}},\r
- {m68k_op_sub_8_er_pd7 , 0xf1ff, 0x9027, { 10, 10, 7, 7}},\r
- {m68k_op_sub_8_er_aw , 0xf1ff, 0x9038, { 12, 12, 6, 6}},\r
- {m68k_op_sub_8_er_al , 0xf1ff, 0x9039, { 16, 16, 6, 6}},\r
- {m68k_op_sub_8_er_pcdi , 0xf1ff, 0x903a, { 12, 12, 7, 7}},\r
- {m68k_op_sub_8_er_pcix , 0xf1ff, 0x903b, { 14, 14, 9, 9}},\r
- {m68k_op_sub_8_er_i , 0xf1ff, 0x903c, { 8, 8, 4, 4}},\r
- {m68k_op_sub_16_er_aw , 0xf1ff, 0x9078, { 12, 12, 6, 6}},\r
- {m68k_op_sub_16_er_al , 0xf1ff, 0x9079, { 16, 16, 6, 6}},\r
- {m68k_op_sub_16_er_pcdi , 0xf1ff, 0x907a, { 12, 12, 7, 7}},\r
- {m68k_op_sub_16_er_pcix , 0xf1ff, 0x907b, { 14, 14, 9, 9}},\r
- {m68k_op_sub_16_er_i , 0xf1ff, 0x907c, { 8, 8, 4, 4}},\r
- {m68k_op_sub_32_er_aw , 0xf1ff, 0x90b8, { 18, 18, 6, 6}},\r
- {m68k_op_sub_32_er_al , 0xf1ff, 0x90b9, { 22, 22, 6, 6}},\r
- {m68k_op_sub_32_er_pcdi , 0xf1ff, 0x90ba, { 18, 18, 7, 7}},\r
- {m68k_op_sub_32_er_pcix , 0xf1ff, 0x90bb, { 20, 20, 9, 9}},\r
- {m68k_op_sub_32_er_i , 0xf1ff, 0x90bc, { 16, 14, 6, 6}},\r
- {m68k_op_suba_16_aw , 0xf1ff, 0x90f8, { 16, 16, 6, 6}},\r
- {m68k_op_suba_16_al , 0xf1ff, 0x90f9, { 20, 20, 6, 6}},\r
- {m68k_op_suba_16_pcdi , 0xf1ff, 0x90fa, { 16, 16, 7, 7}},\r
- {m68k_op_suba_16_pcix , 0xf1ff, 0x90fb, { 18, 18, 9, 9}},\r
- {m68k_op_suba_16_i , 0xf1ff, 0x90fc, { 12, 12, 4, 4}},\r
- {m68k_op_subx_8_mm_ay7 , 0xf1ff, 0x910f, { 18, 18, 12, 12}},\r
- {m68k_op_sub_8_re_pi7 , 0xf1ff, 0x911f, { 12, 12, 8, 8}},\r
- {m68k_op_sub_8_re_pd7 , 0xf1ff, 0x9127, { 14, 14, 9, 9}},\r
- {m68k_op_sub_8_re_aw , 0xf1ff, 0x9138, { 16, 16, 8, 8}},\r
- {m68k_op_sub_8_re_al , 0xf1ff, 0x9139, { 20, 20, 8, 8}},\r
- {m68k_op_sub_16_re_aw , 0xf1ff, 0x9178, { 16, 16, 8, 8}},\r
- {m68k_op_sub_16_re_al , 0xf1ff, 0x9179, { 20, 20, 8, 8}},\r
- {m68k_op_sub_32_re_aw , 0xf1ff, 0x91b8, { 24, 24, 8, 8}},\r
- {m68k_op_sub_32_re_al , 0xf1ff, 0x91b9, { 28, 28, 8, 8}},\r
- {m68k_op_suba_32_aw , 0xf1ff, 0x91f8, { 18, 18, 6, 6}},\r
- {m68k_op_suba_32_al , 0xf1ff, 0x91f9, { 22, 22, 6, 6}},\r
- {m68k_op_suba_32_pcdi , 0xf1ff, 0x91fa, { 18, 18, 7, 7}},\r
- {m68k_op_suba_32_pcix , 0xf1ff, 0x91fb, { 20, 20, 9, 9}},\r
- {m68k_op_suba_32_i , 0xf1ff, 0x91fc, { 16, 14, 6, 6}},\r
- {m68k_op_cmp_8_pi7 , 0xf1ff, 0xb01f, { 8, 8, 6, 6}},\r
- {m68k_op_cmp_8_pd7 , 0xf1ff, 0xb027, { 10, 10, 7, 7}},\r
- {m68k_op_cmp_8_aw , 0xf1ff, 0xb038, { 12, 12, 6, 6}},\r
- {m68k_op_cmp_8_al , 0xf1ff, 0xb039, { 16, 16, 6, 6}},\r
- {m68k_op_cmp_8_pcdi , 0xf1ff, 0xb03a, { 12, 12, 7, 7}},\r
- {m68k_op_cmp_8_pcix , 0xf1ff, 0xb03b, { 14, 14, 9, 9}},\r
- {m68k_op_cmp_8_i , 0xf1ff, 0xb03c, { 8, 8, 4, 4}},\r
- {m68k_op_cmp_16_aw , 0xf1ff, 0xb078, { 12, 12, 6, 6}},\r
- {m68k_op_cmp_16_al , 0xf1ff, 0xb079, { 16, 16, 6, 6}},\r
- {m68k_op_cmp_16_pcdi , 0xf1ff, 0xb07a, { 12, 12, 7, 7}},\r
- {m68k_op_cmp_16_pcix , 0xf1ff, 0xb07b, { 14, 14, 9, 9}},\r
- {m68k_op_cmp_16_i , 0xf1ff, 0xb07c, { 8, 8, 4, 4}},\r
- {m68k_op_cmp_32_aw , 0xf1ff, 0xb0b8, { 18, 18, 6, 6}},\r
- {m68k_op_cmp_32_al , 0xf1ff, 0xb0b9, { 22, 22, 6, 6}},\r
- {m68k_op_cmp_32_pcdi , 0xf1ff, 0xb0ba, { 18, 18, 7, 7}},\r
- {m68k_op_cmp_32_pcix , 0xf1ff, 0xb0bb, { 20, 20, 9, 9}},\r
- {m68k_op_cmp_32_i , 0xf1ff, 0xb0bc, { 14, 14, 6, 6}},\r
- {m68k_op_cmpa_16_aw , 0xf1ff, 0xb0f8, { 14, 14, 8, 8}},\r
- {m68k_op_cmpa_16_al , 0xf1ff, 0xb0f9, { 18, 18, 8, 8}},\r
- {m68k_op_cmpa_16_pcdi , 0xf1ff, 0xb0fa, { 14, 14, 9, 9}},\r
- {m68k_op_cmpa_16_pcix , 0xf1ff, 0xb0fb, { 16, 16, 11, 11}},\r
- {m68k_op_cmpa_16_i , 0xf1ff, 0xb0fc, { 10, 10, 6, 6}},\r
- {m68k_op_cmpm_8_ay7 , 0xf1ff, 0xb10f, { 12, 12, 9, 9}},\r
- {m68k_op_eor_8_pi7 , 0xf1ff, 0xb11f, { 12, 12, 8, 8}},\r
- {m68k_op_eor_8_pd7 , 0xf1ff, 0xb127, { 14, 14, 9, 9}},\r
- {m68k_op_eor_8_aw , 0xf1ff, 0xb138, { 16, 16, 8, 8}},\r
- {m68k_op_eor_8_al , 0xf1ff, 0xb139, { 20, 20, 8, 8}},\r
- {m68k_op_eor_16_aw , 0xf1ff, 0xb178, { 16, 16, 8, 8}},\r
- {m68k_op_eor_16_al , 0xf1ff, 0xb179, { 20, 20, 8, 8}},\r
- {m68k_op_eor_32_aw , 0xf1ff, 0xb1b8, { 24, 24, 8, 8}},\r
- {m68k_op_eor_32_al , 0xf1ff, 0xb1b9, { 28, 28, 8, 8}},\r
- {m68k_op_cmpa_32_aw , 0xf1ff, 0xb1f8, { 18, 18, 8, 8}},\r
- {m68k_op_cmpa_32_al , 0xf1ff, 0xb1f9, { 22, 22, 8, 8}},\r
- {m68k_op_cmpa_32_pcdi , 0xf1ff, 0xb1fa, { 18, 18, 9, 9}},\r
- {m68k_op_cmpa_32_pcix , 0xf1ff, 0xb1fb, { 20, 20, 11, 11}},\r
- {m68k_op_cmpa_32_i , 0xf1ff, 0xb1fc, { 14, 14, 8, 8}},\r
- {m68k_op_and_8_er_pi7 , 0xf1ff, 0xc01f, { 8, 8, 6, 6}},\r
- {m68k_op_and_8_er_pd7 , 0xf1ff, 0xc027, { 10, 10, 7, 7}},\r
- {m68k_op_and_8_er_aw , 0xf1ff, 0xc038, { 12, 12, 6, 6}},\r
- {m68k_op_and_8_er_al , 0xf1ff, 0xc039, { 16, 16, 6, 6}},\r
- {m68k_op_and_8_er_pcdi , 0xf1ff, 0xc03a, { 12, 12, 7, 7}},\r
- {m68k_op_and_8_er_pcix , 0xf1ff, 0xc03b, { 14, 14, 9, 9}},\r
- {m68k_op_and_8_er_i , 0xf1ff, 0xc03c, { 8, 8, 4, 4}},\r
- {m68k_op_and_16_er_aw , 0xf1ff, 0xc078, { 12, 12, 6, 6}},\r
- {m68k_op_and_16_er_al , 0xf1ff, 0xc079, { 16, 16, 6, 6}},\r
- {m68k_op_and_16_er_pcdi , 0xf1ff, 0xc07a, { 12, 12, 7, 7}},\r
- {m68k_op_and_16_er_pcix , 0xf1ff, 0xc07b, { 14, 14, 9, 9}},\r
- {m68k_op_and_16_er_i , 0xf1ff, 0xc07c, { 8, 8, 4, 4}},\r
- {m68k_op_and_32_er_aw , 0xf1ff, 0xc0b8, { 18, 18, 6, 6}},\r
- {m68k_op_and_32_er_al , 0xf1ff, 0xc0b9, { 22, 22, 6, 6}},\r
- {m68k_op_and_32_er_pcdi , 0xf1ff, 0xc0ba, { 18, 18, 7, 7}},\r
- {m68k_op_and_32_er_pcix , 0xf1ff, 0xc0bb, { 20, 20, 9, 9}},\r
- {m68k_op_and_32_er_i , 0xf1ff, 0xc0bc, { 16, 14, 6, 6}},\r
- {m68k_op_mulu_16_aw , 0xf1ff, 0xc0f8, { 62, 38, 31, 31}},\r
- {m68k_op_mulu_16_al , 0xf1ff, 0xc0f9, { 66, 42, 31, 31}},\r
- {m68k_op_mulu_16_pcdi , 0xf1ff, 0xc0fa, { 62, 38, 32, 32}},\r
- {m68k_op_mulu_16_pcix , 0xf1ff, 0xc0fb, { 64, 40, 34, 34}},\r
- {m68k_op_mulu_16_i , 0xf1ff, 0xc0fc, { 58, 34, 29, 29}},\r
- {m68k_op_abcd_8_mm_ay7 , 0xf1ff, 0xc10f, { 18, 18, 16, 16}},\r
- {m68k_op_and_8_re_pi7 , 0xf1ff, 0xc11f, { 12, 12, 8, 8}},\r
- {m68k_op_and_8_re_pd7 , 0xf1ff, 0xc127, { 14, 14, 9, 9}},\r
- {m68k_op_and_8_re_aw , 0xf1ff, 0xc138, { 16, 16, 8, 8}},\r
- {m68k_op_and_8_re_al , 0xf1ff, 0xc139, { 20, 20, 8, 8}},\r
- {m68k_op_and_16_re_aw , 0xf1ff, 0xc178, { 16, 16, 8, 8}},\r
- {m68k_op_and_16_re_al , 0xf1ff, 0xc179, { 20, 20, 8, 8}},\r
- {m68k_op_and_32_re_aw , 0xf1ff, 0xc1b8, { 24, 24, 8, 8}},\r
- {m68k_op_and_32_re_al , 0xf1ff, 0xc1b9, { 28, 28, 8, 8}},\r
- {m68k_op_muls_16_aw , 0xf1ff, 0xc1f8, { 62, 40, 31, 31}},\r
- {m68k_op_muls_16_al , 0xf1ff, 0xc1f9, { 66, 44, 31, 31}},\r
- {m68k_op_muls_16_pcdi , 0xf1ff, 0xc1fa, { 62, 40, 32, 32}},\r
- {m68k_op_muls_16_pcix , 0xf1ff, 0xc1fb, { 64, 42, 34, 34}},\r
- {m68k_op_muls_16_i , 0xf1ff, 0xc1fc, { 58, 36, 29, 29}},\r
- {m68k_op_add_8_er_pi7 , 0xf1ff, 0xd01f, { 8, 8, 6, 6}},\r
- {m68k_op_add_8_er_pd7 , 0xf1ff, 0xd027, { 10, 10, 7, 7}},\r
- {m68k_op_add_8_er_aw , 0xf1ff, 0xd038, { 12, 12, 6, 6}},\r
- {m68k_op_add_8_er_al , 0xf1ff, 0xd039, { 16, 16, 6, 6}},\r
- {m68k_op_add_8_er_pcdi , 0xf1ff, 0xd03a, { 12, 12, 7, 7}},\r
- {m68k_op_add_8_er_pcix , 0xf1ff, 0xd03b, { 14, 14, 9, 9}},\r
- {m68k_op_add_8_er_i , 0xf1ff, 0xd03c, { 8, 8, 4, 4}},\r
- {m68k_op_add_16_er_aw , 0xf1ff, 0xd078, { 12, 12, 6, 6}},\r
- {m68k_op_add_16_er_al , 0xf1ff, 0xd079, { 16, 16, 6, 6}},\r
- {m68k_op_add_16_er_pcdi , 0xf1ff, 0xd07a, { 12, 12, 7, 7}},\r
- {m68k_op_add_16_er_pcix , 0xf1ff, 0xd07b, { 14, 14, 9, 9}},\r
- {m68k_op_add_16_er_i , 0xf1ff, 0xd07c, { 8, 8, 4, 4}},\r
- {m68k_op_add_32_er_aw , 0xf1ff, 0xd0b8, { 18, 18, 6, 6}},\r
- {m68k_op_add_32_er_al , 0xf1ff, 0xd0b9, { 22, 22, 6, 6}},\r
- {m68k_op_add_32_er_pcdi , 0xf1ff, 0xd0ba, { 18, 18, 7, 7}},\r
- {m68k_op_add_32_er_pcix , 0xf1ff, 0xd0bb, { 20, 20, 9, 9}},\r
- {m68k_op_add_32_er_i , 0xf1ff, 0xd0bc, { 16, 14, 6, 6}},\r
- {m68k_op_adda_16_aw , 0xf1ff, 0xd0f8, { 16, 16, 6, 6}},\r
- {m68k_op_adda_16_al , 0xf1ff, 0xd0f9, { 20, 20, 6, 6}},\r
- {m68k_op_adda_16_pcdi , 0xf1ff, 0xd0fa, { 16, 16, 7, 7}},\r
- {m68k_op_adda_16_pcix , 0xf1ff, 0xd0fb, { 18, 18, 9, 9}},\r
- {m68k_op_adda_16_i , 0xf1ff, 0xd0fc, { 12, 12, 4, 4}},\r
- {m68k_op_addx_8_mm_ay7 , 0xf1ff, 0xd10f, { 18, 18, 12, 12}},\r
- {m68k_op_add_8_re_pi7 , 0xf1ff, 0xd11f, { 12, 12, 8, 8}},\r
- {m68k_op_add_8_re_pd7 , 0xf1ff, 0xd127, { 14, 14, 9, 9}},\r
- {m68k_op_add_8_re_aw , 0xf1ff, 0xd138, { 16, 16, 8, 8}},\r
- {m68k_op_add_8_re_al , 0xf1ff, 0xd139, { 20, 20, 8, 8}},\r
- {m68k_op_add_16_re_aw , 0xf1ff, 0xd178, { 16, 16, 8, 8}},\r
- {m68k_op_add_16_re_al , 0xf1ff, 0xd179, { 20, 20, 8, 8}},\r
- {m68k_op_add_32_re_aw , 0xf1ff, 0xd1b8, { 24, 24, 8, 8}},\r
- {m68k_op_add_32_re_al , 0xf1ff, 0xd1b9, { 28, 28, 8, 8}},\r
- {m68k_op_adda_32_aw , 0xf1ff, 0xd1f8, { 18, 18, 6, 6}},\r
- {m68k_op_adda_32_al , 0xf1ff, 0xd1f9, { 22, 22, 6, 6}},\r
- {m68k_op_adda_32_pcdi , 0xf1ff, 0xd1fa, { 18, 18, 7, 7}},\r
- {m68k_op_adda_32_pcix , 0xf1ff, 0xd1fb, { 20, 20, 9, 9}},\r
- {m68k_op_adda_32_i , 0xf1ff, 0xd1fc, { 16, 14, 6, 6}},\r
- {m68k_op_ori_8_d , 0xfff8, 0x0000, { 8, 8, 2, 2}},\r
- {m68k_op_ori_8_ai , 0xfff8, 0x0010, { 16, 16, 8, 8}},\r
- {m68k_op_ori_8_pi , 0xfff8, 0x0018, { 16, 16, 8, 8}},\r
- {m68k_op_ori_8_pd , 0xfff8, 0x0020, { 18, 18, 9, 9}},\r
- {m68k_op_ori_8_di , 0xfff8, 0x0028, { 20, 20, 9, 9}},\r
- {m68k_op_ori_8_ix , 0xfff8, 0x0030, { 22, 22, 11, 11}},\r
- {m68k_op_ori_16_d , 0xfff8, 0x0040, { 8, 8, 2, 2}},\r
- {m68k_op_ori_16_ai , 0xfff8, 0x0050, { 16, 16, 8, 8}},\r
- {m68k_op_ori_16_pi , 0xfff8, 0x0058, { 16, 16, 8, 8}},\r
- {m68k_op_ori_16_pd , 0xfff8, 0x0060, { 18, 18, 9, 9}},\r
- {m68k_op_ori_16_di , 0xfff8, 0x0068, { 20, 20, 9, 9}},\r
- {m68k_op_ori_16_ix , 0xfff8, 0x0070, { 22, 22, 11, 11}},\r
- {m68k_op_ori_32_d , 0xfff8, 0x0080, { 16, 14, 2, 2}},\r
- {m68k_op_ori_32_ai , 0xfff8, 0x0090, { 28, 28, 8, 8}},\r
- {m68k_op_ori_32_pi , 0xfff8, 0x0098, { 28, 28, 8, 8}},\r
- {m68k_op_ori_32_pd , 0xfff8, 0x00a0, { 30, 30, 9, 9}},\r
- {m68k_op_ori_32_di , 0xfff8, 0x00a8, { 32, 32, 9, 9}},\r
- {m68k_op_ori_32_ix , 0xfff8, 0x00b0, { 34, 34, 11, 11}},\r
- {m68k_op_chk2cmp2_8_ai , 0xfff8, 0x00d0, { 0, 0, 22, 22}},\r
- {m68k_op_chk2cmp2_8_di , 0xfff8, 0x00e8, { 0, 0, 23, 23}},\r
- {m68k_op_chk2cmp2_8_ix , 0xfff8, 0x00f0, { 0, 0, 25, 25}},\r
- {m68k_op_andi_8_d , 0xfff8, 0x0200, { 8, 8, 2, 2}},\r
- {m68k_op_andi_8_ai , 0xfff8, 0x0210, { 16, 16, 8, 8}},\r
- {m68k_op_andi_8_pi , 0xfff8, 0x0218, { 16, 16, 8, 8}},\r
- {m68k_op_andi_8_pd , 0xfff8, 0x0220, { 18, 18, 9, 9}},\r
- {m68k_op_andi_8_di , 0xfff8, 0x0228, { 20, 20, 9, 9}},\r
- {m68k_op_andi_8_ix , 0xfff8, 0x0230, { 22, 22, 11, 11}},\r
- {m68k_op_andi_16_d , 0xfff8, 0x0240, { 8, 8, 2, 2}},\r
- {m68k_op_andi_16_ai , 0xfff8, 0x0250, { 16, 16, 8, 8}},\r
- {m68k_op_andi_16_pi , 0xfff8, 0x0258, { 16, 16, 8, 8}},\r
- {m68k_op_andi_16_pd , 0xfff8, 0x0260, { 18, 18, 9, 9}},\r
- {m68k_op_andi_16_di , 0xfff8, 0x0268, { 20, 20, 9, 9}},\r
- {m68k_op_andi_16_ix , 0xfff8, 0x0270, { 22, 22, 11, 11}},\r
- {m68k_op_andi_32_d , 0xfff8, 0x0280, { 14, 14, 2, 2}},\r
- {m68k_op_andi_32_ai , 0xfff8, 0x0290, { 28, 28, 8, 8}},\r
- {m68k_op_andi_32_pi , 0xfff8, 0x0298, { 28, 28, 8, 8}},\r
- {m68k_op_andi_32_pd , 0xfff8, 0x02a0, { 30, 30, 9, 9}},\r
- {m68k_op_andi_32_di , 0xfff8, 0x02a8, { 32, 32, 9, 9}},\r
- {m68k_op_andi_32_ix , 0xfff8, 0x02b0, { 34, 34, 11, 11}},\r
- {m68k_op_chk2cmp2_16_ai , 0xfff8, 0x02d0, { 0, 0, 22, 22}},\r
- {m68k_op_chk2cmp2_16_di , 0xfff8, 0x02e8, { 0, 0, 23, 23}},\r
- {m68k_op_chk2cmp2_16_ix , 0xfff8, 0x02f0, { 0, 0, 25, 25}},\r
- {m68k_op_subi_8_d , 0xfff8, 0x0400, { 8, 8, 2, 2}},\r
- {m68k_op_subi_8_ai , 0xfff8, 0x0410, { 16, 16, 8, 8}},\r
- {m68k_op_subi_8_pi , 0xfff8, 0x0418, { 16, 16, 8, 8}},\r
- {m68k_op_subi_8_pd , 0xfff8, 0x0420, { 18, 18, 9, 9}},\r
- {m68k_op_subi_8_di , 0xfff8, 0x0428, { 20, 20, 9, 9}},\r
- {m68k_op_subi_8_ix , 0xfff8, 0x0430, { 22, 22, 11, 11}},\r
- {m68k_op_subi_16_d , 0xfff8, 0x0440, { 8, 8, 2, 2}},\r
- {m68k_op_subi_16_ai , 0xfff8, 0x0450, { 16, 16, 8, 8}},\r
- {m68k_op_subi_16_pi , 0xfff8, 0x0458, { 16, 16, 8, 8}},\r
- {m68k_op_subi_16_pd , 0xfff8, 0x0460, { 18, 18, 9, 9}},\r
- {m68k_op_subi_16_di , 0xfff8, 0x0468, { 20, 20, 9, 9}},\r
- {m68k_op_subi_16_ix , 0xfff8, 0x0470, { 22, 22, 11, 11}},\r
- {m68k_op_subi_32_d , 0xfff8, 0x0480, { 16, 14, 2, 2}},\r
- {m68k_op_subi_32_ai , 0xfff8, 0x0490, { 28, 28, 8, 8}},\r
- {m68k_op_subi_32_pi , 0xfff8, 0x0498, { 28, 28, 8, 8}},\r
- {m68k_op_subi_32_pd , 0xfff8, 0x04a0, { 30, 30, 9, 9}},\r
- {m68k_op_subi_32_di , 0xfff8, 0x04a8, { 32, 32, 9, 9}},\r
- {m68k_op_subi_32_ix , 0xfff8, 0x04b0, { 34, 34, 11, 11}},\r
- {m68k_op_chk2cmp2_32_ai , 0xfff8, 0x04d0, { 0, 0, 22, 22}},\r
- {m68k_op_chk2cmp2_32_di , 0xfff8, 0x04e8, { 0, 0, 23, 23}},\r
- {m68k_op_chk2cmp2_32_ix , 0xfff8, 0x04f0, { 0, 0, 25, 25}},\r
- {m68k_op_addi_8_d , 0xfff8, 0x0600, { 8, 8, 2, 2}},\r
- {m68k_op_addi_8_ai , 0xfff8, 0x0610, { 16, 16, 8, 8}},\r
- {m68k_op_addi_8_pi , 0xfff8, 0x0618, { 16, 16, 8, 8}},\r
- {m68k_op_addi_8_pd , 0xfff8, 0x0620, { 18, 18, 9, 9}},\r
- {m68k_op_addi_8_di , 0xfff8, 0x0628, { 20, 20, 9, 9}},\r
- {m68k_op_addi_8_ix , 0xfff8, 0x0630, { 22, 22, 11, 11}},\r
- {m68k_op_addi_16_d , 0xfff8, 0x0640, { 8, 8, 2, 2}},\r
- {m68k_op_addi_16_ai , 0xfff8, 0x0650, { 16, 16, 8, 8}},\r
- {m68k_op_addi_16_pi , 0xfff8, 0x0658, { 16, 16, 8, 8}},\r
- {m68k_op_addi_16_pd , 0xfff8, 0x0660, { 18, 18, 9, 9}},\r
- {m68k_op_addi_16_di , 0xfff8, 0x0668, { 20, 20, 9, 9}},\r
- {m68k_op_addi_16_ix , 0xfff8, 0x0670, { 22, 22, 11, 11}},\r
- {m68k_op_addi_32_d , 0xfff8, 0x0680, { 16, 14, 2, 2}},\r
- {m68k_op_addi_32_ai , 0xfff8, 0x0690, { 28, 28, 8, 8}},\r
- {m68k_op_addi_32_pi , 0xfff8, 0x0698, { 28, 28, 8, 8}},\r
- {m68k_op_addi_32_pd , 0xfff8, 0x06a0, { 30, 30, 9, 9}},\r
- {m68k_op_addi_32_di , 0xfff8, 0x06a8, { 32, 32, 9, 9}},\r
- {m68k_op_addi_32_ix , 0xfff8, 0x06b0, { 34, 34, 11, 11}},\r
- {m68k_op_callm_32_ai , 0xfff8, 0x06d0, { 0, 0, 64, 64}},\r
- {m68k_op_callm_32_di , 0xfff8, 0x06e8, { 0, 0, 65, 65}},\r
- {m68k_op_callm_32_ix , 0xfff8, 0x06f0, { 0, 0, 67, 67}},\r
- {m68k_op_btst_32_s_d , 0xfff8, 0x0800, { 10, 10, 4, 4}},\r
- {m68k_op_btst_8_s_ai , 0xfff8, 0x0810, { 12, 12, 8, 8}},\r
- {m68k_op_btst_8_s_pi , 0xfff8, 0x0818, { 12, 12, 8, 8}},\r
- {m68k_op_btst_8_s_pd , 0xfff8, 0x0820, { 14, 14, 9, 9}},\r
- {m68k_op_btst_8_s_di , 0xfff8, 0x0828, { 16, 16, 9, 9}},\r
- {m68k_op_btst_8_s_ix , 0xfff8, 0x0830, { 18, 18, 11, 11}},\r
- {m68k_op_bchg_32_s_d , 0xfff8, 0x0840, { 12, 12, 4, 4}},\r
- {m68k_op_bchg_8_s_ai , 0xfff8, 0x0850, { 16, 16, 8, 8}},\r
- {m68k_op_bchg_8_s_pi , 0xfff8, 0x0858, { 16, 16, 8, 8}},\r
- {m68k_op_bchg_8_s_pd , 0xfff8, 0x0860, { 18, 18, 9, 9}},\r
- {m68k_op_bchg_8_s_di , 0xfff8, 0x0868, { 20, 20, 9, 9}},\r
- {m68k_op_bchg_8_s_ix , 0xfff8, 0x0870, { 22, 22, 11, 11}},\r
- {m68k_op_bclr_32_s_d , 0xfff8, 0x0880, { 14, 14, 4, 4}},\r
- {m68k_op_bclr_8_s_ai , 0xfff8, 0x0890, { 16, 16, 8, 8}},\r
- {m68k_op_bclr_8_s_pi , 0xfff8, 0x0898, { 16, 16, 8, 8}},\r
- {m68k_op_bclr_8_s_pd , 0xfff8, 0x08a0, { 18, 18, 9, 9}},\r
- {m68k_op_bclr_8_s_di , 0xfff8, 0x08a8, { 20, 20, 9, 9}},\r
- {m68k_op_bclr_8_s_ix , 0xfff8, 0x08b0, { 22, 22, 11, 11}},\r
- {m68k_op_bset_32_s_d , 0xfff8, 0x08c0, { 12, 12, 4, 4}},\r
- {m68k_op_bset_8_s_ai , 0xfff8, 0x08d0, { 16, 16, 8, 8}},\r
- {m68k_op_bset_8_s_pi , 0xfff8, 0x08d8, { 16, 16, 8, 8}},\r
- {m68k_op_bset_8_s_pd , 0xfff8, 0x08e0, { 18, 18, 9, 9}},\r
- {m68k_op_bset_8_s_di , 0xfff8, 0x08e8, { 20, 20, 9, 9}},\r
- {m68k_op_bset_8_s_ix , 0xfff8, 0x08f0, { 22, 22, 11, 11}},\r
- {m68k_op_eori_8_d , 0xfff8, 0x0a00, { 8, 8, 2, 2}},\r
- {m68k_op_eori_8_ai , 0xfff8, 0x0a10, { 16, 16, 8, 8}},\r
- {m68k_op_eori_8_pi , 0xfff8, 0x0a18, { 16, 16, 8, 8}},\r
- {m68k_op_eori_8_pd , 0xfff8, 0x0a20, { 18, 18, 9, 9}},\r
- {m68k_op_eori_8_di , 0xfff8, 0x0a28, { 20, 20, 9, 9}},\r
- {m68k_op_eori_8_ix , 0xfff8, 0x0a30, { 22, 22, 11, 11}},\r
- {m68k_op_eori_16_d , 0xfff8, 0x0a40, { 8, 8, 2, 2}},\r
- {m68k_op_eori_16_ai , 0xfff8, 0x0a50, { 16, 16, 8, 8}},\r
- {m68k_op_eori_16_pi , 0xfff8, 0x0a58, { 16, 16, 8, 8}},\r
- {m68k_op_eori_16_pd , 0xfff8, 0x0a60, { 18, 18, 9, 9}},\r
- {m68k_op_eori_16_di , 0xfff8, 0x0a68, { 20, 20, 9, 9}},\r
- {m68k_op_eori_16_ix , 0xfff8, 0x0a70, { 22, 22, 11, 11}},\r
- {m68k_op_eori_32_d , 0xfff8, 0x0a80, { 16, 14, 2, 2}},\r
- {m68k_op_eori_32_ai , 0xfff8, 0x0a90, { 28, 28, 8, 8}},\r
- {m68k_op_eori_32_pi , 0xfff8, 0x0a98, { 28, 28, 8, 8}},\r
- {m68k_op_eori_32_pd , 0xfff8, 0x0aa0, { 30, 30, 9, 9}},\r
- {m68k_op_eori_32_di , 0xfff8, 0x0aa8, { 32, 32, 9, 9}},\r
- {m68k_op_eori_32_ix , 0xfff8, 0x0ab0, { 34, 34, 11, 11}},\r
- {m68k_op_cas_8_ai , 0xfff8, 0x0ad0, { 0, 0, 16, 16}},\r
- {m68k_op_cas_8_pi , 0xfff8, 0x0ad8, { 0, 0, 16, 16}},\r
- {m68k_op_cas_8_pd , 0xfff8, 0x0ae0, { 0, 0, 17, 17}},\r
- {m68k_op_cas_8_di , 0xfff8, 0x0ae8, { 0, 0, 17, 17}},\r
- {m68k_op_cas_8_ix , 0xfff8, 0x0af0, { 0, 0, 19, 19}},\r
- {m68k_op_cmpi_8_d , 0xfff8, 0x0c00, { 8, 8, 2, 2}},\r
- {m68k_op_cmpi_8_ai , 0xfff8, 0x0c10, { 12, 12, 6, 6}},\r
- {m68k_op_cmpi_8_pi , 0xfff8, 0x0c18, { 12, 12, 6, 6}},\r
- {m68k_op_cmpi_8_pd , 0xfff8, 0x0c20, { 14, 14, 7, 7}},\r
- {m68k_op_cmpi_8_di , 0xfff8, 0x0c28, { 16, 16, 7, 7}},\r
- {m68k_op_cmpi_8_ix , 0xfff8, 0x0c30, { 18, 18, 9, 9}},\r
- {m68k_op_cmpi_16_d , 0xfff8, 0x0c40, { 8, 8, 2, 2}},\r
- {m68k_op_cmpi_16_ai , 0xfff8, 0x0c50, { 12, 12, 6, 6}},\r
- {m68k_op_cmpi_16_pi , 0xfff8, 0x0c58, { 12, 12, 6, 6}},\r
- {m68k_op_cmpi_16_pd , 0xfff8, 0x0c60, { 14, 14, 7, 7}},\r
- {m68k_op_cmpi_16_di , 0xfff8, 0x0c68, { 16, 16, 7, 7}},\r
- {m68k_op_cmpi_16_ix , 0xfff8, 0x0c70, { 18, 18, 9, 9}},\r
- {m68k_op_cmpi_32_d , 0xfff8, 0x0c80, { 14, 12, 2, 2}},\r
- {m68k_op_cmpi_32_ai , 0xfff8, 0x0c90, { 20, 20, 6, 6}},\r
- {m68k_op_cmpi_32_pi , 0xfff8, 0x0c98, { 20, 20, 6, 6}},\r
- {m68k_op_cmpi_32_pd , 0xfff8, 0x0ca0, { 22, 22, 7, 7}},\r
- {m68k_op_cmpi_32_di , 0xfff8, 0x0ca8, { 24, 24, 7, 7}},\r
- {m68k_op_cmpi_32_ix , 0xfff8, 0x0cb0, { 26, 26, 9, 9}},\r
- {m68k_op_cas_16_ai , 0xfff8, 0x0cd0, { 0, 0, 16, 16}},\r
- {m68k_op_cas_16_pi , 0xfff8, 0x0cd8, { 0, 0, 16, 16}},\r
- {m68k_op_cas_16_pd , 0xfff8, 0x0ce0, { 0, 0, 17, 17}},\r
- {m68k_op_cas_16_di , 0xfff8, 0x0ce8, { 0, 0, 17, 17}},\r
- {m68k_op_cas_16_ix , 0xfff8, 0x0cf0, { 0, 0, 19, 19}},\r
- {m68k_op_moves_8_ai , 0xfff8, 0x0e10, { 0, 18, 9, 9}},\r
- {m68k_op_moves_8_pi , 0xfff8, 0x0e18, { 0, 18, 9, 9}},\r
- {m68k_op_moves_8_pd , 0xfff8, 0x0e20, { 0, 20, 10, 10}},\r
- {m68k_op_moves_8_di , 0xfff8, 0x0e28, { 0, 26, 10, 10}},\r
- {m68k_op_moves_8_ix , 0xfff8, 0x0e30, { 0, 30, 12, 12}},\r
- {m68k_op_moves_16_ai , 0xfff8, 0x0e50, { 0, 18, 9, 9}},\r
- {m68k_op_moves_16_pi , 0xfff8, 0x0e58, { 0, 18, 9, 9}},\r
- {m68k_op_moves_16_pd , 0xfff8, 0x0e60, { 0, 20, 10, 10}},\r
- {m68k_op_moves_16_di , 0xfff8, 0x0e68, { 0, 26, 10, 10}},\r
- {m68k_op_moves_16_ix , 0xfff8, 0x0e70, { 0, 30, 12, 12}},\r
- {m68k_op_moves_32_ai , 0xfff8, 0x0e90, { 0, 22, 9, 9}},\r
- {m68k_op_moves_32_pi , 0xfff8, 0x0e98, { 0, 22, 9, 9}},\r
- {m68k_op_moves_32_pd , 0xfff8, 0x0ea0, { 0, 28, 10, 10}},\r
- {m68k_op_moves_32_di , 0xfff8, 0x0ea8, { 0, 32, 10, 10}},\r
- {m68k_op_moves_32_ix , 0xfff8, 0x0eb0, { 0, 36, 12, 12}},\r
- {m68k_op_cas_32_ai , 0xfff8, 0x0ed0, { 0, 0, 16, 16}},\r
- {m68k_op_cas_32_pi , 0xfff8, 0x0ed8, { 0, 0, 16, 16}},\r
- {m68k_op_cas_32_pd , 0xfff8, 0x0ee0, { 0, 0, 17, 17}},\r
- {m68k_op_cas_32_di , 0xfff8, 0x0ee8, { 0, 0, 17, 17}},\r
- {m68k_op_cas_32_ix , 0xfff8, 0x0ef0, { 0, 0, 19, 19}},\r
- {m68k_op_move_8_aw_d , 0xfff8, 0x11c0, { 12, 12, 4, 4}},\r
- {m68k_op_move_8_aw_ai , 0xfff8, 0x11d0, { 16, 16, 8, 8}},\r
- {m68k_op_move_8_aw_pi , 0xfff8, 0x11d8, { 16, 16, 8, 8}},\r
- {m68k_op_move_8_aw_pd , 0xfff8, 0x11e0, { 18, 18, 9, 9}},\r
- {m68k_op_move_8_aw_di , 0xfff8, 0x11e8, { 20, 20, 9, 9}},\r
- {m68k_op_move_8_aw_ix , 0xfff8, 0x11f0, { 22, 22, 11, 11}},\r
- {m68k_op_move_8_al_d , 0xfff8, 0x13c0, { 16, 16, 6, 6}},\r
- {m68k_op_move_8_al_ai , 0xfff8, 0x13d0, { 20, 20, 10, 10}},\r
- {m68k_op_move_8_al_pi , 0xfff8, 0x13d8, { 20, 20, 10, 10}},\r
- {m68k_op_move_8_al_pd , 0xfff8, 0x13e0, { 22, 22, 11, 11}},\r
- {m68k_op_move_8_al_di , 0xfff8, 0x13e8, { 24, 24, 11, 11}},\r
- {m68k_op_move_8_al_ix , 0xfff8, 0x13f0, { 26, 26, 13, 13}},\r
- {m68k_op_move_8_pi7_d , 0xfff8, 0x1ec0, { 8, 8, 4, 4}},\r
- {m68k_op_move_8_pi7_ai , 0xfff8, 0x1ed0, { 12, 12, 8, 8}},\r
- {m68k_op_move_8_pi7_pi , 0xfff8, 0x1ed8, { 12, 12, 8, 8}},\r
- {m68k_op_move_8_pi7_pd , 0xfff8, 0x1ee0, { 14, 14, 9, 9}},\r
- {m68k_op_move_8_pi7_di , 0xfff8, 0x1ee8, { 16, 16, 9, 9}},\r
- {m68k_op_move_8_pi7_ix , 0xfff8, 0x1ef0, { 18, 18, 11, 11}},\r
- {m68k_op_move_8_pd7_d , 0xfff8, 0x1f00, { 8, 8, 5, 5}},\r
- {m68k_op_move_8_pd7_ai , 0xfff8, 0x1f10, { 12, 12, 9, 9}},\r
- {m68k_op_move_8_pd7_pi , 0xfff8, 0x1f18, { 12, 12, 9, 9}},\r
- {m68k_op_move_8_pd7_pd , 0xfff8, 0x1f20, { 14, 14, 10, 10}},\r
- {m68k_op_move_8_pd7_di , 0xfff8, 0x1f28, { 16, 16, 10, 10}},\r
- {m68k_op_move_8_pd7_ix , 0xfff8, 0x1f30, { 18, 18, 12, 12}},\r
- {m68k_op_move_32_aw_d , 0xfff8, 0x21c0, { 16, 16, 4, 4}},\r
- {m68k_op_move_32_aw_a , 0xfff8, 0x21c8, { 16, 16, 4, 4}},\r
- {m68k_op_move_32_aw_ai , 0xfff8, 0x21d0, { 24, 24, 8, 8}},\r
- {m68k_op_move_32_aw_pi , 0xfff8, 0x21d8, { 24, 24, 8, 8}},\r
- {m68k_op_move_32_aw_pd , 0xfff8, 0x21e0, { 26, 26, 9, 9}},\r
- {m68k_op_move_32_aw_di , 0xfff8, 0x21e8, { 28, 28, 9, 9}},\r
- {m68k_op_move_32_aw_ix , 0xfff8, 0x21f0, { 30, 30, 11, 11}},\r
- {m68k_op_move_32_al_d , 0xfff8, 0x23c0, { 20, 20, 6, 6}},\r
- {m68k_op_move_32_al_a , 0xfff8, 0x23c8, { 20, 20, 6, 6}},\r
- {m68k_op_move_32_al_ai , 0xfff8, 0x23d0, { 28, 28, 10, 10}},\r
- {m68k_op_move_32_al_pi , 0xfff8, 0x23d8, { 28, 28, 10, 10}},\r
- {m68k_op_move_32_al_pd , 0xfff8, 0x23e0, { 30, 30, 11, 11}},\r
- {m68k_op_move_32_al_di , 0xfff8, 0x23e8, { 32, 32, 11, 11}},\r
- {m68k_op_move_32_al_ix , 0xfff8, 0x23f0, { 34, 34, 13, 13}},\r
- {m68k_op_move_16_aw_d , 0xfff8, 0x31c0, { 12, 12, 4, 4}},\r
- {m68k_op_move_16_aw_a , 0xfff8, 0x31c8, { 12, 12, 4, 4}},\r
- {m68k_op_move_16_aw_ai , 0xfff8, 0x31d0, { 16, 16, 8, 8}},\r
- {m68k_op_move_16_aw_pi , 0xfff8, 0x31d8, { 16, 16, 8, 8}},\r
- {m68k_op_move_16_aw_pd , 0xfff8, 0x31e0, { 18, 18, 9, 9}},\r
- {m68k_op_move_16_aw_di , 0xfff8, 0x31e8, { 20, 20, 9, 9}},\r
- {m68k_op_move_16_aw_ix , 0xfff8, 0x31f0, { 22, 22, 11, 11}},\r
- {m68k_op_move_16_al_d , 0xfff8, 0x33c0, { 16, 16, 6, 6}},\r
- {m68k_op_move_16_al_a , 0xfff8, 0x33c8, { 16, 16, 6, 6}},\r
- {m68k_op_move_16_al_ai , 0xfff8, 0x33d0, { 20, 20, 10, 10}},\r
- {m68k_op_move_16_al_pi , 0xfff8, 0x33d8, { 20, 20, 10, 10}},\r
- {m68k_op_move_16_al_pd , 0xfff8, 0x33e0, { 22, 22, 11, 11}},\r
- {m68k_op_move_16_al_di , 0xfff8, 0x33e8, { 24, 24, 11, 11}},\r
- {m68k_op_move_16_al_ix , 0xfff8, 0x33f0, { 26, 26, 13, 13}},\r
- {m68k_op_negx_8_d , 0xfff8, 0x4000, { 4, 4, 2, 2}},\r
- {m68k_op_negx_8_ai , 0xfff8, 0x4010, { 12, 12, 8, 8}},\r
- {m68k_op_negx_8_pi , 0xfff8, 0x4018, { 12, 12, 8, 8}},\r
- {m68k_op_negx_8_pd , 0xfff8, 0x4020, { 14, 14, 9, 9}},\r
- {m68k_op_negx_8_di , 0xfff8, 0x4028, { 16, 16, 9, 9}},\r
- {m68k_op_negx_8_ix , 0xfff8, 0x4030, { 18, 18, 11, 11}},\r
- {m68k_op_negx_16_d , 0xfff8, 0x4040, { 4, 4, 2, 2}},\r
- {m68k_op_negx_16_ai , 0xfff8, 0x4050, { 12, 12, 8, 8}},\r
- {m68k_op_negx_16_pi , 0xfff8, 0x4058, { 12, 12, 8, 8}},\r
- {m68k_op_negx_16_pd , 0xfff8, 0x4060, { 14, 14, 9, 9}},\r
- {m68k_op_negx_16_di , 0xfff8, 0x4068, { 16, 16, 9, 9}},\r
- {m68k_op_negx_16_ix , 0xfff8, 0x4070, { 18, 18, 11, 11}},\r
- {m68k_op_negx_32_d , 0xfff8, 0x4080, { 6, 6, 2, 2}},\r
- {m68k_op_negx_32_ai , 0xfff8, 0x4090, { 20, 20, 8, 8}},\r
- {m68k_op_negx_32_pi , 0xfff8, 0x4098, { 20, 20, 8, 8}},\r
- {m68k_op_negx_32_pd , 0xfff8, 0x40a0, { 22, 22, 9, 9}},\r
- {m68k_op_negx_32_di , 0xfff8, 0x40a8, { 24, 24, 9, 9}},\r
- {m68k_op_negx_32_ix , 0xfff8, 0x40b0, { 26, 26, 11, 11}},\r
- {m68k_op_move_16_frs_d , 0xfff8, 0x40c0, { 6, 4, 8, 8}},\r
- {m68k_op_move_16_frs_ai , 0xfff8, 0x40d0, { 12, 12, 12, 12}},\r
- {m68k_op_move_16_frs_pi , 0xfff8, 0x40d8, { 12, 12, 12, 12}},\r
- {m68k_op_move_16_frs_pd , 0xfff8, 0x40e0, { 14, 14, 13, 13}},\r
- {m68k_op_move_16_frs_di , 0xfff8, 0x40e8, { 16, 16, 13, 13}},\r
- {m68k_op_move_16_frs_ix , 0xfff8, 0x40f0, { 18, 18, 15, 15}},\r
- {m68k_op_clr_8_d , 0xfff8, 0x4200, { 4, 4, 2, 2}},\r
- {m68k_op_clr_8_ai , 0xfff8, 0x4210, { 10, 8, 8, 8}},\r
- {m68k_op_clr_8_pi , 0xfff8, 0x4218, { 10, 8, 8, 8}},\r
- {m68k_op_clr_8_pd , 0xfff8, 0x4220, { 12, 10, 9, 9}},\r
- {m68k_op_clr_8_di , 0xfff8, 0x4228, { 14, 12, 9, 9}},\r
- {m68k_op_clr_8_ix , 0xfff8, 0x4230, { 16, 14, 11, 11}},\r
- {m68k_op_clr_16_d , 0xfff8, 0x4240, { 4, 4, 2, 2}},\r
- {m68k_op_clr_16_ai , 0xfff8, 0x4250, { 10, 8, 8, 8}},\r
- {m68k_op_clr_16_pi , 0xfff8, 0x4258, { 10, 8, 8, 8}},\r
- {m68k_op_clr_16_pd , 0xfff8, 0x4260, { 12, 10, 9, 9}},\r
- {m68k_op_clr_16_di , 0xfff8, 0x4268, { 14, 12, 9, 9}},\r
- {m68k_op_clr_16_ix , 0xfff8, 0x4270, { 16, 14, 11, 11}},\r
- {m68k_op_clr_32_d , 0xfff8, 0x4280, { 6, 6, 2, 2}},\r
- {m68k_op_clr_32_ai , 0xfff8, 0x4290, { 20, 12, 8, 8}},\r
- {m68k_op_clr_32_pi , 0xfff8, 0x4298, { 20, 12, 8, 8}},\r
- {m68k_op_clr_32_pd , 0xfff8, 0x42a0, { 22, 14, 9, 9}},\r
- {m68k_op_clr_32_di , 0xfff8, 0x42a8, { 24, 16, 9, 9}},\r
- {m68k_op_clr_32_ix , 0xfff8, 0x42b0, { 26, 20, 11, 11}},\r
- {m68k_op_move_16_frc_d , 0xfff8, 0x42c0, { 0, 4, 4, 4}},\r
- {m68k_op_move_16_frc_ai , 0xfff8, 0x42d0, { 0, 12, 8, 8}},\r
- {m68k_op_move_16_frc_pi , 0xfff8, 0x42d8, { 0, 12, 8, 8}},\r
- {m68k_op_move_16_frc_pd , 0xfff8, 0x42e0, { 0, 14, 9, 9}},\r
- {m68k_op_move_16_frc_di , 0xfff8, 0x42e8, { 0, 16, 9, 9}},\r
- {m68k_op_move_16_frc_ix , 0xfff8, 0x42f0, { 0, 18, 11, 11}},\r
- {m68k_op_neg_8_d , 0xfff8, 0x4400, { 4, 4, 2, 2}},\r
- {m68k_op_neg_8_ai , 0xfff8, 0x4410, { 12, 12, 8, 8}},\r
- {m68k_op_neg_8_pi , 0xfff8, 0x4418, { 12, 12, 8, 8}},\r
- {m68k_op_neg_8_pd , 0xfff8, 0x4420, { 14, 14, 9, 9}},\r
- {m68k_op_neg_8_di , 0xfff8, 0x4428, { 16, 16, 9, 9}},\r
- {m68k_op_neg_8_ix , 0xfff8, 0x4430, { 18, 18, 11, 11}},\r
- {m68k_op_neg_16_d , 0xfff8, 0x4440, { 4, 4, 2, 2}},\r
- {m68k_op_neg_16_ai , 0xfff8, 0x4450, { 12, 12, 8, 8}},\r
- {m68k_op_neg_16_pi , 0xfff8, 0x4458, { 12, 12, 8, 8}},\r
- {m68k_op_neg_16_pd , 0xfff8, 0x4460, { 14, 14, 9, 9}},\r
- {m68k_op_neg_16_di , 0xfff8, 0x4468, { 16, 16, 9, 9}},\r
- {m68k_op_neg_16_ix , 0xfff8, 0x4470, { 18, 18, 11, 11}},\r
- {m68k_op_neg_32_d , 0xfff8, 0x4480, { 6, 6, 2, 2}},\r
- {m68k_op_neg_32_ai , 0xfff8, 0x4490, { 20, 20, 8, 8}},\r
- {m68k_op_neg_32_pi , 0xfff8, 0x4498, { 20, 20, 8, 8}},\r
- {m68k_op_neg_32_pd , 0xfff8, 0x44a0, { 22, 22, 9, 9}},\r
- {m68k_op_neg_32_di , 0xfff8, 0x44a8, { 24, 24, 9, 9}},\r
- {m68k_op_neg_32_ix , 0xfff8, 0x44b0, { 26, 26, 11, 11}},\r
- {m68k_op_move_16_toc_d , 0xfff8, 0x44c0, { 12, 12, 4, 4}},\r
- {m68k_op_move_16_toc_ai , 0xfff8, 0x44d0, { 16, 16, 8, 8}},\r
- {m68k_op_move_16_toc_pi , 0xfff8, 0x44d8, { 16, 16, 8, 8}},\r
- {m68k_op_move_16_toc_pd , 0xfff8, 0x44e0, { 18, 18, 9, 9}},\r
- {m68k_op_move_16_toc_di , 0xfff8, 0x44e8, { 20, 20, 9, 9}},\r
- {m68k_op_move_16_toc_ix , 0xfff8, 0x44f0, { 22, 22, 11, 11}},\r
- {m68k_op_not_8_d , 0xfff8, 0x4600, { 4, 4, 2, 2}},\r
- {m68k_op_not_8_ai , 0xfff8, 0x4610, { 12, 12, 8, 8}},\r
- {m68k_op_not_8_pi , 0xfff8, 0x4618, { 12, 12, 8, 8}},\r
- {m68k_op_not_8_pd , 0xfff8, 0x4620, { 14, 14, 9, 9}},\r
- {m68k_op_not_8_di , 0xfff8, 0x4628, { 16, 16, 9, 9}},\r
- {m68k_op_not_8_ix , 0xfff8, 0x4630, { 18, 18, 11, 11}},\r
- {m68k_op_not_16_d , 0xfff8, 0x4640, { 4, 4, 2, 2}},\r
- {m68k_op_not_16_ai , 0xfff8, 0x4650, { 12, 12, 8, 8}},\r
- {m68k_op_not_16_pi , 0xfff8, 0x4658, { 12, 12, 8, 8}},\r
- {m68k_op_not_16_pd , 0xfff8, 0x4660, { 14, 14, 9, 9}},\r
- {m68k_op_not_16_di , 0xfff8, 0x4668, { 16, 16, 9, 9}},\r
- {m68k_op_not_16_ix , 0xfff8, 0x4670, { 18, 18, 11, 11}},\r
- {m68k_op_not_32_d , 0xfff8, 0x4680, { 6, 6, 2, 2}},\r
- {m68k_op_not_32_ai , 0xfff8, 0x4690, { 20, 20, 8, 8}},\r
- {m68k_op_not_32_pi , 0xfff8, 0x4698, { 20, 20, 8, 8}},\r
- {m68k_op_not_32_pd , 0xfff8, 0x46a0, { 22, 22, 9, 9}},\r
- {m68k_op_not_32_di , 0xfff8, 0x46a8, { 24, 24, 9, 9}},\r
- {m68k_op_not_32_ix , 0xfff8, 0x46b0, { 26, 26, 11, 11}},\r
- {m68k_op_move_16_tos_d , 0xfff8, 0x46c0, { 12, 12, 8, 8}},\r
- {m68k_op_move_16_tos_ai , 0xfff8, 0x46d0, { 16, 16, 12, 12}},\r
- {m68k_op_move_16_tos_pi , 0xfff8, 0x46d8, { 16, 16, 12, 12}},\r
- {m68k_op_move_16_tos_pd , 0xfff8, 0x46e0, { 18, 18, 13, 13}},\r
- {m68k_op_move_16_tos_di , 0xfff8, 0x46e8, { 20, 20, 13, 13}},\r
- {m68k_op_move_16_tos_ix , 0xfff8, 0x46f0, { 22, 22, 15, 15}},\r
- {m68k_op_nbcd_8_d , 0xfff8, 0x4800, { 6, 6, 6, 6}},\r
- {m68k_op_link_32 , 0xfff8, 0x4808, { 0, 0, 6, 6}},\r
- {m68k_op_nbcd_8_ai , 0xfff8, 0x4810, { 12, 12, 10, 10}},\r
- {m68k_op_nbcd_8_pi , 0xfff8, 0x4818, { 12, 12, 10, 10}},\r
- {m68k_op_nbcd_8_pd , 0xfff8, 0x4820, { 14, 14, 11, 11}},\r
- {m68k_op_nbcd_8_di , 0xfff8, 0x4828, { 16, 16, 11, 11}},\r
- {m68k_op_nbcd_8_ix , 0xfff8, 0x4830, { 18, 18, 13, 13}},\r
- {m68k_op_swap_32 , 0xfff8, 0x4840, { 4, 4, 4, 4}},\r
- {m68k_op_bkpt , 0xfff8, 0x4848, { 0, 10, 10, 10}},\r
- {m68k_op_pea_32_ai , 0xfff8, 0x4850, { 12, 12, 9, 9}},\r
- {m68k_op_pea_32_di , 0xfff8, 0x4868, { 16, 16, 10, 10}},\r
- {m68k_op_pea_32_ix , 0xfff8, 0x4870, { 20, 20, 12, 12}},\r
- {m68k_op_ext_16 , 0xfff8, 0x4880, { 4, 4, 4, 4}},\r
- {m68k_op_movem_16_re_ai , 0xfff8, 0x4890, { 8, 8, 8, 8}},\r
- {m68k_op_movem_16_re_pd , 0xfff8, 0x48a0, { 8, 8, 4, 4}},\r
- {m68k_op_movem_16_re_di , 0xfff8, 0x48a8, { 12, 12, 9, 9}},\r
- {m68k_op_movem_16_re_ix , 0xfff8, 0x48b0, { 14, 14, 11, 11}},\r
- {m68k_op_ext_32 , 0xfff8, 0x48c0, { 4, 4, 4, 4}},\r
- {m68k_op_movem_32_re_ai , 0xfff8, 0x48d0, { 8, 8, 8, 8}},\r
- {m68k_op_movem_32_re_pd , 0xfff8, 0x48e0, { 8, 8, 4, 4}},\r
- {m68k_op_movem_32_re_di , 0xfff8, 0x48e8, { 12, 12, 9, 9}},\r
- {m68k_op_movem_32_re_ix , 0xfff8, 0x48f0, { 14, 14, 11, 11}},\r
- {m68k_op_extb_32 , 0xfff8, 0x49c0, { 0, 0, 4, 4}},\r
- {m68k_op_tst_8_d , 0xfff8, 0x4a00, { 4, 4, 2, 2}},\r
- {m68k_op_tst_8_ai , 0xfff8, 0x4a10, { 8, 8, 6, 6}},\r
- {m68k_op_tst_8_pi , 0xfff8, 0x4a18, { 8, 8, 6, 6}},\r
- {m68k_op_tst_8_pd , 0xfff8, 0x4a20, { 10, 10, 7, 7}},\r
- {m68k_op_tst_8_di , 0xfff8, 0x4a28, { 12, 12, 7, 7}},\r
- {m68k_op_tst_8_ix , 0xfff8, 0x4a30, { 14, 14, 9, 9}},\r
- {m68k_op_tst_16_d , 0xfff8, 0x4a40, { 4, 4, 2, 2}},\r
- {m68k_op_tst_16_a , 0xfff8, 0x4a48, { 0, 0, 2, 2}},\r
- {m68k_op_tst_16_ai , 0xfff8, 0x4a50, { 8, 8, 6, 6}},\r
- {m68k_op_tst_16_pi , 0xfff8, 0x4a58, { 8, 8, 6, 6}},\r
- {m68k_op_tst_16_pd , 0xfff8, 0x4a60, { 10, 10, 7, 7}},\r
- {m68k_op_tst_16_di , 0xfff8, 0x4a68, { 12, 12, 7, 7}},\r
- {m68k_op_tst_16_ix , 0xfff8, 0x4a70, { 14, 14, 9, 9}},\r
- {m68k_op_tst_32_d , 0xfff8, 0x4a80, { 4, 4, 2, 2}},\r
- {m68k_op_tst_32_a , 0xfff8, 0x4a88, { 0, 0, 2, 2}},\r
- {m68k_op_tst_32_ai , 0xfff8, 0x4a90, { 12, 12, 6, 6}},\r
- {m68k_op_tst_32_pi , 0xfff8, 0x4a98, { 12, 12, 6, 6}},\r
- {m68k_op_tst_32_pd , 0xfff8, 0x4aa0, { 14, 14, 7, 7}},\r
- {m68k_op_tst_32_di , 0xfff8, 0x4aa8, { 16, 16, 7, 7}},\r
- {m68k_op_tst_32_ix , 0xfff8, 0x4ab0, { 18, 18, 9, 9}},\r
- {m68k_op_tas_8_d , 0xfff8, 0x4ac0, { 4, 4, 4, 4}},\r
- {m68k_op_tas_8_ai , 0xfff8, 0x4ad0, { 18, 18, 16, 16}},\r
- {m68k_op_tas_8_pi , 0xfff8, 0x4ad8, { 18, 18, 16, 16}},\r
- {m68k_op_tas_8_pd , 0xfff8, 0x4ae0, { 20, 20, 17, 17}},\r
- {m68k_op_tas_8_di , 0xfff8, 0x4ae8, { 22, 22, 17, 17}},\r
- {m68k_op_tas_8_ix , 0xfff8, 0x4af0, { 24, 24, 19, 19}},\r
- {m68k_op_mull_32_d , 0xfff8, 0x4c00, { 0, 0, 43, 43}},\r
- {m68k_op_mull_32_ai , 0xfff8, 0x4c10, { 0, 0, 47, 47}},\r
- {m68k_op_mull_32_pi , 0xfff8, 0x4c18, { 0, 0, 47, 47}},\r
- {m68k_op_mull_32_pd , 0xfff8, 0x4c20, { 0, 0, 48, 48}},\r
- {m68k_op_mull_32_di , 0xfff8, 0x4c28, { 0, 0, 48, 48}},\r
- {m68k_op_mull_32_ix , 0xfff8, 0x4c30, { 0, 0, 50, 50}},\r
- {m68k_op_divl_32_d , 0xfff8, 0x4c40, { 0, 0, 84, 84}},\r
- {m68k_op_divl_32_ai , 0xfff8, 0x4c50, { 0, 0, 88, 88}},\r
- {m68k_op_divl_32_pi , 0xfff8, 0x4c58, { 0, 0, 88, 88}},\r
- {m68k_op_divl_32_pd , 0xfff8, 0x4c60, { 0, 0, 89, 89}},\r
- {m68k_op_divl_32_di , 0xfff8, 0x4c68, { 0, 0, 89, 89}},\r
- {m68k_op_divl_32_ix , 0xfff8, 0x4c70, { 0, 0, 91, 91}},\r
- {m68k_op_movem_16_er_ai , 0xfff8, 0x4c90, { 12, 12, 12, 12}},\r
- {m68k_op_movem_16_er_pi , 0xfff8, 0x4c98, { 12, 12, 8, 8}},\r
- {m68k_op_movem_16_er_di , 0xfff8, 0x4ca8, { 16, 16, 13, 13}},\r
- {m68k_op_movem_16_er_ix , 0xfff8, 0x4cb0, { 18, 18, 15, 15}},\r
- {m68k_op_movem_32_er_ai , 0xfff8, 0x4cd0, { 12, 12, 12, 12}},\r
- {m68k_op_movem_32_er_pi , 0xfff8, 0x4cd8, { 12, 12, 8, 8}},\r
- {m68k_op_movem_32_er_di , 0xfff8, 0x4ce8, { 16, 16, 13, 13}},\r
- {m68k_op_movem_32_er_ix , 0xfff8, 0x4cf0, { 18, 18, 15, 15}},\r
- {m68k_op_link_16 , 0xfff8, 0x4e50, { 16, 16, 5, 5}},\r
- {m68k_op_unlk_32 , 0xfff8, 0x4e58, { 12, 12, 6, 6}},\r
- {m68k_op_move_32_tou , 0xfff8, 0x4e60, { 4, 6, 2, 2}},\r
- {m68k_op_move_32_fru , 0xfff8, 0x4e68, { 4, 6, 2, 2}},\r
- {m68k_op_jsr_32_ai , 0xfff8, 0x4e90, { 16, 16, 4, 4}},\r
- {m68k_op_jsr_32_di , 0xfff8, 0x4ea8, { 18, 18, 5, 5}},\r
- {m68k_op_jsr_32_ix , 0xfff8, 0x4eb0, { 22, 22, 7, 7}},\r
- {m68k_op_jmp_32_ai , 0xfff8, 0x4ed0, { 8, 8, 4, 4}},\r
- {m68k_op_jmp_32_di , 0xfff8, 0x4ee8, { 10, 10, 5, 5}},\r
- {m68k_op_jmp_32_ix , 0xfff8, 0x4ef0, { 14, 14, 7, 7}},\r
- {m68k_op_st_8_d , 0xfff8, 0x50c0, { 6, 4, 4, 4}},\r
- {m68k_op_dbt_16 , 0xfff8, 0x50c8, { 12, 12, 6, 6}},\r
- {m68k_op_st_8_ai , 0xfff8, 0x50d0, { 12, 12, 10, 10}},\r
- {m68k_op_st_8_pi , 0xfff8, 0x50d8, { 12, 12, 10, 10}},\r
- {m68k_op_st_8_pd , 0xfff8, 0x50e0, { 14, 14, 11, 11}},\r
- {m68k_op_st_8_di , 0xfff8, 0x50e8, { 16, 16, 11, 11}},\r
- {m68k_op_st_8_ix , 0xfff8, 0x50f0, { 18, 18, 13, 13}},\r
- {m68k_op_sf_8_d , 0xfff8, 0x51c0, { 4, 4, 4, 4}},\r
- {m68k_op_dbf_16 , 0xfff8, 0x51c8, { 12, 12, 6, 6}},\r
- {m68k_op_sf_8_ai , 0xfff8, 0x51d0, { 12, 12, 10, 10}},\r
- {m68k_op_sf_8_pi , 0xfff8, 0x51d8, { 12, 12, 10, 10}},\r
- {m68k_op_sf_8_pd , 0xfff8, 0x51e0, { 14, 14, 11, 11}},\r
- {m68k_op_sf_8_di , 0xfff8, 0x51e8, { 16, 16, 11, 11}},\r
- {m68k_op_sf_8_ix , 0xfff8, 0x51f0, { 18, 18, 13, 13}},\r
- {m68k_op_shi_8_d , 0xfff8, 0x52c0, { 4, 4, 4, 4}},\r
- {m68k_op_dbhi_16 , 0xfff8, 0x52c8, { 12, 12, 6, 6}},\r
- {m68k_op_shi_8_ai , 0xfff8, 0x52d0, { 12, 12, 10, 10}},\r
- {m68k_op_shi_8_pi , 0xfff8, 0x52d8, { 12, 12, 10, 10}},\r
- {m68k_op_shi_8_pd , 0xfff8, 0x52e0, { 14, 14, 11, 11}},\r
- {m68k_op_shi_8_di , 0xfff8, 0x52e8, { 16, 16, 11, 11}},\r
- {m68k_op_shi_8_ix , 0xfff8, 0x52f0, { 18, 18, 13, 13}},\r
- {m68k_op_sls_8_d , 0xfff8, 0x53c0, { 4, 4, 4, 4}},\r
- {m68k_op_dbls_16 , 0xfff8, 0x53c8, { 12, 12, 6, 6}},\r
- {m68k_op_sls_8_ai , 0xfff8, 0x53d0, { 12, 12, 10, 10}},\r
- {m68k_op_sls_8_pi , 0xfff8, 0x53d8, { 12, 12, 10, 10}},\r
- {m68k_op_sls_8_pd , 0xfff8, 0x53e0, { 14, 14, 11, 11}},\r
- {m68k_op_sls_8_di , 0xfff8, 0x53e8, { 16, 16, 11, 11}},\r
- {m68k_op_sls_8_ix , 0xfff8, 0x53f0, { 18, 18, 13, 13}},\r
- {m68k_op_scc_8_d , 0xfff8, 0x54c0, { 4, 4, 4, 4}},\r
- {m68k_op_dbcc_16 , 0xfff8, 0x54c8, { 12, 12, 6, 6}},\r
- {m68k_op_scc_8_ai , 0xfff8, 0x54d0, { 12, 12, 10, 10}},\r
- {m68k_op_scc_8_pi , 0xfff8, 0x54d8, { 12, 12, 10, 10}},\r
- {m68k_op_scc_8_pd , 0xfff8, 0x54e0, { 14, 14, 11, 11}},\r
- {m68k_op_scc_8_di , 0xfff8, 0x54e8, { 16, 16, 11, 11}},\r
- {m68k_op_scc_8_ix , 0xfff8, 0x54f0, { 18, 18, 13, 13}},\r
- {m68k_op_scs_8_d , 0xfff8, 0x55c0, { 4, 4, 4, 4}},\r
- {m68k_op_dbcs_16 , 0xfff8, 0x55c8, { 12, 12, 6, 6}},\r
- {m68k_op_scs_8_ai , 0xfff8, 0x55d0, { 12, 12, 10, 10}},\r
- {m68k_op_scs_8_pi , 0xfff8, 0x55d8, { 12, 12, 10, 10}},\r
- {m68k_op_scs_8_pd , 0xfff8, 0x55e0, { 14, 14, 11, 11}},\r
- {m68k_op_scs_8_di , 0xfff8, 0x55e8, { 16, 16, 11, 11}},\r
- {m68k_op_scs_8_ix , 0xfff8, 0x55f0, { 18, 18, 13, 13}},\r
- {m68k_op_sne_8_d , 0xfff8, 0x56c0, { 4, 4, 4, 4}},\r
- {m68k_op_dbne_16 , 0xfff8, 0x56c8, { 12, 12, 6, 6}},\r
- {m68k_op_sne_8_ai , 0xfff8, 0x56d0, { 12, 12, 10, 10}},\r
- {m68k_op_sne_8_pi , 0xfff8, 0x56d8, { 12, 12, 10, 10}},\r
- {m68k_op_sne_8_pd , 0xfff8, 0x56e0, { 14, 14, 11, 11}},\r
- {m68k_op_sne_8_di , 0xfff8, 0x56e8, { 16, 16, 11, 11}},\r
- {m68k_op_sne_8_ix , 0xfff8, 0x56f0, { 18, 18, 13, 13}},\r
- {m68k_op_seq_8_d , 0xfff8, 0x57c0, { 4, 4, 4, 4}},\r
- {m68k_op_dbeq_16 , 0xfff8, 0x57c8, { 12, 12, 6, 6}},\r
- {m68k_op_seq_8_ai , 0xfff8, 0x57d0, { 12, 12, 10, 10}},\r
- {m68k_op_seq_8_pi , 0xfff8, 0x57d8, { 12, 12, 10, 10}},\r
- {m68k_op_seq_8_pd , 0xfff8, 0x57e0, { 14, 14, 11, 11}},\r
- {m68k_op_seq_8_di , 0xfff8, 0x57e8, { 16, 16, 11, 11}},\r
- {m68k_op_seq_8_ix , 0xfff8, 0x57f0, { 18, 18, 13, 13}},\r
- {m68k_op_svc_8_d , 0xfff8, 0x58c0, { 4, 4, 4, 4}},\r
- {m68k_op_dbvc_16 , 0xfff8, 0x58c8, { 12, 12, 6, 6}},\r
- {m68k_op_svc_8_ai , 0xfff8, 0x58d0, { 12, 12, 10, 10}},\r
- {m68k_op_svc_8_pi , 0xfff8, 0x58d8, { 12, 12, 10, 10}},\r
- {m68k_op_svc_8_pd , 0xfff8, 0x58e0, { 14, 14, 11, 11}},\r
- {m68k_op_svc_8_di , 0xfff8, 0x58e8, { 16, 16, 11, 11}},\r
- {m68k_op_svc_8_ix , 0xfff8, 0x58f0, { 18, 18, 13, 13}},\r
- {m68k_op_svs_8_d , 0xfff8, 0x59c0, { 4, 4, 4, 4}},\r
- {m68k_op_dbvs_16 , 0xfff8, 0x59c8, { 12, 12, 6, 6}},\r
- {m68k_op_svs_8_ai , 0xfff8, 0x59d0, { 12, 12, 10, 10}},\r
- {m68k_op_svs_8_pi , 0xfff8, 0x59d8, { 12, 12, 10, 10}},\r
- {m68k_op_svs_8_pd , 0xfff8, 0x59e0, { 14, 14, 11, 11}},\r
- {m68k_op_svs_8_di , 0xfff8, 0x59e8, { 16, 16, 11, 11}},\r
- {m68k_op_svs_8_ix , 0xfff8, 0x59f0, { 18, 18, 13, 13}},\r
- {m68k_op_spl_8_d , 0xfff8, 0x5ac0, { 4, 4, 4, 4}},\r
- {m68k_op_dbpl_16 , 0xfff8, 0x5ac8, { 12, 12, 6, 6}},\r
- {m68k_op_spl_8_ai , 0xfff8, 0x5ad0, { 12, 12, 10, 10}},\r
- {m68k_op_spl_8_pi , 0xfff8, 0x5ad8, { 12, 12, 10, 10}},\r
- {m68k_op_spl_8_pd , 0xfff8, 0x5ae0, { 14, 14, 11, 11}},\r
- {m68k_op_spl_8_di , 0xfff8, 0x5ae8, { 16, 16, 11, 11}},\r
- {m68k_op_spl_8_ix , 0xfff8, 0x5af0, { 18, 18, 13, 13}},\r
- {m68k_op_smi_8_d , 0xfff8, 0x5bc0, { 4, 4, 4, 4}},\r
- {m68k_op_dbmi_16 , 0xfff8, 0x5bc8, { 12, 12, 6, 6}},\r
- {m68k_op_smi_8_ai , 0xfff8, 0x5bd0, { 12, 12, 10, 10}},\r
- {m68k_op_smi_8_pi , 0xfff8, 0x5bd8, { 12, 12, 10, 10}},\r
- {m68k_op_smi_8_pd , 0xfff8, 0x5be0, { 14, 14, 11, 11}},\r
- {m68k_op_smi_8_di , 0xfff8, 0x5be8, { 16, 16, 11, 11}},\r
- {m68k_op_smi_8_ix , 0xfff8, 0x5bf0, { 18, 18, 13, 13}},\r
- {m68k_op_sge_8_d , 0xfff8, 0x5cc0, { 4, 4, 4, 4}},\r
- {m68k_op_dbge_16 , 0xfff8, 0x5cc8, { 12, 12, 6, 6}},\r
- {m68k_op_sge_8_ai , 0xfff8, 0x5cd0, { 12, 12, 10, 10}},\r
- {m68k_op_sge_8_pi , 0xfff8, 0x5cd8, { 12, 12, 10, 10}},\r
- {m68k_op_sge_8_pd , 0xfff8, 0x5ce0, { 14, 14, 11, 11}},\r
- {m68k_op_sge_8_di , 0xfff8, 0x5ce8, { 16, 16, 11, 11}},\r
- {m68k_op_sge_8_ix , 0xfff8, 0x5cf0, { 18, 18, 13, 13}},\r
- {m68k_op_slt_8_d , 0xfff8, 0x5dc0, { 4, 4, 4, 4}},\r
- {m68k_op_dblt_16 , 0xfff8, 0x5dc8, { 12, 12, 6, 6}},\r
- {m68k_op_slt_8_ai , 0xfff8, 0x5dd0, { 12, 12, 10, 10}},\r
- {m68k_op_slt_8_pi , 0xfff8, 0x5dd8, { 12, 12, 10, 10}},\r
- {m68k_op_slt_8_pd , 0xfff8, 0x5de0, { 14, 14, 11, 11}},\r
- {m68k_op_slt_8_di , 0xfff8, 0x5de8, { 16, 16, 11, 11}},\r
- {m68k_op_slt_8_ix , 0xfff8, 0x5df0, { 18, 18, 13, 13}},\r
- {m68k_op_sgt_8_d , 0xfff8, 0x5ec0, { 4, 4, 4, 4}},\r
- {m68k_op_dbgt_16 , 0xfff8, 0x5ec8, { 12, 12, 6, 6}},\r
- {m68k_op_sgt_8_ai , 0xfff8, 0x5ed0, { 12, 12, 10, 10}},\r
- {m68k_op_sgt_8_pi , 0xfff8, 0x5ed8, { 12, 12, 10, 10}},\r
- {m68k_op_sgt_8_pd , 0xfff8, 0x5ee0, { 14, 14, 11, 11}},\r
- {m68k_op_sgt_8_di , 0xfff8, 0x5ee8, { 16, 16, 11, 11}},\r
- {m68k_op_sgt_8_ix , 0xfff8, 0x5ef0, { 18, 18, 13, 13}},\r
- {m68k_op_sle_8_d , 0xfff8, 0x5fc0, { 4, 4, 4, 4}},\r
- {m68k_op_dble_16 , 0xfff8, 0x5fc8, { 12, 12, 6, 6}},\r
- {m68k_op_sle_8_ai , 0xfff8, 0x5fd0, { 12, 12, 10, 10}},\r
- {m68k_op_sle_8_pi , 0xfff8, 0x5fd8, { 12, 12, 10, 10}},\r
- {m68k_op_sle_8_pd , 0xfff8, 0x5fe0, { 14, 14, 11, 11}},\r
- {m68k_op_sle_8_di , 0xfff8, 0x5fe8, { 16, 16, 11, 11}},\r
- {m68k_op_sle_8_ix , 0xfff8, 0x5ff0, { 18, 18, 13, 13}},\r
- {m68k_op_sbcd_8_mm_ax7 , 0xfff8, 0x8f08, { 18, 18, 16, 16}},\r
- {m68k_op_pack_16_mm_ax7 , 0xfff8, 0x8f48, { 0, 0, 13, 13}},\r
- {m68k_op_unpk_16_mm_ax7 , 0xfff8, 0x8f88, { 0, 0, 13, 13}},\r
- {m68k_op_subx_8_mm_ax7 , 0xfff8, 0x9f08, { 18, 18, 12, 12}},\r
- {m68k_op_cmpm_8_ax7 , 0xfff8, 0xbf08, { 12, 12, 9, 9}},\r
- {m68k_op_abcd_8_mm_ax7 , 0xfff8, 0xcf08, { 18, 18, 16, 16}},\r
- {m68k_op_addx_8_mm_ax7 , 0xfff8, 0xdf08, { 18, 18, 12, 12}},\r
- {m68k_op_asr_16_ai , 0xfff8, 0xe0d0, { 12, 12, 9, 9}},\r
- {m68k_op_asr_16_pi , 0xfff8, 0xe0d8, { 12, 12, 9, 9}},\r
- {m68k_op_asr_16_pd , 0xfff8, 0xe0e0, { 14, 14, 10, 10}},\r
- {m68k_op_asr_16_di , 0xfff8, 0xe0e8, { 16, 16, 10, 10}},\r
- {m68k_op_asr_16_ix , 0xfff8, 0xe0f0, { 18, 18, 12, 12}},\r
- {m68k_op_asl_16_ai , 0xfff8, 0xe1d0, { 12, 12, 10, 10}},\r
- {m68k_op_asl_16_pi , 0xfff8, 0xe1d8, { 12, 12, 10, 10}},\r
- {m68k_op_asl_16_pd , 0xfff8, 0xe1e0, { 14, 14, 11, 11}},\r
- {m68k_op_asl_16_di , 0xfff8, 0xe1e8, { 16, 16, 11, 11}},\r
- {m68k_op_asl_16_ix , 0xfff8, 0xe1f0, { 18, 18, 13, 13}},\r
- {m68k_op_lsr_16_ai , 0xfff8, 0xe2d0, { 12, 12, 9, 9}},\r
- {m68k_op_lsr_16_pi , 0xfff8, 0xe2d8, { 12, 12, 9, 9}},\r
- {m68k_op_lsr_16_pd , 0xfff8, 0xe2e0, { 14, 14, 10, 10}},\r
- {m68k_op_lsr_16_di , 0xfff8, 0xe2e8, { 16, 16, 10, 10}},\r
- {m68k_op_lsr_16_ix , 0xfff8, 0xe2f0, { 18, 18, 12, 12}},\r
- {m68k_op_lsl_16_ai , 0xfff8, 0xe3d0, { 12, 12, 9, 9}},\r
- {m68k_op_lsl_16_pi , 0xfff8, 0xe3d8, { 12, 12, 9, 9}},\r
- {m68k_op_lsl_16_pd , 0xfff8, 0xe3e0, { 14, 14, 10, 10}},\r
- {m68k_op_lsl_16_di , 0xfff8, 0xe3e8, { 16, 16, 10, 10}},\r
- {m68k_op_lsl_16_ix , 0xfff8, 0xe3f0, { 18, 18, 12, 12}},\r
- {m68k_op_roxr_16_ai , 0xfff8, 0xe4d0, { 12, 12, 9, 9}},\r
- {m68k_op_roxr_16_pi , 0xfff8, 0xe4d8, { 12, 12, 9, 9}},\r
- {m68k_op_roxr_16_pd , 0xfff8, 0xe4e0, { 14, 14, 10, 10}},\r
- {m68k_op_roxr_16_di , 0xfff8, 0xe4e8, { 16, 16, 10, 10}},\r
- {m68k_op_roxr_16_ix , 0xfff8, 0xe4f0, { 18, 18, 12, 12}},\r
- {m68k_op_roxl_16_ai , 0xfff8, 0xe5d0, { 12, 12, 9, 9}},\r
- {m68k_op_roxl_16_pi , 0xfff8, 0xe5d8, { 12, 12, 9, 9}},\r
- {m68k_op_roxl_16_pd , 0xfff8, 0xe5e0, { 14, 14, 10, 10}},\r
- {m68k_op_roxl_16_di , 0xfff8, 0xe5e8, { 16, 16, 10, 10}},\r
- {m68k_op_roxl_16_ix , 0xfff8, 0xe5f0, { 18, 18, 12, 12}},\r
- {m68k_op_ror_16_ai , 0xfff8, 0xe6d0, { 12, 12, 11, 11}},\r
- {m68k_op_ror_16_pi , 0xfff8, 0xe6d8, { 12, 12, 11, 11}},\r
- {m68k_op_ror_16_pd , 0xfff8, 0xe6e0, { 14, 14, 12, 12}},\r
- {m68k_op_ror_16_di , 0xfff8, 0xe6e8, { 16, 16, 12, 12}},\r
- {m68k_op_ror_16_ix , 0xfff8, 0xe6f0, { 18, 18, 14, 14}},\r
- {m68k_op_rol_16_ai , 0xfff8, 0xe7d0, { 12, 12, 11, 11}},\r
- {m68k_op_rol_16_pi , 0xfff8, 0xe7d8, { 12, 12, 11, 11}},\r
- {m68k_op_rol_16_pd , 0xfff8, 0xe7e0, { 14, 14, 12, 12}},\r
- {m68k_op_rol_16_di , 0xfff8, 0xe7e8, { 16, 16, 12, 12}},\r
- {m68k_op_rol_16_ix , 0xfff8, 0xe7f0, { 18, 18, 14, 14}},\r
- {m68k_op_bftst_32_d , 0xfff8, 0xe8c0, { 0, 0, 6, 6}},\r
- {m68k_op_bftst_32_ai , 0xfff8, 0xe8d0, { 0, 0, 17, 17}},\r
- {m68k_op_bftst_32_di , 0xfff8, 0xe8e8, { 0, 0, 18, 18}},\r
- {m68k_op_bftst_32_ix , 0xfff8, 0xe8f0, { 0, 0, 20, 20}},\r
- {m68k_op_bfextu_32_d , 0xfff8, 0xe9c0, { 0, 0, 8, 8}},\r
- {m68k_op_bfextu_32_ai , 0xfff8, 0xe9d0, { 0, 0, 19, 19}},\r
- {m68k_op_bfextu_32_di , 0xfff8, 0xe9e8, { 0, 0, 20, 20}},\r
- {m68k_op_bfextu_32_ix , 0xfff8, 0xe9f0, { 0, 0, 22, 22}},\r
- {m68k_op_bfchg_32_d , 0xfff8, 0xeac0, { 0, 0, 12, 12}},\r
- {m68k_op_bfchg_32_ai , 0xfff8, 0xead0, { 0, 0, 24, 24}},\r
- {m68k_op_bfchg_32_di , 0xfff8, 0xeae8, { 0, 0, 25, 25}},\r
- {m68k_op_bfchg_32_ix , 0xfff8, 0xeaf0, { 0, 0, 27, 27}},\r
- {m68k_op_bfexts_32_d , 0xfff8, 0xebc0, { 0, 0, 8, 8}},\r
- {m68k_op_bfexts_32_ai , 0xfff8, 0xebd0, { 0, 0, 19, 19}},\r
- {m68k_op_bfexts_32_di , 0xfff8, 0xebe8, { 0, 0, 20, 20}},\r
- {m68k_op_bfexts_32_ix , 0xfff8, 0xebf0, { 0, 0, 22, 22}},\r
- {m68k_op_bfclr_32_d , 0xfff8, 0xecc0, { 0, 0, 12, 12}},\r
- {m68k_op_bfclr_32_ai , 0xfff8, 0xecd0, { 0, 0, 24, 24}},\r
- {m68k_op_bfclr_32_di , 0xfff8, 0xece8, { 0, 0, 25, 25}},\r
- {m68k_op_bfclr_32_ix , 0xfff8, 0xecf0, { 0, 0, 27, 27}},\r
- {m68k_op_bfffo_32_d , 0xfff8, 0xedc0, { 0, 0, 18, 18}},\r
- {m68k_op_bfffo_32_ai , 0xfff8, 0xedd0, { 0, 0, 32, 32}},\r
- {m68k_op_bfffo_32_di , 0xfff8, 0xede8, { 0, 0, 33, 33}},\r
- {m68k_op_bfffo_32_ix , 0xfff8, 0xedf0, { 0, 0, 35, 35}},\r
- {m68k_op_bfset_32_d , 0xfff8, 0xeec0, { 0, 0, 12, 12}},\r
- {m68k_op_bfset_32_ai , 0xfff8, 0xeed0, { 0, 0, 24, 24}},\r
- {m68k_op_bfset_32_di , 0xfff8, 0xeee8, { 0, 0, 25, 25}},\r
- {m68k_op_bfset_32_ix , 0xfff8, 0xeef0, { 0, 0, 27, 27}},\r
- {m68k_op_bfins_32_d , 0xfff8, 0xefc0, { 0, 0, 10, 10}},\r
- {m68k_op_bfins_32_ai , 0xfff8, 0xefd0, { 0, 0, 21, 21}},\r
- {m68k_op_bfins_32_di , 0xfff8, 0xefe8, { 0, 0, 22, 22}},\r
- {m68k_op_bfins_32_ix , 0xfff8, 0xeff0, { 0, 0, 24, 24}},\r
- {m68k_op_move16_32 , 0xfff8, 0xf620, { 0, 0, 0, 4}},\r
- {m68k_op_ori_8_pi7 , 0xffff, 0x001f, { 16, 16, 8, 8}},\r
- {m68k_op_ori_8_pd7 , 0xffff, 0x0027, { 18, 18, 9, 9}},\r
- {m68k_op_ori_8_aw , 0xffff, 0x0038, { 20, 20, 8, 8}},\r
- {m68k_op_ori_8_al , 0xffff, 0x0039, { 24, 24, 8, 8}},\r
- {m68k_op_ori_16_toc , 0xffff, 0x003c, { 20, 16, 12, 12}},\r
- {m68k_op_ori_16_aw , 0xffff, 0x0078, { 20, 20, 8, 8}},\r
- {m68k_op_ori_16_al , 0xffff, 0x0079, { 24, 24, 8, 8}},\r
- {m68k_op_ori_16_tos , 0xffff, 0x007c, { 20, 16, 12, 12}},\r
- {m68k_op_ori_32_aw , 0xffff, 0x00b8, { 32, 32, 8, 8}},\r
- {m68k_op_ori_32_al , 0xffff, 0x00b9, { 36, 36, 8, 8}},\r
- {m68k_op_chk2cmp2_8_aw , 0xffff, 0x00f8, { 0, 0, 22, 22}},\r
- {m68k_op_chk2cmp2_8_al , 0xffff, 0x00f9, { 0, 0, 22, 22}},\r
- {m68k_op_chk2cmp2_8_pcdi , 0xffff, 0x00fa, { 0, 0, 23, 23}},\r
- {m68k_op_chk2cmp2_8_pcix , 0xffff, 0x00fb, { 0, 0, 23, 23}},\r
- {m68k_op_andi_8_pi7 , 0xffff, 0x021f, { 16, 16, 8, 8}},\r
- {m68k_op_andi_8_pd7 , 0xffff, 0x0227, { 18, 18, 9, 9}},\r
- {m68k_op_andi_8_aw , 0xffff, 0x0238, { 20, 20, 8, 8}},\r
- {m68k_op_andi_8_al , 0xffff, 0x0239, { 24, 24, 8, 8}},\r
- {m68k_op_andi_16_toc , 0xffff, 0x023c, { 20, 16, 12, 12}},\r
- {m68k_op_andi_16_aw , 0xffff, 0x0278, { 20, 20, 8, 8}},\r
- {m68k_op_andi_16_al , 0xffff, 0x0279, { 24, 24, 8, 8}},\r
- {m68k_op_andi_16_tos , 0xffff, 0x027c, { 20, 16, 12, 12}},\r
- {m68k_op_andi_32_aw , 0xffff, 0x02b8, { 32, 32, 8, 8}},\r
- {m68k_op_andi_32_al , 0xffff, 0x02b9, { 36, 36, 8, 8}},\r
- {m68k_op_chk2cmp2_16_aw , 0xffff, 0x02f8, { 0, 0, 22, 22}},\r
- {m68k_op_chk2cmp2_16_al , 0xffff, 0x02f9, { 0, 0, 22, 22}},\r
- {m68k_op_chk2cmp2_16_pcdi , 0xffff, 0x02fa, { 0, 0, 23, 23}},\r
- {m68k_op_chk2cmp2_16_pcix , 0xffff, 0x02fb, { 0, 0, 23, 23}},\r
- {m68k_op_subi_8_pi7 , 0xffff, 0x041f, { 16, 16, 8, 8}},\r
- {m68k_op_subi_8_pd7 , 0xffff, 0x0427, { 18, 18, 9, 9}},\r
- {m68k_op_subi_8_aw , 0xffff, 0x0438, { 20, 20, 8, 8}},\r
- {m68k_op_subi_8_al , 0xffff, 0x0439, { 24, 24, 8, 8}},\r
- {m68k_op_subi_16_aw , 0xffff, 0x0478, { 20, 20, 8, 8}},\r
- {m68k_op_subi_16_al , 0xffff, 0x0479, { 24, 24, 8, 8}},\r
- {m68k_op_subi_32_aw , 0xffff, 0x04b8, { 32, 32, 8, 8}},\r
- {m68k_op_subi_32_al , 0xffff, 0x04b9, { 36, 36, 8, 8}},\r
- {m68k_op_chk2cmp2_32_aw , 0xffff, 0x04f8, { 0, 0, 22, 22}},\r
- {m68k_op_chk2cmp2_32_al , 0xffff, 0x04f9, { 0, 0, 22, 22}},\r
- {m68k_op_chk2cmp2_32_pcdi , 0xffff, 0x04fa, { 0, 0, 23, 23}},\r
- {m68k_op_chk2cmp2_32_pcix , 0xffff, 0x04fb, { 0, 0, 23, 23}},\r
- {m68k_op_addi_8_pi7 , 0xffff, 0x061f, { 16, 16, 8, 8}},\r
- {m68k_op_addi_8_pd7 , 0xffff, 0x0627, { 18, 18, 9, 9}},\r
- {m68k_op_addi_8_aw , 0xffff, 0x0638, { 20, 20, 8, 8}},\r
- {m68k_op_addi_8_al , 0xffff, 0x0639, { 24, 24, 8, 8}},\r
- {m68k_op_addi_16_aw , 0xffff, 0x0678, { 20, 20, 8, 8}},\r
- {m68k_op_addi_16_al , 0xffff, 0x0679, { 24, 24, 8, 8}},\r
- {m68k_op_addi_32_aw , 0xffff, 0x06b8, { 32, 32, 8, 8}},\r
- {m68k_op_addi_32_al , 0xffff, 0x06b9, { 36, 36, 8, 8}},\r
- {m68k_op_callm_32_aw , 0xffff, 0x06f8, { 0, 0, 64, 64}},\r
- {m68k_op_callm_32_al , 0xffff, 0x06f9, { 0, 0, 64, 64}},\r
- {m68k_op_callm_32_pcdi , 0xffff, 0x06fa, { 0, 0, 65, 65}},\r
- {m68k_op_callm_32_pcix , 0xffff, 0x06fb, { 0, 0, 67, 67}},\r
- {m68k_op_btst_8_s_pi7 , 0xffff, 0x081f, { 12, 12, 8, 8}},\r
- {m68k_op_btst_8_s_pd7 , 0xffff, 0x0827, { 14, 14, 9, 9}},\r
- {m68k_op_btst_8_s_aw , 0xffff, 0x0838, { 16, 16, 8, 8}},\r
- {m68k_op_btst_8_s_al , 0xffff, 0x0839, { 20, 20, 8, 8}},\r
- {m68k_op_btst_8_s_pcdi , 0xffff, 0x083a, { 16, 16, 9, 9}},\r
- {m68k_op_btst_8_s_pcix , 0xffff, 0x083b, { 18, 18, 11, 11}},\r
- {m68k_op_bchg_8_s_pi7 , 0xffff, 0x085f, { 16, 16, 8, 8}},\r
- {m68k_op_bchg_8_s_pd7 , 0xffff, 0x0867, { 18, 18, 9, 9}},\r
- {m68k_op_bchg_8_s_aw , 0xffff, 0x0878, { 20, 20, 8, 8}},\r
- {m68k_op_bchg_8_s_al , 0xffff, 0x0879, { 24, 24, 8, 8}},\r
- {m68k_op_bclr_8_s_pi7 , 0xffff, 0x089f, { 16, 16, 8, 8}},\r
- {m68k_op_bclr_8_s_pd7 , 0xffff, 0x08a7, { 18, 18, 9, 9}},\r
- {m68k_op_bclr_8_s_aw , 0xffff, 0x08b8, { 20, 20, 8, 8}},\r
- {m68k_op_bclr_8_s_al , 0xffff, 0x08b9, { 24, 24, 8, 8}},\r
- {m68k_op_bset_8_s_pi7 , 0xffff, 0x08df, { 16, 16, 8, 8}},\r
- {m68k_op_bset_8_s_pd7 , 0xffff, 0x08e7, { 18, 18, 9, 9}},\r
- {m68k_op_bset_8_s_aw , 0xffff, 0x08f8, { 20, 20, 8, 8}},\r
- {m68k_op_bset_8_s_al , 0xffff, 0x08f9, { 24, 24, 8, 8}},\r
- {m68k_op_eori_8_pi7 , 0xffff, 0x0a1f, { 16, 16, 8, 8}},\r
- {m68k_op_eori_8_pd7 , 0xffff, 0x0a27, { 18, 18, 9, 9}},\r
- {m68k_op_eori_8_aw , 0xffff, 0x0a38, { 20, 20, 8, 8}},\r
- {m68k_op_eori_8_al , 0xffff, 0x0a39, { 24, 24, 8, 8}},\r
- {m68k_op_eori_16_toc , 0xffff, 0x0a3c, { 20, 16, 12, 12}},\r
- {m68k_op_eori_16_aw , 0xffff, 0x0a78, { 20, 20, 8, 8}},\r
- {m68k_op_eori_16_al , 0xffff, 0x0a79, { 24, 24, 8, 8}},\r
- {m68k_op_eori_16_tos , 0xffff, 0x0a7c, { 20, 16, 12, 12}},\r
- {m68k_op_eori_32_aw , 0xffff, 0x0ab8, { 32, 32, 8, 8}},\r
- {m68k_op_eori_32_al , 0xffff, 0x0ab9, { 36, 36, 8, 8}},\r
- {m68k_op_cas_8_pi7 , 0xffff, 0x0adf, { 0, 0, 16, 16}},\r
- {m68k_op_cas_8_pd7 , 0xffff, 0x0ae7, { 0, 0, 17, 17}},\r
- {m68k_op_cas_8_aw , 0xffff, 0x0af8, { 0, 0, 16, 16}},\r
- {m68k_op_cas_8_al , 0xffff, 0x0af9, { 0, 0, 16, 16}},\r
- {m68k_op_cmpi_8_pi7 , 0xffff, 0x0c1f, { 12, 12, 6, 6}},\r
- {m68k_op_cmpi_8_pd7 , 0xffff, 0x0c27, { 14, 14, 7, 7}},\r
- {m68k_op_cmpi_8_aw , 0xffff, 0x0c38, { 16, 16, 6, 6}},\r
- {m68k_op_cmpi_8_al , 0xffff, 0x0c39, { 20, 20, 6, 6}},\r
- {m68k_op_cmpi_8_pcdi , 0xffff, 0x0c3a, { 0, 0, 7, 7}},\r
- {m68k_op_cmpi_8_pcix , 0xffff, 0x0c3b, { 0, 0, 9, 9}},\r
- {m68k_op_cmpi_16_aw , 0xffff, 0x0c78, { 16, 16, 6, 6}},\r
- {m68k_op_cmpi_16_al , 0xffff, 0x0c79, { 20, 20, 6, 6}},\r
- {m68k_op_cmpi_16_pcdi , 0xffff, 0x0c7a, { 0, 0, 7, 7}},\r
- {m68k_op_cmpi_16_pcix , 0xffff, 0x0c7b, { 0, 0, 9, 9}},\r
- {m68k_op_cmpi_32_aw , 0xffff, 0x0cb8, { 24, 24, 6, 6}},\r
- {m68k_op_cmpi_32_al , 0xffff, 0x0cb9, { 28, 28, 6, 6}},\r
- {m68k_op_cmpi_32_pcdi , 0xffff, 0x0cba, { 0, 0, 7, 7}},\r
- {m68k_op_cmpi_32_pcix , 0xffff, 0x0cbb, { 0, 0, 9, 9}},\r
- {m68k_op_cas_16_aw , 0xffff, 0x0cf8, { 0, 0, 16, 16}},\r
- {m68k_op_cas_16_al , 0xffff, 0x0cf9, { 0, 0, 16, 16}},\r
- {m68k_op_cas2_16 , 0xffff, 0x0cfc, { 0, 0, 12, 12}},\r
- {m68k_op_moves_8_pi7 , 0xffff, 0x0e1f, { 0, 18, 9, 9}},\r
- {m68k_op_moves_8_pd7 , 0xffff, 0x0e27, { 0, 20, 10, 10}},\r
- {m68k_op_moves_8_aw , 0xffff, 0x0e38, { 0, 26, 9, 9}},\r
- {m68k_op_moves_8_al , 0xffff, 0x0e39, { 0, 30, 9, 9}},\r
- {m68k_op_moves_16_aw , 0xffff, 0x0e78, { 0, 26, 9, 9}},\r
- {m68k_op_moves_16_al , 0xffff, 0x0e79, { 0, 30, 9, 9}},\r
- {m68k_op_moves_32_aw , 0xffff, 0x0eb8, { 0, 32, 9, 9}},\r
- {m68k_op_moves_32_al , 0xffff, 0x0eb9, { 0, 36, 9, 9}},\r
- {m68k_op_cas_32_aw , 0xffff, 0x0ef8, { 0, 0, 16, 16}},\r
- {m68k_op_cas_32_al , 0xffff, 0x0ef9, { 0, 0, 16, 16}},\r
- {m68k_op_cas2_32 , 0xffff, 0x0efc, { 0, 0, 12, 12}},\r
- {m68k_op_move_8_aw_pi7 , 0xffff, 0x11df, { 16, 16, 8, 8}},\r
- {m68k_op_move_8_aw_pd7 , 0xffff, 0x11e7, { 18, 18, 9, 9}},\r
- {m68k_op_move_8_aw_aw , 0xffff, 0x11f8, { 20, 20, 8, 8}},\r
- {m68k_op_move_8_aw_al , 0xffff, 0x11f9, { 24, 24, 8, 8}},\r
- {m68k_op_move_8_aw_pcdi , 0xffff, 0x11fa, { 20, 20, 9, 9}},\r
- {m68k_op_move_8_aw_pcix , 0xffff, 0x11fb, { 22, 22, 11, 11}},\r
- {m68k_op_move_8_aw_i , 0xffff, 0x11fc, { 16, 16, 6, 6}},\r
- {m68k_op_move_8_al_pi7 , 0xffff, 0x13df, { 20, 20, 10, 10}},\r
- {m68k_op_move_8_al_pd7 , 0xffff, 0x13e7, { 22, 22, 11, 11}},\r
- {m68k_op_move_8_al_aw , 0xffff, 0x13f8, { 24, 24, 10, 10}},\r
- {m68k_op_move_8_al_al , 0xffff, 0x13f9, { 28, 28, 10, 10}},\r
- {m68k_op_move_8_al_pcdi , 0xffff, 0x13fa, { 24, 24, 11, 11}},\r
- {m68k_op_move_8_al_pcix , 0xffff, 0x13fb, { 26, 26, 13, 13}},\r
- {m68k_op_move_8_al_i , 0xffff, 0x13fc, { 20, 20, 8, 8}},\r
- {m68k_op_move_8_pi7_pi7 , 0xffff, 0x1edf, { 12, 12, 8, 8}},\r
- {m68k_op_move_8_pi7_pd7 , 0xffff, 0x1ee7, { 14, 14, 9, 9}},\r
- {m68k_op_move_8_pi7_aw , 0xffff, 0x1ef8, { 16, 16, 8, 8}},\r
- {m68k_op_move_8_pi7_al , 0xffff, 0x1ef9, { 20, 20, 8, 8}},\r
- {m68k_op_move_8_pi7_pcdi , 0xffff, 0x1efa, { 16, 16, 9, 9}},\r
- {m68k_op_move_8_pi7_pcix , 0xffff, 0x1efb, { 18, 18, 11, 11}},\r
- {m68k_op_move_8_pi7_i , 0xffff, 0x1efc, { 12, 12, 6, 6}},\r
- {m68k_op_move_8_pd7_pi7 , 0xffff, 0x1f1f, { 12, 12, 9, 9}},\r
- {m68k_op_move_8_pd7_pd7 , 0xffff, 0x1f27, { 14, 14, 10, 10}},\r
- {m68k_op_move_8_pd7_aw , 0xffff, 0x1f38, { 16, 16, 9, 9}},\r
- {m68k_op_move_8_pd7_al , 0xffff, 0x1f39, { 20, 20, 9, 9}},\r
- {m68k_op_move_8_pd7_pcdi , 0xffff, 0x1f3a, { 16, 16, 10, 10}},\r
- {m68k_op_move_8_pd7_pcix , 0xffff, 0x1f3b, { 18, 18, 12, 12}},\r
- {m68k_op_move_8_pd7_i , 0xffff, 0x1f3c, { 12, 12, 7, 7}},\r
- {m68k_op_move_32_aw_aw , 0xffff, 0x21f8, { 28, 28, 8, 8}},\r
- {m68k_op_move_32_aw_al , 0xffff, 0x21f9, { 32, 32, 8, 8}},\r
- {m68k_op_move_32_aw_pcdi , 0xffff, 0x21fa, { 28, 28, 9, 9}},\r
- {m68k_op_move_32_aw_pcix , 0xffff, 0x21fb, { 30, 30, 11, 11}},\r
- {m68k_op_move_32_aw_i , 0xffff, 0x21fc, { 24, 24, 8, 8}},\r
- {m68k_op_move_32_al_aw , 0xffff, 0x23f8, { 32, 32, 10, 10}},\r
- {m68k_op_move_32_al_al , 0xffff, 0x23f9, { 36, 36, 10, 10}},\r
- {m68k_op_move_32_al_pcdi , 0xffff, 0x23fa, { 32, 32, 11, 11}},\r
- {m68k_op_move_32_al_pcix , 0xffff, 0x23fb, { 34, 34, 13, 13}},\r
- {m68k_op_move_32_al_i , 0xffff, 0x23fc, { 28, 28, 10, 10}},\r
- {m68k_op_move_16_aw_aw , 0xffff, 0x31f8, { 20, 20, 8, 8}},\r
- {m68k_op_move_16_aw_al , 0xffff, 0x31f9, { 24, 24, 8, 8}},\r
- {m68k_op_move_16_aw_pcdi , 0xffff, 0x31fa, { 20, 20, 9, 9}},\r
- {m68k_op_move_16_aw_pcix , 0xffff, 0x31fb, { 22, 22, 11, 11}},\r
- {m68k_op_move_16_aw_i , 0xffff, 0x31fc, { 16, 16, 6, 6}},\r
- {m68k_op_move_16_al_aw , 0xffff, 0x33f8, { 24, 24, 10, 10}},\r
- {m68k_op_move_16_al_al , 0xffff, 0x33f9, { 28, 28, 10, 10}},\r
- {m68k_op_move_16_al_pcdi , 0xffff, 0x33fa, { 24, 24, 11, 11}},\r
- {m68k_op_move_16_al_pcix , 0xffff, 0x33fb, { 26, 26, 13, 13}},\r
- {m68k_op_move_16_al_i , 0xffff, 0x33fc, { 20, 20, 8, 8}},\r
- {m68k_op_negx_8_pi7 , 0xffff, 0x401f, { 12, 12, 8, 8}},\r
- {m68k_op_negx_8_pd7 , 0xffff, 0x4027, { 14, 14, 9, 9}},\r
- {m68k_op_negx_8_aw , 0xffff, 0x4038, { 16, 16, 8, 8}},\r
- {m68k_op_negx_8_al , 0xffff, 0x4039, { 20, 20, 8, 8}},\r
- {m68k_op_negx_16_aw , 0xffff, 0x4078, { 16, 16, 8, 8}},\r
- {m68k_op_negx_16_al , 0xffff, 0x4079, { 20, 20, 8, 8}},\r
- {m68k_op_negx_32_aw , 0xffff, 0x40b8, { 24, 24, 8, 8}},\r
- {m68k_op_negx_32_al , 0xffff, 0x40b9, { 28, 28, 8, 8}},\r
- {m68k_op_move_16_frs_aw , 0xffff, 0x40f8, { 16, 16, 12, 12}},\r
- {m68k_op_move_16_frs_al , 0xffff, 0x40f9, { 20, 20, 12, 12}},\r
- {m68k_op_clr_8_pi7 , 0xffff, 0x421f, { 10, 8, 8, 8}},\r
- {m68k_op_clr_8_pd7 , 0xffff, 0x4227, { 12, 10, 9, 9}},\r
- {m68k_op_clr_8_aw , 0xffff, 0x4238, { 14, 12, 8, 8}},\r
- {m68k_op_clr_8_al , 0xffff, 0x4239, { 18, 14, 8, 8}},\r
- {m68k_op_clr_16_aw , 0xffff, 0x4278, { 14, 12, 8, 8}},\r
- {m68k_op_clr_16_al , 0xffff, 0x4279, { 18, 14, 8, 8}},\r
- {m68k_op_clr_32_aw , 0xffff, 0x42b8, { 24, 16, 8, 8}},\r
- {m68k_op_clr_32_al , 0xffff, 0x42b9, { 28, 20, 8, 8}},\r
- {m68k_op_move_16_frc_aw , 0xffff, 0x42f8, { 0, 16, 8, 8}},\r
- {m68k_op_move_16_frc_al , 0xffff, 0x42f9, { 0, 20, 8, 8}},\r
- {m68k_op_neg_8_pi7 , 0xffff, 0x441f, { 12, 12, 8, 8}},\r
- {m68k_op_neg_8_pd7 , 0xffff, 0x4427, { 14, 14, 9, 9}},\r
- {m68k_op_neg_8_aw , 0xffff, 0x4438, { 16, 16, 8, 8}},\r
- {m68k_op_neg_8_al , 0xffff, 0x4439, { 20, 20, 8, 8}},\r
- {m68k_op_neg_16_aw , 0xffff, 0x4478, { 16, 16, 8, 8}},\r
- {m68k_op_neg_16_al , 0xffff, 0x4479, { 20, 20, 8, 8}},\r
- {m68k_op_neg_32_aw , 0xffff, 0x44b8, { 24, 24, 8, 8}},\r
- {m68k_op_neg_32_al , 0xffff, 0x44b9, { 28, 28, 8, 8}},\r
- {m68k_op_move_16_toc_aw , 0xffff, 0x44f8, { 20, 20, 8, 8}},\r
- {m68k_op_move_16_toc_al , 0xffff, 0x44f9, { 24, 24, 8, 8}},\r
- {m68k_op_move_16_toc_pcdi , 0xffff, 0x44fa, { 20, 20, 9, 9}},\r
- {m68k_op_move_16_toc_pcix , 0xffff, 0x44fb, { 22, 22, 11, 11}},\r
- {m68k_op_move_16_toc_i , 0xffff, 0x44fc, { 16, 16, 6, 6}},\r
- {m68k_op_not_8_pi7 , 0xffff, 0x461f, { 12, 12, 8, 8}},\r
- {m68k_op_not_8_pd7 , 0xffff, 0x4627, { 14, 14, 9, 9}},\r
- {m68k_op_not_8_aw , 0xffff, 0x4638, { 16, 16, 8, 8}},\r
- {m68k_op_not_8_al , 0xffff, 0x4639, { 20, 20, 8, 8}},\r
- {m68k_op_not_16_aw , 0xffff, 0x4678, { 16, 16, 8, 8}},\r
- {m68k_op_not_16_al , 0xffff, 0x4679, { 20, 20, 8, 8}},\r
- {m68k_op_not_32_aw , 0xffff, 0x46b8, { 24, 24, 8, 8}},\r
- {m68k_op_not_32_al , 0xffff, 0x46b9, { 28, 28, 8, 8}},\r
- {m68k_op_move_16_tos_aw , 0xffff, 0x46f8, { 20, 20, 12, 12}},\r
- {m68k_op_move_16_tos_al , 0xffff, 0x46f9, { 24, 24, 12, 12}},\r
- {m68k_op_move_16_tos_pcdi , 0xffff, 0x46fa, { 20, 20, 13, 13}},\r
- {m68k_op_move_16_tos_pcix , 0xffff, 0x46fb, { 22, 22, 15, 15}},\r
- {m68k_op_move_16_tos_i , 0xffff, 0x46fc, { 16, 16, 10, 10}},\r
- {m68k_op_link_32_a7 , 0xffff, 0x480f, { 0, 0, 6, 6}},\r
- {m68k_op_nbcd_8_pi7 , 0xffff, 0x481f, { 12, 12, 10, 10}},\r
- {m68k_op_nbcd_8_pd7 , 0xffff, 0x4827, { 14, 14, 11, 11}},\r
- {m68k_op_nbcd_8_aw , 0xffff, 0x4838, { 16, 16, 10, 10}},\r
- {m68k_op_nbcd_8_al , 0xffff, 0x4839, { 20, 20, 10, 10}},\r
- {m68k_op_pea_32_aw , 0xffff, 0x4878, { 16, 16, 9, 9}},\r
- {m68k_op_pea_32_al , 0xffff, 0x4879, { 20, 20, 9, 9}},\r
- {m68k_op_pea_32_pcdi , 0xffff, 0x487a, { 16, 16, 10, 10}},\r
- {m68k_op_pea_32_pcix , 0xffff, 0x487b, { 20, 20, 12, 12}},\r
- {m68k_op_movem_16_re_aw , 0xffff, 0x48b8, { 12, 12, 8, 8}},\r
- {m68k_op_movem_16_re_al , 0xffff, 0x48b9, { 16, 16, 8, 8}},\r
- {m68k_op_movem_32_re_aw , 0xffff, 0x48f8, { 12, 12, 8, 8}},\r
- {m68k_op_movem_32_re_al , 0xffff, 0x48f9, { 16, 16, 8, 8}},\r
- {m68k_op_tst_8_pi7 , 0xffff, 0x4a1f, { 8, 8, 6, 6}},\r
- {m68k_op_tst_8_pd7 , 0xffff, 0x4a27, { 10, 10, 7, 7}},\r
- {m68k_op_tst_8_aw , 0xffff, 0x4a38, { 12, 12, 6, 6}},\r
- {m68k_op_tst_8_al , 0xffff, 0x4a39, { 16, 16, 6, 6}},\r
- {m68k_op_tst_8_pcdi , 0xffff, 0x4a3a, { 0, 0, 7, 7}},\r
- {m68k_op_tst_8_pcix , 0xffff, 0x4a3b, { 0, 0, 9, 9}},\r
- {m68k_op_tst_8_i , 0xffff, 0x4a3c, { 0, 0, 6, 6}},\r
- {m68k_op_tst_16_aw , 0xffff, 0x4a78, { 12, 12, 6, 6}},\r
- {m68k_op_tst_16_al , 0xffff, 0x4a79, { 16, 16, 6, 6}},\r
- {m68k_op_tst_16_pcdi , 0xffff, 0x4a7a, { 0, 0, 7, 7}},\r
- {m68k_op_tst_16_pcix , 0xffff, 0x4a7b, { 0, 0, 9, 9}},\r
- {m68k_op_tst_16_i , 0xffff, 0x4a7c, { 0, 0, 6, 6}},\r
- {m68k_op_tst_32_aw , 0xffff, 0x4ab8, { 16, 16, 6, 6}},\r
- {m68k_op_tst_32_al , 0xffff, 0x4ab9, { 20, 20, 6, 6}},\r
- {m68k_op_tst_32_pcdi , 0xffff, 0x4aba, { 0, 0, 7, 7}},\r
- {m68k_op_tst_32_pcix , 0xffff, 0x4abb, { 0, 0, 9, 9}},\r
- {m68k_op_tst_32_i , 0xffff, 0x4abc, { 0, 0, 6, 6}},\r
- {m68k_op_tas_8_pi7 , 0xffff, 0x4adf, { 18, 18, 16, 16}},\r
- {m68k_op_tas_8_pd7 , 0xffff, 0x4ae7, { 20, 20, 17, 17}},\r
- {m68k_op_tas_8_aw , 0xffff, 0x4af8, { 22, 22, 16, 16}},\r
- {m68k_op_tas_8_al , 0xffff, 0x4af9, { 26, 26, 16, 16}},\r
- {m68k_op_illegal , 0xffff, 0x4afc, { 4, 4, 4, 4}},\r
- {m68k_op_mull_32_aw , 0xffff, 0x4c38, { 0, 0, 47, 47}},\r
- {m68k_op_mull_32_al , 0xffff, 0x4c39, { 0, 0, 47, 47}},\r
- {m68k_op_mull_32_pcdi , 0xffff, 0x4c3a, { 0, 0, 48, 48}},\r
- {m68k_op_mull_32_pcix , 0xffff, 0x4c3b, { 0, 0, 50, 50}},\r
- {m68k_op_mull_32_i , 0xffff, 0x4c3c, { 0, 0, 47, 47}},\r
- {m68k_op_divl_32_aw , 0xffff, 0x4c78, { 0, 0, 88, 88}},\r
- {m68k_op_divl_32_al , 0xffff, 0x4c79, { 0, 0, 88, 88}},\r
- {m68k_op_divl_32_pcdi , 0xffff, 0x4c7a, { 0, 0, 89, 89}},\r
- {m68k_op_divl_32_pcix , 0xffff, 0x4c7b, { 0, 0, 91, 91}},\r
- {m68k_op_divl_32_i , 0xffff, 0x4c7c, { 0, 0, 88, 88}},\r
- {m68k_op_movem_16_er_aw , 0xffff, 0x4cb8, { 16, 16, 12, 12}},\r
- {m68k_op_movem_16_er_al , 0xffff, 0x4cb9, { 20, 20, 12, 12}},\r
- {m68k_op_movem_16_er_pcdi , 0xffff, 0x4cba, { 16, 16, 9, 9}},\r
- {m68k_op_movem_16_er_pcix , 0xffff, 0x4cbb, { 18, 18, 11, 11}},\r
- {m68k_op_movem_32_er_aw , 0xffff, 0x4cf8, { 16, 16, 12, 12}},\r
- {m68k_op_movem_32_er_al , 0xffff, 0x4cf9, { 20, 20, 12, 12}},\r
- {m68k_op_movem_32_er_pcdi , 0xffff, 0x4cfa, { 16, 16, 9, 9}},\r
- {m68k_op_movem_32_er_pcix , 0xffff, 0x4cfb, { 18, 18, 11, 11}},\r
- {m68k_op_link_16_a7 , 0xffff, 0x4e57, { 16, 16, 5, 5}},\r
- {m68k_op_unlk_32_a7 , 0xffff, 0x4e5f, { 12, 12, 6, 6}},\r
- {m68k_op_reset , 0xffff, 0x4e70, { 0, 0, 0, 0}},\r
- {m68k_op_nop , 0xffff, 0x4e71, { 4, 4, 2, 2}},\r
- {m68k_op_stop , 0xffff, 0x4e72, { 4, 4, 8, 8}},\r
- {m68k_op_rte_32 , 0xffff, 0x4e73, { 20, 24, 20, 20}},\r
- {m68k_op_rtd_32 , 0xffff, 0x4e74, { 0, 16, 10, 10}},\r
- {m68k_op_rts_32 , 0xffff, 0x4e75, { 16, 16, 10, 10}},\r
- {m68k_op_trapv , 0xffff, 0x4e76, { 4, 4, 4, 4}},\r
- {m68k_op_rtr_32 , 0xffff, 0x4e77, { 20, 20, 14, 14}},\r
- {m68k_op_movec_32_cr , 0xffff, 0x4e7a, { 0, 12, 6, 6}},\r
- {m68k_op_movec_32_rc , 0xffff, 0x4e7b, { 0, 10, 12, 12}},\r
- {m68k_op_jsr_32_aw , 0xffff, 0x4eb8, { 18, 18, 4, 4}},\r
- {m68k_op_jsr_32_al , 0xffff, 0x4eb9, { 20, 20, 4, 4}},\r
- {m68k_op_jsr_32_pcdi , 0xffff, 0x4eba, { 18, 18, 5, 5}},\r
- {m68k_op_jsr_32_pcix , 0xffff, 0x4ebb, { 22, 22, 7, 7}},\r
- {m68k_op_jmp_32_aw , 0xffff, 0x4ef8, { 10, 10, 4, 4}},\r
- {m68k_op_jmp_32_al , 0xffff, 0x4ef9, { 12, 12, 4, 4}},\r
- {m68k_op_jmp_32_pcdi , 0xffff, 0x4efa, { 10, 10, 5, 5}},\r
- {m68k_op_jmp_32_pcix , 0xffff, 0x4efb, { 14, 14, 7, 7}},\r
- {m68k_op_st_8_pi7 , 0xffff, 0x50df, { 12, 12, 10, 10}},\r
- {m68k_op_st_8_pd7 , 0xffff, 0x50e7, { 14, 14, 11, 11}},\r
- {m68k_op_st_8_aw , 0xffff, 0x50f8, { 16, 16, 10, 10}},\r
- {m68k_op_st_8_al , 0xffff, 0x50f9, { 20, 20, 10, 10}},\r
- {m68k_op_trapt_16 , 0xffff, 0x50fa, { 0, 0, 6, 6}},\r
- {m68k_op_trapt_32 , 0xffff, 0x50fb, { 0, 0, 8, 8}},\r
- {m68k_op_trapt , 0xffff, 0x50fc, { 0, 0, 4, 4}},\r
- {m68k_op_sf_8_pi7 , 0xffff, 0x51df, { 12, 12, 10, 10}},\r
- {m68k_op_sf_8_pd7 , 0xffff, 0x51e7, { 14, 14, 11, 11}},\r
- {m68k_op_sf_8_aw , 0xffff, 0x51f8, { 16, 16, 10, 10}},\r
- {m68k_op_sf_8_al , 0xffff, 0x51f9, { 20, 20, 10, 10}},\r
- {m68k_op_trapf_16 , 0xffff, 0x51fa, { 0, 0, 6, 6}},\r
- {m68k_op_trapf_32 , 0xffff, 0x51fb, { 0, 0, 8, 8}},\r
- {m68k_op_trapf , 0xffff, 0x51fc, { 0, 0, 4, 4}},\r
- {m68k_op_shi_8_pi7 , 0xffff, 0x52df, { 12, 12, 10, 10}},\r
- {m68k_op_shi_8_pd7 , 0xffff, 0x52e7, { 14, 14, 11, 11}},\r
- {m68k_op_shi_8_aw , 0xffff, 0x52f8, { 16, 16, 10, 10}},\r
- {m68k_op_shi_8_al , 0xffff, 0x52f9, { 20, 20, 10, 10}},\r
- {m68k_op_traphi_16 , 0xffff, 0x52fa, { 0, 0, 6, 6}},\r
- {m68k_op_traphi_32 , 0xffff, 0x52fb, { 0, 0, 8, 8}},\r
- {m68k_op_traphi , 0xffff, 0x52fc, { 0, 0, 4, 4}},\r
- {m68k_op_sls_8_pi7 , 0xffff, 0x53df, { 12, 12, 10, 10}},\r
- {m68k_op_sls_8_pd7 , 0xffff, 0x53e7, { 14, 14, 11, 11}},\r
- {m68k_op_sls_8_aw , 0xffff, 0x53f8, { 16, 16, 10, 10}},\r
- {m68k_op_sls_8_al , 0xffff, 0x53f9, { 20, 20, 10, 10}},\r
- {m68k_op_trapls_16 , 0xffff, 0x53fa, { 0, 0, 6, 6}},\r
- {m68k_op_trapls_32 , 0xffff, 0x53fb, { 0, 0, 8, 8}},\r
- {m68k_op_trapls , 0xffff, 0x53fc, { 0, 0, 4, 4}},\r
- {m68k_op_scc_8_pi7 , 0xffff, 0x54df, { 12, 12, 10, 10}},\r
- {m68k_op_scc_8_pd7 , 0xffff, 0x54e7, { 14, 14, 11, 11}},\r
- {m68k_op_scc_8_aw , 0xffff, 0x54f8, { 16, 16, 10, 10}},\r
- {m68k_op_scc_8_al , 0xffff, 0x54f9, { 20, 20, 10, 10}},\r
- {m68k_op_trapcc_16 , 0xffff, 0x54fa, { 0, 0, 6, 6}},\r
- {m68k_op_trapcc_32 , 0xffff, 0x54fb, { 0, 0, 8, 8}},\r
- {m68k_op_trapcc , 0xffff, 0x54fc, { 0, 0, 4, 4}},\r
- {m68k_op_scs_8_pi7 , 0xffff, 0x55df, { 12, 12, 10, 10}},\r
- {m68k_op_scs_8_pd7 , 0xffff, 0x55e7, { 14, 14, 11, 11}},\r
- {m68k_op_scs_8_aw , 0xffff, 0x55f8, { 16, 16, 10, 10}},\r
- {m68k_op_scs_8_al , 0xffff, 0x55f9, { 20, 20, 10, 10}},\r
- {m68k_op_trapcs_16 , 0xffff, 0x55fa, { 0, 0, 6, 6}},\r
- {m68k_op_trapcs_32 , 0xffff, 0x55fb, { 0, 0, 8, 8}},\r
- {m68k_op_trapcs , 0xffff, 0x55fc, { 0, 0, 4, 4}},\r
- {m68k_op_sne_8_pi7 , 0xffff, 0x56df, { 12, 12, 10, 10}},\r
- {m68k_op_sne_8_pd7 , 0xffff, 0x56e7, { 14, 14, 11, 11}},\r
- {m68k_op_sne_8_aw , 0xffff, 0x56f8, { 16, 16, 10, 10}},\r
- {m68k_op_sne_8_al , 0xffff, 0x56f9, { 20, 20, 10, 10}},\r
- {m68k_op_trapne_16 , 0xffff, 0x56fa, { 0, 0, 6, 6}},\r
- {m68k_op_trapne_32 , 0xffff, 0x56fb, { 0, 0, 8, 8}},\r
- {m68k_op_trapne , 0xffff, 0x56fc, { 0, 0, 4, 4}},\r
- {m68k_op_seq_8_pi7 , 0xffff, 0x57df, { 12, 12, 10, 10}},\r
- {m68k_op_seq_8_pd7 , 0xffff, 0x57e7, { 14, 14, 11, 11}},\r
- {m68k_op_seq_8_aw , 0xffff, 0x57f8, { 16, 16, 10, 10}},\r
- {m68k_op_seq_8_al , 0xffff, 0x57f9, { 20, 20, 10, 10}},\r
- {m68k_op_trapeq_16 , 0xffff, 0x57fa, { 0, 0, 6, 6}},\r
- {m68k_op_trapeq_32 , 0xffff, 0x57fb, { 0, 0, 8, 8}},\r
- {m68k_op_trapeq , 0xffff, 0x57fc, { 0, 0, 4, 4}},\r
- {m68k_op_svc_8_pi7 , 0xffff, 0x58df, { 12, 12, 10, 10}},\r
- {m68k_op_svc_8_pd7 , 0xffff, 0x58e7, { 14, 14, 11, 11}},\r
- {m68k_op_svc_8_aw , 0xffff, 0x58f8, { 16, 16, 10, 10}},\r
- {m68k_op_svc_8_al , 0xffff, 0x58f9, { 20, 20, 10, 10}},\r
- {m68k_op_trapvc_16 , 0xffff, 0x58fa, { 0, 0, 6, 6}},\r
- {m68k_op_trapvc_32 , 0xffff, 0x58fb, { 0, 0, 8, 8}},\r
- {m68k_op_trapvc , 0xffff, 0x58fc, { 0, 0, 4, 4}},\r
- {m68k_op_svs_8_pi7 , 0xffff, 0x59df, { 12, 12, 10, 10}},\r
- {m68k_op_svs_8_pd7 , 0xffff, 0x59e7, { 14, 14, 11, 11}},\r
- {m68k_op_svs_8_aw , 0xffff, 0x59f8, { 16, 16, 10, 10}},\r
- {m68k_op_svs_8_al , 0xffff, 0x59f9, { 20, 20, 10, 10}},\r
- {m68k_op_trapvs_16 , 0xffff, 0x59fa, { 0, 0, 6, 6}},\r
- {m68k_op_trapvs_32 , 0xffff, 0x59fb, { 0, 0, 8, 8}},\r
- {m68k_op_trapvs , 0xffff, 0x59fc, { 0, 0, 4, 4}},\r
- {m68k_op_spl_8_pi7 , 0xffff, 0x5adf, { 12, 12, 10, 10}},\r
- {m68k_op_spl_8_pd7 , 0xffff, 0x5ae7, { 14, 14, 11, 11}},\r
- {m68k_op_spl_8_aw , 0xffff, 0x5af8, { 16, 16, 10, 10}},\r
- {m68k_op_spl_8_al , 0xffff, 0x5af9, { 20, 20, 10, 10}},\r
- {m68k_op_trappl_16 , 0xffff, 0x5afa, { 0, 0, 6, 6}},\r
- {m68k_op_trappl_32 , 0xffff, 0x5afb, { 0, 0, 8, 8}},\r
- {m68k_op_trappl , 0xffff, 0x5afc, { 0, 0, 4, 4}},\r
- {m68k_op_smi_8_pi7 , 0xffff, 0x5bdf, { 12, 12, 10, 10}},\r
- {m68k_op_smi_8_pd7 , 0xffff, 0x5be7, { 14, 14, 11, 11}},\r
- {m68k_op_smi_8_aw , 0xffff, 0x5bf8, { 16, 16, 10, 10}},\r
- {m68k_op_smi_8_al , 0xffff, 0x5bf9, { 20, 20, 10, 10}},\r
- {m68k_op_trapmi_16 , 0xffff, 0x5bfa, { 0, 0, 6, 6}},\r
- {m68k_op_trapmi_32 , 0xffff, 0x5bfb, { 0, 0, 8, 8}},\r
- {m68k_op_trapmi , 0xffff, 0x5bfc, { 0, 0, 4, 4}},\r
- {m68k_op_sge_8_pi7 , 0xffff, 0x5cdf, { 12, 12, 10, 10}},\r
- {m68k_op_sge_8_pd7 , 0xffff, 0x5ce7, { 14, 14, 11, 11}},\r
- {m68k_op_sge_8_aw , 0xffff, 0x5cf8, { 16, 16, 10, 10}},\r
- {m68k_op_sge_8_al , 0xffff, 0x5cf9, { 20, 20, 10, 10}},\r
- {m68k_op_trapge_16 , 0xffff, 0x5cfa, { 0, 0, 6, 6}},\r
- {m68k_op_trapge_32 , 0xffff, 0x5cfb, { 0, 0, 8, 8}},\r
- {m68k_op_trapge , 0xffff, 0x5cfc, { 0, 0, 4, 4}},\r
- {m68k_op_slt_8_pi7 , 0xffff, 0x5ddf, { 12, 12, 10, 10}},\r
- {m68k_op_slt_8_pd7 , 0xffff, 0x5de7, { 14, 14, 11, 11}},\r
- {m68k_op_slt_8_aw , 0xffff, 0x5df8, { 16, 16, 10, 10}},\r
- {m68k_op_slt_8_al , 0xffff, 0x5df9, { 20, 20, 10, 10}},\r
- {m68k_op_traplt_16 , 0xffff, 0x5dfa, { 0, 0, 6, 6}},\r
- {m68k_op_traplt_32 , 0xffff, 0x5dfb, { 0, 0, 8, 8}},\r
- {m68k_op_traplt , 0xffff, 0x5dfc, { 0, 0, 4, 4}},\r
- {m68k_op_sgt_8_pi7 , 0xffff, 0x5edf, { 12, 12, 10, 10}},\r
- {m68k_op_sgt_8_pd7 , 0xffff, 0x5ee7, { 14, 14, 11, 11}},\r
- {m68k_op_sgt_8_aw , 0xffff, 0x5ef8, { 16, 16, 10, 10}},\r
- {m68k_op_sgt_8_al , 0xffff, 0x5ef9, { 20, 20, 10, 10}},\r
- {m68k_op_trapgt_16 , 0xffff, 0x5efa, { 0, 0, 6, 6}},\r
- {m68k_op_trapgt_32 , 0xffff, 0x5efb, { 0, 0, 8, 8}},\r
- {m68k_op_trapgt , 0xffff, 0x5efc, { 0, 0, 4, 4}},\r
- {m68k_op_sle_8_pi7 , 0xffff, 0x5fdf, { 12, 12, 10, 10}},\r
- {m68k_op_sle_8_pd7 , 0xffff, 0x5fe7, { 14, 14, 11, 11}},\r
- {m68k_op_sle_8_aw , 0xffff, 0x5ff8, { 16, 16, 10, 10}},\r
- {m68k_op_sle_8_al , 0xffff, 0x5ff9, { 20, 20, 10, 10}},\r
- {m68k_op_traple_16 , 0xffff, 0x5ffa, { 0, 0, 6, 6}},\r
- {m68k_op_traple_32 , 0xffff, 0x5ffb, { 0, 0, 8, 8}},\r
- {m68k_op_traple , 0xffff, 0x5ffc, { 0, 0, 4, 4}},\r
- {m68k_op_bra_16 , 0xffff, 0x6000, { 10, 10, 10, 10}},\r
- {m68k_op_bra_32 , 0xffff, 0x60ff, { 10, 10, 10, 10}},\r
- {m68k_op_bsr_16 , 0xffff, 0x6100, { 18, 18, 7, 7}},\r
- {m68k_op_bsr_32 , 0xffff, 0x61ff, { 18, 18, 7, 7}},\r
- {m68k_op_bhi_16 , 0xffff, 0x6200, { 10, 10, 6, 6}},\r
- {m68k_op_bhi_32 , 0xffff, 0x62ff, { 10, 10, 6, 6}},\r
- {m68k_op_bls_16 , 0xffff, 0x6300, { 10, 10, 6, 6}},\r
- {m68k_op_bls_32 , 0xffff, 0x63ff, { 10, 10, 6, 6}},\r
- {m68k_op_bcc_16 , 0xffff, 0x6400, { 10, 10, 6, 6}},\r
- {m68k_op_bcc_32 , 0xffff, 0x64ff, { 10, 10, 6, 6}},\r
- {m68k_op_bcs_16 , 0xffff, 0x6500, { 10, 10, 6, 6}},\r
- {m68k_op_bcs_32 , 0xffff, 0x65ff, { 10, 10, 6, 6}},\r
- {m68k_op_bne_16 , 0xffff, 0x6600, { 10, 10, 6, 6}},\r
- {m68k_op_bne_32 , 0xffff, 0x66ff, { 10, 10, 6, 6}},\r
- {m68k_op_beq_16 , 0xffff, 0x6700, { 10, 10, 6, 6}},\r
- {m68k_op_beq_32 , 0xffff, 0x67ff, { 10, 10, 6, 6}},\r
- {m68k_op_bvc_16 , 0xffff, 0x6800, { 10, 10, 6, 6}},\r
- {m68k_op_bvc_32 , 0xffff, 0x68ff, { 10, 10, 6, 6}},\r
- {m68k_op_bvs_16 , 0xffff, 0x6900, { 10, 10, 6, 6}},\r
- {m68k_op_bvs_32 , 0xffff, 0x69ff, { 10, 10, 6, 6}},\r
- {m68k_op_bpl_16 , 0xffff, 0x6a00, { 10, 10, 6, 6}},\r
- {m68k_op_bpl_32 , 0xffff, 0x6aff, { 10, 10, 6, 6}},\r
- {m68k_op_bmi_16 , 0xffff, 0x6b00, { 10, 10, 6, 6}},\r
- {m68k_op_bmi_32 , 0xffff, 0x6bff, { 10, 10, 6, 6}},\r
- {m68k_op_bge_16 , 0xffff, 0x6c00, { 10, 10, 6, 6}},\r
- {m68k_op_bge_32 , 0xffff, 0x6cff, { 10, 10, 6, 6}},\r
- {m68k_op_blt_16 , 0xffff, 0x6d00, { 10, 10, 6, 6}},\r
- {m68k_op_blt_32 , 0xffff, 0x6dff, { 10, 10, 6, 6}},\r
- {m68k_op_bgt_16 , 0xffff, 0x6e00, { 10, 10, 6, 6}},\r
- {m68k_op_bgt_32 , 0xffff, 0x6eff, { 10, 10, 6, 6}},\r
- {m68k_op_ble_16 , 0xffff, 0x6f00, { 10, 10, 6, 6}},\r
- {m68k_op_ble_32 , 0xffff, 0x6fff, { 10, 10, 6, 6}},\r
- {m68k_op_sbcd_8_mm_axy7 , 0xffff, 0x8f0f, { 18, 18, 16, 16}},\r
- {m68k_op_pack_16_mm_axy7 , 0xffff, 0x8f4f, { 0, 0, 13, 13}},\r
- {m68k_op_unpk_16_mm_axy7 , 0xffff, 0x8f8f, { 0, 0, 13, 13}},\r
- {m68k_op_subx_8_mm_axy7 , 0xffff, 0x9f0f, { 18, 18, 12, 12}},\r
- {m68k_op_cmpm_8_axy7 , 0xffff, 0xbf0f, { 12, 12, 9, 9}},\r
- {m68k_op_abcd_8_mm_axy7 , 0xffff, 0xcf0f, { 18, 18, 16, 16}},\r
- {m68k_op_addx_8_mm_axy7 , 0xffff, 0xdf0f, { 18, 18, 12, 12}},\r
- {m68k_op_asr_16_aw , 0xffff, 0xe0f8, { 16, 16, 9, 9}},\r
- {m68k_op_asr_16_al , 0xffff, 0xe0f9, { 20, 20, 9, 9}},\r
- {m68k_op_asl_16_aw , 0xffff, 0xe1f8, { 16, 16, 10, 10}},\r
- {m68k_op_asl_16_al , 0xffff, 0xe1f9, { 20, 20, 10, 10}},\r
- {m68k_op_lsr_16_aw , 0xffff, 0xe2f8, { 16, 16, 9, 9}},\r
- {m68k_op_lsr_16_al , 0xffff, 0xe2f9, { 20, 20, 9, 9}},\r
- {m68k_op_lsl_16_aw , 0xffff, 0xe3f8, { 16, 16, 9, 9}},\r
- {m68k_op_lsl_16_al , 0xffff, 0xe3f9, { 20, 20, 9, 9}},\r
- {m68k_op_roxr_16_aw , 0xffff, 0xe4f8, { 16, 16, 9, 9}},\r
- {m68k_op_roxr_16_al , 0xffff, 0xe4f9, { 20, 20, 9, 9}},\r
- {m68k_op_roxl_16_aw , 0xffff, 0xe5f8, { 16, 16, 9, 9}},\r
- {m68k_op_roxl_16_al , 0xffff, 0xe5f9, { 20, 20, 9, 9}},\r
- {m68k_op_ror_16_aw , 0xffff, 0xe6f8, { 16, 16, 11, 11}},\r
- {m68k_op_ror_16_al , 0xffff, 0xe6f9, { 20, 20, 11, 11}},\r
- {m68k_op_rol_16_aw , 0xffff, 0xe7f8, { 16, 16, 11, 11}},\r
- {m68k_op_rol_16_al , 0xffff, 0xe7f9, { 20, 20, 11, 11}},\r
- {m68k_op_bftst_32_aw , 0xffff, 0xe8f8, { 0, 0, 17, 17}},\r
- {m68k_op_bftst_32_al , 0xffff, 0xe8f9, { 0, 0, 17, 17}},\r
- {m68k_op_bftst_32_pcdi , 0xffff, 0xe8fa, { 0, 0, 18, 18}},\r
- {m68k_op_bftst_32_pcix , 0xffff, 0xe8fb, { 0, 0, 20, 20}},\r
- {m68k_op_bfextu_32_aw , 0xffff, 0xe9f8, { 0, 0, 19, 19}},\r
- {m68k_op_bfextu_32_al , 0xffff, 0xe9f9, { 0, 0, 19, 19}},\r
- {m68k_op_bfextu_32_pcdi , 0xffff, 0xe9fa, { 0, 0, 20, 20}},\r
- {m68k_op_bfextu_32_pcix , 0xffff, 0xe9fb, { 0, 0, 22, 22}},\r
- {m68k_op_bfchg_32_aw , 0xffff, 0xeaf8, { 0, 0, 24, 24}},\r
- {m68k_op_bfchg_32_al , 0xffff, 0xeaf9, { 0, 0, 24, 24}},\r
- {m68k_op_bfexts_32_aw , 0xffff, 0xebf8, { 0, 0, 19, 19}},\r
- {m68k_op_bfexts_32_al , 0xffff, 0xebf9, { 0, 0, 19, 19}},\r
- {m68k_op_bfexts_32_pcdi , 0xffff, 0xebfa, { 0, 0, 20, 20}},\r
- {m68k_op_bfexts_32_pcix , 0xffff, 0xebfb, { 0, 0, 22, 22}},\r
- {m68k_op_bfclr_32_aw , 0xffff, 0xecf8, { 0, 0, 24, 24}},\r
- {m68k_op_bfclr_32_al , 0xffff, 0xecf9, { 0, 0, 24, 24}},\r
- {m68k_op_bfffo_32_aw , 0xffff, 0xedf8, { 0, 0, 32, 32}},\r
- {m68k_op_bfffo_32_al , 0xffff, 0xedf9, { 0, 0, 32, 32}},\r
- {m68k_op_bfffo_32_pcdi , 0xffff, 0xedfa, { 0, 0, 33, 33}},\r
- {m68k_op_bfffo_32_pcix , 0xffff, 0xedfb, { 0, 0, 35, 35}},\r
- {m68k_op_bfset_32_aw , 0xffff, 0xeef8, { 0, 0, 24, 24}},\r
- {m68k_op_bfset_32_al , 0xffff, 0xeef9, { 0, 0, 24, 24}},\r
- {m68k_op_bfins_32_aw , 0xffff, 0xeff8, { 0, 0, 21, 21}},\r
- {m68k_op_bfins_32_al , 0xffff, 0xeff9, { 0, 0, 21, 21}},\r
- {m68k_op_pflush_32 , 0xffff, 0xf518, { 0, 0, 0, 4}},\r
- {0, 0, 0, {0, 0, 0, 0}}\r
-};\r
-\r
-\r
-/* Build the opcode handler jump table */\r
-void m68ki_build_opcode_table(void)\r
-{\r
- opcode_handler_struct *ostruct;\r
- int instr;\r
- int i;\r
- int j;\r
- int k;\r
-\r
- for(i = 0; i < 0x10000; i++)\r
- {\r
- /* default to illegal */\r
- m68ki_instruction_jump_table[i] = m68k_op_illegal;\r
- for(k=0;k<NUM_CPU_TYPES;k++)\r
- m68ki_cycles[k][i] = 0;\r
- }\r
-\r
- ostruct = m68k_opcode_handler_table;\r
- while(ostruct->mask != 0xff00)\r
- {\r
- for(i = 0;i < 0x10000;i++)\r
- {\r
- if((i & ostruct->mask) == ostruct->match)\r
- {\r
- m68ki_instruction_jump_table[i] = ostruct->opcode_handler;\r
- for(k=0;k<NUM_CPU_TYPES;k++)\r
- m68ki_cycles[k][i] = ostruct->cycles[k];\r
- }\r
- }\r
- ostruct++;\r
- }\r
- while(ostruct->mask == 0xff00)\r
- {\r
- for(i = 0;i <= 0xff;i++)\r
- {\r
- m68ki_instruction_jump_table[ostruct->match | i] = ostruct->opcode_handler;\r
- for(k=0;k<NUM_CPU_TYPES;k++)\r
- m68ki_cycles[k][ostruct->match | i] = ostruct->cycles[k];\r
- }\r
- ostruct++;\r
- }\r
- while(ostruct->mask == 0xf1f8)\r
- {\r
- for(i = 0;i < 8;i++)\r
- {\r
- for(j = 0;j < 8;j++)\r
- {\r
- instr = ostruct->match | (i << 9) | j;\r
- m68ki_instruction_jump_table[instr] = ostruct->opcode_handler;\r
- for(k=0;k<NUM_CPU_TYPES;k++)\r
- m68ki_cycles[k][instr] = ostruct->cycles[k];\r
- }\r
- }\r
- ostruct++;\r
- }\r
- while(ostruct->mask == 0xfff0)\r
- {\r
- for(i = 0;i <= 0x0f;i++)\r
- {\r
- m68ki_instruction_jump_table[ostruct->match | i] = ostruct->opcode_handler;\r
- for(k=0;k<NUM_CPU_TYPES;k++)\r
- m68ki_cycles[k][ostruct->match | i] = ostruct->cycles[k];\r
- }\r
- ostruct++;\r
- }\r
- while(ostruct->mask == 0xf1ff)\r
- {\r
- for(i = 0;i <= 0x07;i++)\r
- {\r
- m68ki_instruction_jump_table[ostruct->match | (i << 9)] = ostruct->opcode_handler;\r
- for(k=0;k<NUM_CPU_TYPES;k++)\r
- m68ki_cycles[k][ostruct->match | (i << 9)] = ostruct->cycles[k];\r
- }\r
- ostruct++;\r
- }\r
- while(ostruct->mask == 0xfff8)\r
- {\r
- for(i = 0;i <= 0x07;i++)\r
- {\r
- m68ki_instruction_jump_table[ostruct->match | i] = ostruct->opcode_handler;\r
- for(k=0;k<NUM_CPU_TYPES;k++)\r
- m68ki_cycles[k][ostruct->match | i] = ostruct->cycles[k];\r
- }\r
- ostruct++;\r
- }\r
- while(ostruct->mask == 0xffff)\r
- {\r
- m68ki_instruction_jump_table[ostruct->match] = ostruct->opcode_handler;\r
- for(k=0;k<NUM_CPU_TYPES;k++)\r
- m68ki_cycles[k][ostruct->match] = ostruct->cycles[k];\r
- ostruct++;\r
- }\r
-}\r
-\r
-\r
-/* ======================================================================== */\r
-/* ============================== END OF FILE ============================= */\r
-/* ======================================================================== */\r
-\r
-\r
+++ /dev/null
-#ifndef M68KOPS__HEADER\r
-#define M68KOPS__HEADER\r
-\r
-/* ======================================================================== */\r
-/* ============================ OPCODE HANDLERS =========================== */\r
-/* ======================================================================== */\r
-\r
-\r
-void m68k_op_1010(void);\r
-void m68k_op_1111(void);\r
-void m68k_op_abcd_8_rr(void);\r
-void m68k_op_abcd_8_mm_ax7(void);\r
-void m68k_op_abcd_8_mm_ay7(void);\r
-void m68k_op_abcd_8_mm_axy7(void);\r
-void m68k_op_abcd_8_mm(void);\r
-void m68k_op_add_8_er_d(void);\r
-void m68k_op_add_8_er_ai(void);\r
-void m68k_op_add_8_er_pi(void);\r
-void m68k_op_add_8_er_pi7(void);\r
-void m68k_op_add_8_er_pd(void);\r
-void m68k_op_add_8_er_pd7(void);\r
-void m68k_op_add_8_er_di(void);\r
-void m68k_op_add_8_er_ix(void);\r
-void m68k_op_add_8_er_aw(void);\r
-void m68k_op_add_8_er_al(void);\r
-void m68k_op_add_8_er_pcdi(void);\r
-void m68k_op_add_8_er_pcix(void);\r
-void m68k_op_add_8_er_i(void);\r
-void m68k_op_add_16_er_d(void);\r
-void m68k_op_add_16_er_a(void);\r
-void m68k_op_add_16_er_ai(void);\r
-void m68k_op_add_16_er_pi(void);\r
-void m68k_op_add_16_er_pd(void);\r
-void m68k_op_add_16_er_di(void);\r
-void m68k_op_add_16_er_ix(void);\r
-void m68k_op_add_16_er_aw(void);\r
-void m68k_op_add_16_er_al(void);\r
-void m68k_op_add_16_er_pcdi(void);\r
-void m68k_op_add_16_er_pcix(void);\r
-void m68k_op_add_16_er_i(void);\r
-void m68k_op_add_32_er_d(void);\r
-void m68k_op_add_32_er_a(void);\r
-void m68k_op_add_32_er_ai(void);\r
-void m68k_op_add_32_er_pi(void);\r
-void m68k_op_add_32_er_pd(void);\r
-void m68k_op_add_32_er_di(void);\r
-void m68k_op_add_32_er_ix(void);\r
-void m68k_op_add_32_er_aw(void);\r
-void m68k_op_add_32_er_al(void);\r
-void m68k_op_add_32_er_pcdi(void);\r
-void m68k_op_add_32_er_pcix(void);\r
-void m68k_op_add_32_er_i(void);\r
-void m68k_op_add_8_re_ai(void);\r
-void m68k_op_add_8_re_pi(void);\r
-void m68k_op_add_8_re_pi7(void);\r
-void m68k_op_add_8_re_pd(void);\r
-void m68k_op_add_8_re_pd7(void);\r
-void m68k_op_add_8_re_di(void);\r
-void m68k_op_add_8_re_ix(void);\r
-void m68k_op_add_8_re_aw(void);\r
-void m68k_op_add_8_re_al(void);\r
-void m68k_op_add_16_re_ai(void);\r
-void m68k_op_add_16_re_pi(void);\r
-void m68k_op_add_16_re_pd(void);\r
-void m68k_op_add_16_re_di(void);\r
-void m68k_op_add_16_re_ix(void);\r
-void m68k_op_add_16_re_aw(void);\r
-void m68k_op_add_16_re_al(void);\r
-void m68k_op_add_32_re_ai(void);\r
-void m68k_op_add_32_re_pi(void);\r
-void m68k_op_add_32_re_pd(void);\r
-void m68k_op_add_32_re_di(void);\r
-void m68k_op_add_32_re_ix(void);\r
-void m68k_op_add_32_re_aw(void);\r
-void m68k_op_add_32_re_al(void);\r
-void m68k_op_adda_16_d(void);\r
-void m68k_op_adda_16_a(void);\r
-void m68k_op_adda_16_ai(void);\r
-void m68k_op_adda_16_pi(void);\r
-void m68k_op_adda_16_pd(void);\r
-void m68k_op_adda_16_di(void);\r
-void m68k_op_adda_16_ix(void);\r
-void m68k_op_adda_16_aw(void);\r
-void m68k_op_adda_16_al(void);\r
-void m68k_op_adda_16_pcdi(void);\r
-void m68k_op_adda_16_pcix(void);\r
-void m68k_op_adda_16_i(void);\r
-void m68k_op_adda_32_d(void);\r
-void m68k_op_adda_32_a(void);\r
-void m68k_op_adda_32_ai(void);\r
-void m68k_op_adda_32_pi(void);\r
-void m68k_op_adda_32_pd(void);\r
-void m68k_op_adda_32_di(void);\r
-void m68k_op_adda_32_ix(void);\r
-void m68k_op_adda_32_aw(void);\r
-void m68k_op_adda_32_al(void);\r
-void m68k_op_adda_32_pcdi(void);\r
-void m68k_op_adda_32_pcix(void);\r
-void m68k_op_adda_32_i(void);\r
-void m68k_op_addi_8_d(void);\r
-void m68k_op_addi_8_ai(void);\r
-void m68k_op_addi_8_pi(void);\r
-void m68k_op_addi_8_pi7(void);\r
-void m68k_op_addi_8_pd(void);\r
-void m68k_op_addi_8_pd7(void);\r
-void m68k_op_addi_8_di(void);\r
-void m68k_op_addi_8_ix(void);\r
-void m68k_op_addi_8_aw(void);\r
-void m68k_op_addi_8_al(void);\r
-void m68k_op_addi_16_d(void);\r
-void m68k_op_addi_16_ai(void);\r
-void m68k_op_addi_16_pi(void);\r
-void m68k_op_addi_16_pd(void);\r
-void m68k_op_addi_16_di(void);\r
-void m68k_op_addi_16_ix(void);\r
-void m68k_op_addi_16_aw(void);\r
-void m68k_op_addi_16_al(void);\r
-void m68k_op_addi_32_d(void);\r
-void m68k_op_addi_32_ai(void);\r
-void m68k_op_addi_32_pi(void);\r
-void m68k_op_addi_32_pd(void);\r
-void m68k_op_addi_32_di(void);\r
-void m68k_op_addi_32_ix(void);\r
-void m68k_op_addi_32_aw(void);\r
-void m68k_op_addi_32_al(void);\r
-void m68k_op_addq_8_d(void);\r
-void m68k_op_addq_8_ai(void);\r
-void m68k_op_addq_8_pi(void);\r
-void m68k_op_addq_8_pi7(void);\r
-void m68k_op_addq_8_pd(void);\r
-void m68k_op_addq_8_pd7(void);\r
-void m68k_op_addq_8_di(void);\r
-void m68k_op_addq_8_ix(void);\r
-void m68k_op_addq_8_aw(void);\r
-void m68k_op_addq_8_al(void);\r
-void m68k_op_addq_16_d(void);\r
-void m68k_op_addq_16_a(void);\r
-void m68k_op_addq_16_ai(void);\r
-void m68k_op_addq_16_pi(void);\r
-void m68k_op_addq_16_pd(void);\r
-void m68k_op_addq_16_di(void);\r
-void m68k_op_addq_16_ix(void);\r
-void m68k_op_addq_16_aw(void);\r
-void m68k_op_addq_16_al(void);\r
-void m68k_op_addq_32_d(void);\r
-void m68k_op_addq_32_a(void);\r
-void m68k_op_addq_32_ai(void);\r
-void m68k_op_addq_32_pi(void);\r
-void m68k_op_addq_32_pd(void);\r
-void m68k_op_addq_32_di(void);\r
-void m68k_op_addq_32_ix(void);\r
-void m68k_op_addq_32_aw(void);\r
-void m68k_op_addq_32_al(void);\r
-void m68k_op_addx_8_rr(void);\r
-void m68k_op_addx_16_rr(void);\r
-void m68k_op_addx_32_rr(void);\r
-void m68k_op_addx_8_mm_ax7(void);\r
-void m68k_op_addx_8_mm_ay7(void);\r
-void m68k_op_addx_8_mm_axy7(void);\r
-void m68k_op_addx_8_mm(void);\r
-void m68k_op_addx_16_mm(void);\r
-void m68k_op_addx_32_mm(void);\r
-void m68k_op_and_8_er_d(void);\r
-void m68k_op_and_8_er_ai(void);\r
-void m68k_op_and_8_er_pi(void);\r
-void m68k_op_and_8_er_pi7(void);\r
-void m68k_op_and_8_er_pd(void);\r
-void m68k_op_and_8_er_pd7(void);\r
-void m68k_op_and_8_er_di(void);\r
-void m68k_op_and_8_er_ix(void);\r
-void m68k_op_and_8_er_aw(void);\r
-void m68k_op_and_8_er_al(void);\r
-void m68k_op_and_8_er_pcdi(void);\r
-void m68k_op_and_8_er_pcix(void);\r
-void m68k_op_and_8_er_i(void);\r
-void m68k_op_and_16_er_d(void);\r
-void m68k_op_and_16_er_ai(void);\r
-void m68k_op_and_16_er_pi(void);\r
-void m68k_op_and_16_er_pd(void);\r
-void m68k_op_and_16_er_di(void);\r
-void m68k_op_and_16_er_ix(void);\r
-void m68k_op_and_16_er_aw(void);\r
-void m68k_op_and_16_er_al(void);\r
-void m68k_op_and_16_er_pcdi(void);\r
-void m68k_op_and_16_er_pcix(void);\r
-void m68k_op_and_16_er_i(void);\r
-void m68k_op_and_32_er_d(void);\r
-void m68k_op_and_32_er_ai(void);\r
-void m68k_op_and_32_er_pi(void);\r
-void m68k_op_and_32_er_pd(void);\r
-void m68k_op_and_32_er_di(void);\r
-void m68k_op_and_32_er_ix(void);\r
-void m68k_op_and_32_er_aw(void);\r
-void m68k_op_and_32_er_al(void);\r
-void m68k_op_and_32_er_pcdi(void);\r
-void m68k_op_and_32_er_pcix(void);\r
-void m68k_op_and_32_er_i(void);\r
-void m68k_op_and_8_re_ai(void);\r
-void m68k_op_and_8_re_pi(void);\r
-void m68k_op_and_8_re_pi7(void);\r
-void m68k_op_and_8_re_pd(void);\r
-void m68k_op_and_8_re_pd7(void);\r
-void m68k_op_and_8_re_di(void);\r
-void m68k_op_and_8_re_ix(void);\r
-void m68k_op_and_8_re_aw(void);\r
-void m68k_op_and_8_re_al(void);\r
-void m68k_op_and_16_re_ai(void);\r
-void m68k_op_and_16_re_pi(void);\r
-void m68k_op_and_16_re_pd(void);\r
-void m68k_op_and_16_re_di(void);\r
-void m68k_op_and_16_re_ix(void);\r
-void m68k_op_and_16_re_aw(void);\r
-void m68k_op_and_16_re_al(void);\r
-void m68k_op_and_32_re_ai(void);\r
-void m68k_op_and_32_re_pi(void);\r
-void m68k_op_and_32_re_pd(void);\r
-void m68k_op_and_32_re_di(void);\r
-void m68k_op_and_32_re_ix(void);\r
-void m68k_op_and_32_re_aw(void);\r
-void m68k_op_and_32_re_al(void);\r
-void m68k_op_andi_8_d(void);\r
-void m68k_op_andi_8_ai(void);\r
-void m68k_op_andi_8_pi(void);\r
-void m68k_op_andi_8_pi7(void);\r
-void m68k_op_andi_8_pd(void);\r
-void m68k_op_andi_8_pd7(void);\r
-void m68k_op_andi_8_di(void);\r
-void m68k_op_andi_8_ix(void);\r
-void m68k_op_andi_8_aw(void);\r
-void m68k_op_andi_8_al(void);\r
-void m68k_op_andi_16_d(void);\r
-void m68k_op_andi_16_ai(void);\r
-void m68k_op_andi_16_pi(void);\r
-void m68k_op_andi_16_pd(void);\r
-void m68k_op_andi_16_di(void);\r
-void m68k_op_andi_16_ix(void);\r
-void m68k_op_andi_16_aw(void);\r
-void m68k_op_andi_16_al(void);\r
-void m68k_op_andi_32_d(void);\r
-void m68k_op_andi_32_ai(void);\r
-void m68k_op_andi_32_pi(void);\r
-void m68k_op_andi_32_pd(void);\r
-void m68k_op_andi_32_di(void);\r
-void m68k_op_andi_32_ix(void);\r
-void m68k_op_andi_32_aw(void);\r
-void m68k_op_andi_32_al(void);\r
-void m68k_op_andi_16_toc(void);\r
-void m68k_op_andi_16_tos(void);\r
-void m68k_op_asr_8_s(void);\r
-void m68k_op_asr_16_s(void);\r
-void m68k_op_asr_32_s(void);\r
-void m68k_op_asr_8_r(void);\r
-void m68k_op_asr_16_r(void);\r
-void m68k_op_asr_32_r(void);\r
-void m68k_op_asr_16_ai(void);\r
-void m68k_op_asr_16_pi(void);\r
-void m68k_op_asr_16_pd(void);\r
-void m68k_op_asr_16_di(void);\r
-void m68k_op_asr_16_ix(void);\r
-void m68k_op_asr_16_aw(void);\r
-void m68k_op_asr_16_al(void);\r
-void m68k_op_asl_8_s(void);\r
-void m68k_op_asl_16_s(void);\r
-void m68k_op_asl_32_s(void);\r
-void m68k_op_asl_8_r(void);\r
-void m68k_op_asl_16_r(void);\r
-void m68k_op_asl_32_r(void);\r
-void m68k_op_asl_16_ai(void);\r
-void m68k_op_asl_16_pi(void);\r
-void m68k_op_asl_16_pd(void);\r
-void m68k_op_asl_16_di(void);\r
-void m68k_op_asl_16_ix(void);\r
-void m68k_op_asl_16_aw(void);\r
-void m68k_op_asl_16_al(void);\r
-void m68k_op_bhi_8(void);\r
-void m68k_op_bls_8(void);\r
-void m68k_op_bcc_8(void);\r
-void m68k_op_bcs_8(void);\r
-void m68k_op_bne_8(void);\r
-void m68k_op_beq_8(void);\r
-void m68k_op_bvc_8(void);\r
-void m68k_op_bvs_8(void);\r
-void m68k_op_bpl_8(void);\r
-void m68k_op_bmi_8(void);\r
-void m68k_op_bge_8(void);\r
-void m68k_op_blt_8(void);\r
-void m68k_op_bgt_8(void);\r
-void m68k_op_ble_8(void);\r
-void m68k_op_bhi_16(void);\r
-void m68k_op_bls_16(void);\r
-void m68k_op_bcc_16(void);\r
-void m68k_op_bcs_16(void);\r
-void m68k_op_bne_16(void);\r
-void m68k_op_beq_16(void);\r
-void m68k_op_bvc_16(void);\r
-void m68k_op_bvs_16(void);\r
-void m68k_op_bpl_16(void);\r
-void m68k_op_bmi_16(void);\r
-void m68k_op_bge_16(void);\r
-void m68k_op_blt_16(void);\r
-void m68k_op_bgt_16(void);\r
-void m68k_op_ble_16(void);\r
-void m68k_op_bhi_32(void);\r
-void m68k_op_bls_32(void);\r
-void m68k_op_bcc_32(void);\r
-void m68k_op_bcs_32(void);\r
-void m68k_op_bne_32(void);\r
-void m68k_op_beq_32(void);\r
-void m68k_op_bvc_32(void);\r
-void m68k_op_bvs_32(void);\r
-void m68k_op_bpl_32(void);\r
-void m68k_op_bmi_32(void);\r
-void m68k_op_bge_32(void);\r
-void m68k_op_blt_32(void);\r
-void m68k_op_bgt_32(void);\r
-void m68k_op_ble_32(void);\r
-void m68k_op_bchg_32_r_d(void);\r
-void m68k_op_bchg_8_r_ai(void);\r
-void m68k_op_bchg_8_r_pi(void);\r
-void m68k_op_bchg_8_r_pi7(void);\r
-void m68k_op_bchg_8_r_pd(void);\r
-void m68k_op_bchg_8_r_pd7(void);\r
-void m68k_op_bchg_8_r_di(void);\r
-void m68k_op_bchg_8_r_ix(void);\r
-void m68k_op_bchg_8_r_aw(void);\r
-void m68k_op_bchg_8_r_al(void);\r
-void m68k_op_bchg_32_s_d(void);\r
-void m68k_op_bchg_8_s_ai(void);\r
-void m68k_op_bchg_8_s_pi(void);\r
-void m68k_op_bchg_8_s_pi7(void);\r
-void m68k_op_bchg_8_s_pd(void);\r
-void m68k_op_bchg_8_s_pd7(void);\r
-void m68k_op_bchg_8_s_di(void);\r
-void m68k_op_bchg_8_s_ix(void);\r
-void m68k_op_bchg_8_s_aw(void);\r
-void m68k_op_bchg_8_s_al(void);\r
-void m68k_op_bclr_32_r_d(void);\r
-void m68k_op_bclr_8_r_ai(void);\r
-void m68k_op_bclr_8_r_pi(void);\r
-void m68k_op_bclr_8_r_pi7(void);\r
-void m68k_op_bclr_8_r_pd(void);\r
-void m68k_op_bclr_8_r_pd7(void);\r
-void m68k_op_bclr_8_r_di(void);\r
-void m68k_op_bclr_8_r_ix(void);\r
-void m68k_op_bclr_8_r_aw(void);\r
-void m68k_op_bclr_8_r_al(void);\r
-void m68k_op_bclr_32_s_d(void);\r
-void m68k_op_bclr_8_s_ai(void);\r
-void m68k_op_bclr_8_s_pi(void);\r
-void m68k_op_bclr_8_s_pi7(void);\r
-void m68k_op_bclr_8_s_pd(void);\r
-void m68k_op_bclr_8_s_pd7(void);\r
-void m68k_op_bclr_8_s_di(void);\r
-void m68k_op_bclr_8_s_ix(void);\r
-void m68k_op_bclr_8_s_aw(void);\r
-void m68k_op_bclr_8_s_al(void);\r
-void m68k_op_bfchg_32_d(void);\r
-void m68k_op_bfchg_32_ai(void);\r
-void m68k_op_bfchg_32_di(void);\r
-void m68k_op_bfchg_32_ix(void);\r
-void m68k_op_bfchg_32_aw(void);\r
-void m68k_op_bfchg_32_al(void);\r
-void m68k_op_bfclr_32_d(void);\r
-void m68k_op_bfclr_32_ai(void);\r
-void m68k_op_bfclr_32_di(void);\r
-void m68k_op_bfclr_32_ix(void);\r
-void m68k_op_bfclr_32_aw(void);\r
-void m68k_op_bfclr_32_al(void);\r
-void m68k_op_bfexts_32_d(void);\r
-void m68k_op_bfexts_32_ai(void);\r
-void m68k_op_bfexts_32_di(void);\r
-void m68k_op_bfexts_32_ix(void);\r
-void m68k_op_bfexts_32_aw(void);\r
-void m68k_op_bfexts_32_al(void);\r
-void m68k_op_bfexts_32_pcdi(void);\r
-void m68k_op_bfexts_32_pcix(void);\r
-void m68k_op_bfextu_32_d(void);\r
-void m68k_op_bfextu_32_ai(void);\r
-void m68k_op_bfextu_32_di(void);\r
-void m68k_op_bfextu_32_ix(void);\r
-void m68k_op_bfextu_32_aw(void);\r
-void m68k_op_bfextu_32_al(void);\r
-void m68k_op_bfextu_32_pcdi(void);\r
-void m68k_op_bfextu_32_pcix(void);\r
-void m68k_op_bfffo_32_d(void);\r
-void m68k_op_bfffo_32_ai(void);\r
-void m68k_op_bfffo_32_di(void);\r
-void m68k_op_bfffo_32_ix(void);\r
-void m68k_op_bfffo_32_aw(void);\r
-void m68k_op_bfffo_32_al(void);\r
-void m68k_op_bfffo_32_pcdi(void);\r
-void m68k_op_bfffo_32_pcix(void);\r
-void m68k_op_bfins_32_d(void);\r
-void m68k_op_bfins_32_ai(void);\r
-void m68k_op_bfins_32_di(void);\r
-void m68k_op_bfins_32_ix(void);\r
-void m68k_op_bfins_32_aw(void);\r
-void m68k_op_bfins_32_al(void);\r
-void m68k_op_bfset_32_d(void);\r
-void m68k_op_bfset_32_ai(void);\r
-void m68k_op_bfset_32_di(void);\r
-void m68k_op_bfset_32_ix(void);\r
-void m68k_op_bfset_32_aw(void);\r
-void m68k_op_bfset_32_al(void);\r
-void m68k_op_bftst_32_d(void);\r
-void m68k_op_bftst_32_ai(void);\r
-void m68k_op_bftst_32_di(void);\r
-void m68k_op_bftst_32_ix(void);\r
-void m68k_op_bftst_32_aw(void);\r
-void m68k_op_bftst_32_al(void);\r
-void m68k_op_bftst_32_pcdi(void);\r
-void m68k_op_bftst_32_pcix(void);\r
-void m68k_op_bkpt(void);\r
-void m68k_op_bra_8(void);\r
-void m68k_op_bra_16(void);\r
-void m68k_op_bra_32(void);\r
-void m68k_op_bset_32_r_d(void);\r
-void m68k_op_bset_8_r_ai(void);\r
-void m68k_op_bset_8_r_pi(void);\r
-void m68k_op_bset_8_r_pi7(void);\r
-void m68k_op_bset_8_r_pd(void);\r
-void m68k_op_bset_8_r_pd7(void);\r
-void m68k_op_bset_8_r_di(void);\r
-void m68k_op_bset_8_r_ix(void);\r
-void m68k_op_bset_8_r_aw(void);\r
-void m68k_op_bset_8_r_al(void);\r
-void m68k_op_bset_32_s_d(void);\r
-void m68k_op_bset_8_s_ai(void);\r
-void m68k_op_bset_8_s_pi(void);\r
-void m68k_op_bset_8_s_pi7(void);\r
-void m68k_op_bset_8_s_pd(void);\r
-void m68k_op_bset_8_s_pd7(void);\r
-void m68k_op_bset_8_s_di(void);\r
-void m68k_op_bset_8_s_ix(void);\r
-void m68k_op_bset_8_s_aw(void);\r
-void m68k_op_bset_8_s_al(void);\r
-void m68k_op_bsr_8(void);\r
-void m68k_op_bsr_16(void);\r
-void m68k_op_bsr_32(void);\r
-void m68k_op_btst_32_r_d(void);\r
-void m68k_op_btst_8_r_ai(void);\r
-void m68k_op_btst_8_r_pi(void);\r
-void m68k_op_btst_8_r_pi7(void);\r
-void m68k_op_btst_8_r_pd(void);\r
-void m68k_op_btst_8_r_pd7(void);\r
-void m68k_op_btst_8_r_di(void);\r
-void m68k_op_btst_8_r_ix(void);\r
-void m68k_op_btst_8_r_aw(void);\r
-void m68k_op_btst_8_r_al(void);\r
-void m68k_op_btst_8_r_pcdi(void);\r
-void m68k_op_btst_8_r_pcix(void);\r
-void m68k_op_btst_8_r_i(void);\r
-void m68k_op_btst_32_s_d(void);\r
-void m68k_op_btst_8_s_ai(void);\r
-void m68k_op_btst_8_s_pi(void);\r
-void m68k_op_btst_8_s_pi7(void);\r
-void m68k_op_btst_8_s_pd(void);\r
-void m68k_op_btst_8_s_pd7(void);\r
-void m68k_op_btst_8_s_di(void);\r
-void m68k_op_btst_8_s_ix(void);\r
-void m68k_op_btst_8_s_aw(void);\r
-void m68k_op_btst_8_s_al(void);\r
-void m68k_op_btst_8_s_pcdi(void);\r
-void m68k_op_btst_8_s_pcix(void);\r
-void m68k_op_callm_32_ai(void);\r
-void m68k_op_callm_32_di(void);\r
-void m68k_op_callm_32_ix(void);\r
-void m68k_op_callm_32_aw(void);\r
-void m68k_op_callm_32_al(void);\r
-void m68k_op_callm_32_pcdi(void);\r
-void m68k_op_callm_32_pcix(void);\r
-void m68k_op_cas_8_ai(void);\r
-void m68k_op_cas_8_pi(void);\r
-void m68k_op_cas_8_pi7(void);\r
-void m68k_op_cas_8_pd(void);\r
-void m68k_op_cas_8_pd7(void);\r
-void m68k_op_cas_8_di(void);\r
-void m68k_op_cas_8_ix(void);\r
-void m68k_op_cas_8_aw(void);\r
-void m68k_op_cas_8_al(void);\r
-void m68k_op_cas_16_ai(void);\r
-void m68k_op_cas_16_pi(void);\r
-void m68k_op_cas_16_pd(void);\r
-void m68k_op_cas_16_di(void);\r
-void m68k_op_cas_16_ix(void);\r
-void m68k_op_cas_16_aw(void);\r
-void m68k_op_cas_16_al(void);\r
-void m68k_op_cas_32_ai(void);\r
-void m68k_op_cas_32_pi(void);\r
-void m68k_op_cas_32_pd(void);\r
-void m68k_op_cas_32_di(void);\r
-void m68k_op_cas_32_ix(void);\r
-void m68k_op_cas_32_aw(void);\r
-void m68k_op_cas_32_al(void);\r
-void m68k_op_cas2_16(void);\r
-void m68k_op_cas2_32(void);\r
-void m68k_op_chk_16_d(void);\r
-void m68k_op_chk_16_ai(void);\r
-void m68k_op_chk_16_pi(void);\r
-void m68k_op_chk_16_pd(void);\r
-void m68k_op_chk_16_di(void);\r
-void m68k_op_chk_16_ix(void);\r
-void m68k_op_chk_16_aw(void);\r
-void m68k_op_chk_16_al(void);\r
-void m68k_op_chk_16_pcdi(void);\r
-void m68k_op_chk_16_pcix(void);\r
-void m68k_op_chk_16_i(void);\r
-void m68k_op_chk_32_d(void);\r
-void m68k_op_chk_32_ai(void);\r
-void m68k_op_chk_32_pi(void);\r
-void m68k_op_chk_32_pd(void);\r
-void m68k_op_chk_32_di(void);\r
-void m68k_op_chk_32_ix(void);\r
-void m68k_op_chk_32_aw(void);\r
-void m68k_op_chk_32_al(void);\r
-void m68k_op_chk_32_pcdi(void);\r
-void m68k_op_chk_32_pcix(void);\r
-void m68k_op_chk_32_i(void);\r
-void m68k_op_chk2cmp2_8_pcdi(void);\r
-void m68k_op_chk2cmp2_8_pcix(void);\r
-void m68k_op_chk2cmp2_8_ai(void);\r
-void m68k_op_chk2cmp2_8_di(void);\r
-void m68k_op_chk2cmp2_8_ix(void);\r
-void m68k_op_chk2cmp2_8_aw(void);\r
-void m68k_op_chk2cmp2_8_al(void);\r
-void m68k_op_chk2cmp2_16_pcdi(void);\r
-void m68k_op_chk2cmp2_16_pcix(void);\r
-void m68k_op_chk2cmp2_16_ai(void);\r
-void m68k_op_chk2cmp2_16_di(void);\r
-void m68k_op_chk2cmp2_16_ix(void);\r
-void m68k_op_chk2cmp2_16_aw(void);\r
-void m68k_op_chk2cmp2_16_al(void);\r
-void m68k_op_chk2cmp2_32_pcdi(void);\r
-void m68k_op_chk2cmp2_32_pcix(void);\r
-void m68k_op_chk2cmp2_32_ai(void);\r
-void m68k_op_chk2cmp2_32_di(void);\r
-void m68k_op_chk2cmp2_32_ix(void);\r
-void m68k_op_chk2cmp2_32_aw(void);\r
-void m68k_op_chk2cmp2_32_al(void);\r
-void m68k_op_clr_8_d(void);\r
-void m68k_op_clr_8_ai(void);\r
-void m68k_op_clr_8_pi(void);\r
-void m68k_op_clr_8_pi7(void);\r
-void m68k_op_clr_8_pd(void);\r
-void m68k_op_clr_8_pd7(void);\r
-void m68k_op_clr_8_di(void);\r
-void m68k_op_clr_8_ix(void);\r
-void m68k_op_clr_8_aw(void);\r
-void m68k_op_clr_8_al(void);\r
-void m68k_op_clr_16_d(void);\r
-void m68k_op_clr_16_ai(void);\r
-void m68k_op_clr_16_pi(void);\r
-void m68k_op_clr_16_pd(void);\r
-void m68k_op_clr_16_di(void);\r
-void m68k_op_clr_16_ix(void);\r
-void m68k_op_clr_16_aw(void);\r
-void m68k_op_clr_16_al(void);\r
-void m68k_op_clr_32_d(void);\r
-void m68k_op_clr_32_ai(void);\r
-void m68k_op_clr_32_pi(void);\r
-void m68k_op_clr_32_pd(void);\r
-void m68k_op_clr_32_di(void);\r
-void m68k_op_clr_32_ix(void);\r
-void m68k_op_clr_32_aw(void);\r
-void m68k_op_clr_32_al(void);\r
-void m68k_op_cmp_8_d(void);\r
-void m68k_op_cmp_8_ai(void);\r
-void m68k_op_cmp_8_pi(void);\r
-void m68k_op_cmp_8_pi7(void);\r
-void m68k_op_cmp_8_pd(void);\r
-void m68k_op_cmp_8_pd7(void);\r
-void m68k_op_cmp_8_di(void);\r
-void m68k_op_cmp_8_ix(void);\r
-void m68k_op_cmp_8_aw(void);\r
-void m68k_op_cmp_8_al(void);\r
-void m68k_op_cmp_8_pcdi(void);\r
-void m68k_op_cmp_8_pcix(void);\r
-void m68k_op_cmp_8_i(void);\r
-void m68k_op_cmp_16_d(void);\r
-void m68k_op_cmp_16_a(void);\r
-void m68k_op_cmp_16_ai(void);\r
-void m68k_op_cmp_16_pi(void);\r
-void m68k_op_cmp_16_pd(void);\r
-void m68k_op_cmp_16_di(void);\r
-void m68k_op_cmp_16_ix(void);\r
-void m68k_op_cmp_16_aw(void);\r
-void m68k_op_cmp_16_al(void);\r
-void m68k_op_cmp_16_pcdi(void);\r
-void m68k_op_cmp_16_pcix(void);\r
-void m68k_op_cmp_16_i(void);\r
-void m68k_op_cmp_32_d(void);\r
-void m68k_op_cmp_32_a(void);\r
-void m68k_op_cmp_32_ai(void);\r
-void m68k_op_cmp_32_pi(void);\r
-void m68k_op_cmp_32_pd(void);\r
-void m68k_op_cmp_32_di(void);\r
-void m68k_op_cmp_32_ix(void);\r
-void m68k_op_cmp_32_aw(void);\r
-void m68k_op_cmp_32_al(void);\r
-void m68k_op_cmp_32_pcdi(void);\r
-void m68k_op_cmp_32_pcix(void);\r
-void m68k_op_cmp_32_i(void);\r
-void m68k_op_cmpa_16_d(void);\r
-void m68k_op_cmpa_16_a(void);\r
-void m68k_op_cmpa_16_ai(void);\r
-void m68k_op_cmpa_16_pi(void);\r
-void m68k_op_cmpa_16_pd(void);\r
-void m68k_op_cmpa_16_di(void);\r
-void m68k_op_cmpa_16_ix(void);\r
-void m68k_op_cmpa_16_aw(void);\r
-void m68k_op_cmpa_16_al(void);\r
-void m68k_op_cmpa_16_pcdi(void);\r
-void m68k_op_cmpa_16_pcix(void);\r
-void m68k_op_cmpa_16_i(void);\r
-void m68k_op_cmpa_32_d(void);\r
-void m68k_op_cmpa_32_a(void);\r
-void m68k_op_cmpa_32_ai(void);\r
-void m68k_op_cmpa_32_pi(void);\r
-void m68k_op_cmpa_32_pd(void);\r
-void m68k_op_cmpa_32_di(void);\r
-void m68k_op_cmpa_32_ix(void);\r
-void m68k_op_cmpa_32_aw(void);\r
-void m68k_op_cmpa_32_al(void);\r
-void m68k_op_cmpa_32_pcdi(void);\r
-void m68k_op_cmpa_32_pcix(void);\r
-void m68k_op_cmpa_32_i(void);\r
-void m68k_op_cmpi_8_d(void);\r
-void m68k_op_cmpi_8_ai(void);\r
-void m68k_op_cmpi_8_pi(void);\r
-void m68k_op_cmpi_8_pi7(void);\r
-void m68k_op_cmpi_8_pd(void);\r
-void m68k_op_cmpi_8_pd7(void);\r
-void m68k_op_cmpi_8_di(void);\r
-void m68k_op_cmpi_8_ix(void);\r
-void m68k_op_cmpi_8_aw(void);\r
-void m68k_op_cmpi_8_al(void);\r
-void m68k_op_cmpi_8_pcdi(void);\r
-void m68k_op_cmpi_8_pcix(void);\r
-void m68k_op_cmpi_16_d(void);\r
-void m68k_op_cmpi_16_ai(void);\r
-void m68k_op_cmpi_16_pi(void);\r
-void m68k_op_cmpi_16_pd(void);\r
-void m68k_op_cmpi_16_di(void);\r
-void m68k_op_cmpi_16_ix(void);\r
-void m68k_op_cmpi_16_aw(void);\r
-void m68k_op_cmpi_16_al(void);\r
-void m68k_op_cmpi_16_pcdi(void);\r
-void m68k_op_cmpi_16_pcix(void);\r
-void m68k_op_cmpi_32_d(void);\r
-void m68k_op_cmpi_32_ai(void);\r
-void m68k_op_cmpi_32_pi(void);\r
-void m68k_op_cmpi_32_pd(void);\r
-void m68k_op_cmpi_32_di(void);\r
-void m68k_op_cmpi_32_ix(void);\r
-void m68k_op_cmpi_32_aw(void);\r
-void m68k_op_cmpi_32_al(void);\r
-void m68k_op_cmpi_32_pcdi(void);\r
-void m68k_op_cmpi_32_pcix(void);\r
-void m68k_op_cmpm_8_ax7(void);\r
-void m68k_op_cmpm_8_ay7(void);\r
-void m68k_op_cmpm_8_axy7(void);\r
-void m68k_op_cmpm_8(void);\r
-void m68k_op_cmpm_16(void);\r
-void m68k_op_cmpm_32(void);\r
-void m68k_op_cpbcc_32(void);\r
-void m68k_op_cpdbcc_32(void);\r
-void m68k_op_cpgen_32(void);\r
-void m68k_op_cpscc_32(void);\r
-void m68k_op_cptrapcc_32(void);\r
-void m68k_op_dbt_16(void);\r
-void m68k_op_dbf_16(void);\r
-void m68k_op_dbhi_16(void);\r
-void m68k_op_dbls_16(void);\r
-void m68k_op_dbcc_16(void);\r
-void m68k_op_dbcs_16(void);\r
-void m68k_op_dbne_16(void);\r
-void m68k_op_dbeq_16(void);\r
-void m68k_op_dbvc_16(void);\r
-void m68k_op_dbvs_16(void);\r
-void m68k_op_dbpl_16(void);\r
-void m68k_op_dbmi_16(void);\r
-void m68k_op_dbge_16(void);\r
-void m68k_op_dblt_16(void);\r
-void m68k_op_dbgt_16(void);\r
-void m68k_op_dble_16(void);\r
-void m68k_op_divs_16_d(void);\r
-void m68k_op_divs_16_ai(void);\r
-void m68k_op_divs_16_pi(void);\r
-void m68k_op_divs_16_pd(void);\r
-void m68k_op_divs_16_di(void);\r
-void m68k_op_divs_16_ix(void);\r
-void m68k_op_divs_16_aw(void);\r
-void m68k_op_divs_16_al(void);\r
-void m68k_op_divs_16_pcdi(void);\r
-void m68k_op_divs_16_pcix(void);\r
-void m68k_op_divs_16_i(void);\r
-void m68k_op_divu_16_d(void);\r
-void m68k_op_divu_16_ai(void);\r
-void m68k_op_divu_16_pi(void);\r
-void m68k_op_divu_16_pd(void);\r
-void m68k_op_divu_16_di(void);\r
-void m68k_op_divu_16_ix(void);\r
-void m68k_op_divu_16_aw(void);\r
-void m68k_op_divu_16_al(void);\r
-void m68k_op_divu_16_pcdi(void);\r
-void m68k_op_divu_16_pcix(void);\r
-void m68k_op_divu_16_i(void);\r
-void m68k_op_divl_32_d(void);\r
-void m68k_op_divl_32_ai(void);\r
-void m68k_op_divl_32_pi(void);\r
-void m68k_op_divl_32_pd(void);\r
-void m68k_op_divl_32_di(void);\r
-void m68k_op_divl_32_ix(void);\r
-void m68k_op_divl_32_aw(void);\r
-void m68k_op_divl_32_al(void);\r
-void m68k_op_divl_32_pcdi(void);\r
-void m68k_op_divl_32_pcix(void);\r
-void m68k_op_divl_32_i(void);\r
-void m68k_op_eor_8_d(void);\r
-void m68k_op_eor_8_ai(void);\r
-void m68k_op_eor_8_pi(void);\r
-void m68k_op_eor_8_pi7(void);\r
-void m68k_op_eor_8_pd(void);\r
-void m68k_op_eor_8_pd7(void);\r
-void m68k_op_eor_8_di(void);\r
-void m68k_op_eor_8_ix(void);\r
-void m68k_op_eor_8_aw(void);\r
-void m68k_op_eor_8_al(void);\r
-void m68k_op_eor_16_d(void);\r
-void m68k_op_eor_16_ai(void);\r
-void m68k_op_eor_16_pi(void);\r
-void m68k_op_eor_16_pd(void);\r
-void m68k_op_eor_16_di(void);\r
-void m68k_op_eor_16_ix(void);\r
-void m68k_op_eor_16_aw(void);\r
-void m68k_op_eor_16_al(void);\r
-void m68k_op_eor_32_d(void);\r
-void m68k_op_eor_32_ai(void);\r
-void m68k_op_eor_32_pi(void);\r
-void m68k_op_eor_32_pd(void);\r
-void m68k_op_eor_32_di(void);\r
-void m68k_op_eor_32_ix(void);\r
-void m68k_op_eor_32_aw(void);\r
-void m68k_op_eor_32_al(void);\r
-void m68k_op_eori_8_d(void);\r
-void m68k_op_eori_8_ai(void);\r
-void m68k_op_eori_8_pi(void);\r
-void m68k_op_eori_8_pi7(void);\r
-void m68k_op_eori_8_pd(void);\r
-void m68k_op_eori_8_pd7(void);\r
-void m68k_op_eori_8_di(void);\r
-void m68k_op_eori_8_ix(void);\r
-void m68k_op_eori_8_aw(void);\r
-void m68k_op_eori_8_al(void);\r
-void m68k_op_eori_16_d(void);\r
-void m68k_op_eori_16_ai(void);\r
-void m68k_op_eori_16_pi(void);\r
-void m68k_op_eori_16_pd(void);\r
-void m68k_op_eori_16_di(void);\r
-void m68k_op_eori_16_ix(void);\r
-void m68k_op_eori_16_aw(void);\r
-void m68k_op_eori_16_al(void);\r
-void m68k_op_eori_32_d(void);\r
-void m68k_op_eori_32_ai(void);\r
-void m68k_op_eori_32_pi(void);\r
-void m68k_op_eori_32_pd(void);\r
-void m68k_op_eori_32_di(void);\r
-void m68k_op_eori_32_ix(void);\r
-void m68k_op_eori_32_aw(void);\r
-void m68k_op_eori_32_al(void);\r
-void m68k_op_eori_16_toc(void);\r
-void m68k_op_eori_16_tos(void);\r
-void m68k_op_exg_32_dd(void);\r
-void m68k_op_exg_32_aa(void);\r
-void m68k_op_exg_32_da(void);\r
-void m68k_op_ext_16(void);\r
-void m68k_op_ext_32(void);\r
-void m68k_op_extb_32(void);\r
-void m68k_op_illegal(void);\r
-void m68k_op_jmp_32_ai(void);\r
-void m68k_op_jmp_32_di(void);\r
-void m68k_op_jmp_32_ix(void);\r
-void m68k_op_jmp_32_aw(void);\r
-void m68k_op_jmp_32_al(void);\r
-void m68k_op_jmp_32_pcdi(void);\r
-void m68k_op_jmp_32_pcix(void);\r
-void m68k_op_jsr_32_ai(void);\r
-void m68k_op_jsr_32_di(void);\r
-void m68k_op_jsr_32_ix(void);\r
-void m68k_op_jsr_32_aw(void);\r
-void m68k_op_jsr_32_al(void);\r
-void m68k_op_jsr_32_pcdi(void);\r
-void m68k_op_jsr_32_pcix(void);\r
-void m68k_op_lea_32_ai(void);\r
-void m68k_op_lea_32_di(void);\r
-void m68k_op_lea_32_ix(void);\r
-void m68k_op_lea_32_aw(void);\r
-void m68k_op_lea_32_al(void);\r
-void m68k_op_lea_32_pcdi(void);\r
-void m68k_op_lea_32_pcix(void);\r
-void m68k_op_link_16_a7(void);\r
-void m68k_op_link_16(void);\r
-void m68k_op_link_32_a7(void);\r
-void m68k_op_link_32(void);\r
-void m68k_op_lsr_8_s(void);\r
-void m68k_op_lsr_16_s(void);\r
-void m68k_op_lsr_32_s(void);\r
-void m68k_op_lsr_8_r(void);\r
-void m68k_op_lsr_16_r(void);\r
-void m68k_op_lsr_32_r(void);\r
-void m68k_op_lsr_16_ai(void);\r
-void m68k_op_lsr_16_pi(void);\r
-void m68k_op_lsr_16_pd(void);\r
-void m68k_op_lsr_16_di(void);\r
-void m68k_op_lsr_16_ix(void);\r
-void m68k_op_lsr_16_aw(void);\r
-void m68k_op_lsr_16_al(void);\r
-void m68k_op_lsl_8_s(void);\r
-void m68k_op_lsl_16_s(void);\r
-void m68k_op_lsl_32_s(void);\r
-void m68k_op_lsl_8_r(void);\r
-void m68k_op_lsl_16_r(void);\r
-void m68k_op_lsl_32_r(void);\r
-void m68k_op_lsl_16_ai(void);\r
-void m68k_op_lsl_16_pi(void);\r
-void m68k_op_lsl_16_pd(void);\r
-void m68k_op_lsl_16_di(void);\r
-void m68k_op_lsl_16_ix(void);\r
-void m68k_op_lsl_16_aw(void);\r
-void m68k_op_lsl_16_al(void);\r
-void m68k_op_move_8_d_d(void);\r
-void m68k_op_move_8_d_ai(void);\r
-void m68k_op_move_8_d_pi(void);\r
-void m68k_op_move_8_d_pi7(void);\r
-void m68k_op_move_8_d_pd(void);\r
-void m68k_op_move_8_d_pd7(void);\r
-void m68k_op_move_8_d_di(void);\r
-void m68k_op_move_8_d_ix(void);\r
-void m68k_op_move_8_d_aw(void);\r
-void m68k_op_move_8_d_al(void);\r
-void m68k_op_move_8_d_pcdi(void);\r
-void m68k_op_move_8_d_pcix(void);\r
-void m68k_op_move_8_d_i(void);\r
-void m68k_op_move_8_ai_d(void);\r
-void m68k_op_move_8_ai_ai(void);\r
-void m68k_op_move_8_ai_pi(void);\r
-void m68k_op_move_8_ai_pi7(void);\r
-void m68k_op_move_8_ai_pd(void);\r
-void m68k_op_move_8_ai_pd7(void);\r
-void m68k_op_move_8_ai_di(void);\r
-void m68k_op_move_8_ai_ix(void);\r
-void m68k_op_move_8_ai_aw(void);\r
-void m68k_op_move_8_ai_al(void);\r
-void m68k_op_move_8_ai_pcdi(void);\r
-void m68k_op_move_8_ai_pcix(void);\r
-void m68k_op_move_8_ai_i(void);\r
-void m68k_op_move_8_pi7_d(void);\r
-void m68k_op_move_8_pi_d(void);\r
-void m68k_op_move_8_pi7_ai(void);\r
-void m68k_op_move_8_pi7_pi(void);\r
-void m68k_op_move_8_pi7_pi7(void);\r
-void m68k_op_move_8_pi7_pd(void);\r
-void m68k_op_move_8_pi7_pd7(void);\r
-void m68k_op_move_8_pi7_di(void);\r
-void m68k_op_move_8_pi7_ix(void);\r
-void m68k_op_move_8_pi7_aw(void);\r
-void m68k_op_move_8_pi7_al(void);\r
-void m68k_op_move_8_pi7_pcdi(void);\r
-void m68k_op_move_8_pi7_pcix(void);\r
-void m68k_op_move_8_pi7_i(void);\r
-void m68k_op_move_8_pi_ai(void);\r
-void m68k_op_move_8_pi_pi(void);\r
-void m68k_op_move_8_pi_pi7(void);\r
-void m68k_op_move_8_pi_pd(void);\r
-void m68k_op_move_8_pi_pd7(void);\r
-void m68k_op_move_8_pi_di(void);\r
-void m68k_op_move_8_pi_ix(void);\r
-void m68k_op_move_8_pi_aw(void);\r
-void m68k_op_move_8_pi_al(void);\r
-void m68k_op_move_8_pi_pcdi(void);\r
-void m68k_op_move_8_pi_pcix(void);\r
-void m68k_op_move_8_pi_i(void);\r
-void m68k_op_move_8_pd7_d(void);\r
-void m68k_op_move_8_pd_d(void);\r
-void m68k_op_move_8_pd7_ai(void);\r
-void m68k_op_move_8_pd7_pi(void);\r
-void m68k_op_move_8_pd7_pi7(void);\r
-void m68k_op_move_8_pd7_pd(void);\r
-void m68k_op_move_8_pd7_pd7(void);\r
-void m68k_op_move_8_pd7_di(void);\r
-void m68k_op_move_8_pd7_ix(void);\r
-void m68k_op_move_8_pd7_aw(void);\r
-void m68k_op_move_8_pd7_al(void);\r
-void m68k_op_move_8_pd7_pcdi(void);\r
-void m68k_op_move_8_pd7_pcix(void);\r
-void m68k_op_move_8_pd7_i(void);\r
-void m68k_op_move_8_pd_ai(void);\r
-void m68k_op_move_8_pd_pi(void);\r
-void m68k_op_move_8_pd_pi7(void);\r
-void m68k_op_move_8_pd_pd(void);\r
-void m68k_op_move_8_pd_pd7(void);\r
-void m68k_op_move_8_pd_di(void);\r
-void m68k_op_move_8_pd_ix(void);\r
-void m68k_op_move_8_pd_aw(void);\r
-void m68k_op_move_8_pd_al(void);\r
-void m68k_op_move_8_pd_pcdi(void);\r
-void m68k_op_move_8_pd_pcix(void);\r
-void m68k_op_move_8_pd_i(void);\r
-void m68k_op_move_8_di_d(void);\r
-void m68k_op_move_8_di_ai(void);\r
-void m68k_op_move_8_di_pi(void);\r
-void m68k_op_move_8_di_pi7(void);\r
-void m68k_op_move_8_di_pd(void);\r
-void m68k_op_move_8_di_pd7(void);\r
-void m68k_op_move_8_di_di(void);\r
-void m68k_op_move_8_di_ix(void);\r
-void m68k_op_move_8_di_aw(void);\r
-void m68k_op_move_8_di_al(void);\r
-void m68k_op_move_8_di_pcdi(void);\r
-void m68k_op_move_8_di_pcix(void);\r
-void m68k_op_move_8_di_i(void);\r
-void m68k_op_move_8_ix_d(void);\r
-void m68k_op_move_8_ix_ai(void);\r
-void m68k_op_move_8_ix_pi(void);\r
-void m68k_op_move_8_ix_pi7(void);\r
-void m68k_op_move_8_ix_pd(void);\r
-void m68k_op_move_8_ix_pd7(void);\r
-void m68k_op_move_8_ix_di(void);\r
-void m68k_op_move_8_ix_ix(void);\r
-void m68k_op_move_8_ix_aw(void);\r
-void m68k_op_move_8_ix_al(void);\r
-void m68k_op_move_8_ix_pcdi(void);\r
-void m68k_op_move_8_ix_pcix(void);\r
-void m68k_op_move_8_ix_i(void);\r
-void m68k_op_move_8_aw_d(void);\r
-void m68k_op_move_8_aw_ai(void);\r
-void m68k_op_move_8_aw_pi(void);\r
-void m68k_op_move_8_aw_pi7(void);\r
-void m68k_op_move_8_aw_pd(void);\r
-void m68k_op_move_8_aw_pd7(void);\r
-void m68k_op_move_8_aw_di(void);\r
-void m68k_op_move_8_aw_ix(void);\r
-void m68k_op_move_8_aw_aw(void);\r
-void m68k_op_move_8_aw_al(void);\r
-void m68k_op_move_8_aw_pcdi(void);\r
-void m68k_op_move_8_aw_pcix(void);\r
-void m68k_op_move_8_aw_i(void);\r
-void m68k_op_move_8_al_d(void);\r
-void m68k_op_move_8_al_ai(void);\r
-void m68k_op_move_8_al_pi(void);\r
-void m68k_op_move_8_al_pi7(void);\r
-void m68k_op_move_8_al_pd(void);\r
-void m68k_op_move_8_al_pd7(void);\r
-void m68k_op_move_8_al_di(void);\r
-void m68k_op_move_8_al_ix(void);\r
-void m68k_op_move_8_al_aw(void);\r
-void m68k_op_move_8_al_al(void);\r
-void m68k_op_move_8_al_pcdi(void);\r
-void m68k_op_move_8_al_pcix(void);\r
-void m68k_op_move_8_al_i(void);\r
-void m68k_op_move_16_d_d(void);\r
-void m68k_op_move_16_d_a(void);\r
-void m68k_op_move_16_d_ai(void);\r
-void m68k_op_move_16_d_pi(void);\r
-void m68k_op_move_16_d_pd(void);\r
-void m68k_op_move_16_d_di(void);\r
-void m68k_op_move_16_d_ix(void);\r
-void m68k_op_move_16_d_aw(void);\r
-void m68k_op_move_16_d_al(void);\r
-void m68k_op_move_16_d_pcdi(void);\r
-void m68k_op_move_16_d_pcix(void);\r
-void m68k_op_move_16_d_i(void);\r
-void m68k_op_move_16_ai_d(void);\r
-void m68k_op_move_16_ai_a(void);\r
-void m68k_op_move_16_ai_ai(void);\r
-void m68k_op_move_16_ai_pi(void);\r
-void m68k_op_move_16_ai_pd(void);\r
-void m68k_op_move_16_ai_di(void);\r
-void m68k_op_move_16_ai_ix(void);\r
-void m68k_op_move_16_ai_aw(void);\r
-void m68k_op_move_16_ai_al(void);\r
-void m68k_op_move_16_ai_pcdi(void);\r
-void m68k_op_move_16_ai_pcix(void);\r
-void m68k_op_move_16_ai_i(void);\r
-void m68k_op_move_16_pi_d(void);\r
-void m68k_op_move_16_pi_a(void);\r
-void m68k_op_move_16_pi_ai(void);\r
-void m68k_op_move_16_pi_pi(void);\r
-void m68k_op_move_16_pi_pd(void);\r
-void m68k_op_move_16_pi_di(void);\r
-void m68k_op_move_16_pi_ix(void);\r
-void m68k_op_move_16_pi_aw(void);\r
-void m68k_op_move_16_pi_al(void);\r
-void m68k_op_move_16_pi_pcdi(void);\r
-void m68k_op_move_16_pi_pcix(void);\r
-void m68k_op_move_16_pi_i(void);\r
-void m68k_op_move_16_pd_d(void);\r
-void m68k_op_move_16_pd_a(void);\r
-void m68k_op_move_16_pd_ai(void);\r
-void m68k_op_move_16_pd_pi(void);\r
-void m68k_op_move_16_pd_pd(void);\r
-void m68k_op_move_16_pd_di(void);\r
-void m68k_op_move_16_pd_ix(void);\r
-void m68k_op_move_16_pd_aw(void);\r
-void m68k_op_move_16_pd_al(void);\r
-void m68k_op_move_16_pd_pcdi(void);\r
-void m68k_op_move_16_pd_pcix(void);\r
-void m68k_op_move_16_pd_i(void);\r
-void m68k_op_move_16_di_d(void);\r
-void m68k_op_move_16_di_a(void);\r
-void m68k_op_move_16_di_ai(void);\r
-void m68k_op_move_16_di_pi(void);\r
-void m68k_op_move_16_di_pd(void);\r
-void m68k_op_move_16_di_di(void);\r
-void m68k_op_move_16_di_ix(void);\r
-void m68k_op_move_16_di_aw(void);\r
-void m68k_op_move_16_di_al(void);\r
-void m68k_op_move_16_di_pcdi(void);\r
-void m68k_op_move_16_di_pcix(void);\r
-void m68k_op_move_16_di_i(void);\r
-void m68k_op_move_16_ix_d(void);\r
-void m68k_op_move_16_ix_a(void);\r
-void m68k_op_move_16_ix_ai(void);\r
-void m68k_op_move_16_ix_pi(void);\r
-void m68k_op_move_16_ix_pd(void);\r
-void m68k_op_move_16_ix_di(void);\r
-void m68k_op_move_16_ix_ix(void);\r
-void m68k_op_move_16_ix_aw(void);\r
-void m68k_op_move_16_ix_al(void);\r
-void m68k_op_move_16_ix_pcdi(void);\r
-void m68k_op_move_16_ix_pcix(void);\r
-void m68k_op_move_16_ix_i(void);\r
-void m68k_op_move_16_aw_d(void);\r
-void m68k_op_move_16_aw_a(void);\r
-void m68k_op_move_16_aw_ai(void);\r
-void m68k_op_move_16_aw_pi(void);\r
-void m68k_op_move_16_aw_pd(void);\r
-void m68k_op_move_16_aw_di(void);\r
-void m68k_op_move_16_aw_ix(void);\r
-void m68k_op_move_16_aw_aw(void);\r
-void m68k_op_move_16_aw_al(void);\r
-void m68k_op_move_16_aw_pcdi(void);\r
-void m68k_op_move_16_aw_pcix(void);\r
-void m68k_op_move_16_aw_i(void);\r
-void m68k_op_move_16_al_d(void);\r
-void m68k_op_move_16_al_a(void);\r
-void m68k_op_move_16_al_ai(void);\r
-void m68k_op_move_16_al_pi(void);\r
-void m68k_op_move_16_al_pd(void);\r
-void m68k_op_move_16_al_di(void);\r
-void m68k_op_move_16_al_ix(void);\r
-void m68k_op_move_16_al_aw(void);\r
-void m68k_op_move_16_al_al(void);\r
-void m68k_op_move_16_al_pcdi(void);\r
-void m68k_op_move_16_al_pcix(void);\r
-void m68k_op_move_16_al_i(void);\r
-void m68k_op_move_32_d_d(void);\r
-void m68k_op_move_32_d_a(void);\r
-void m68k_op_move_32_d_ai(void);\r
-void m68k_op_move_32_d_pi(void);\r
-void m68k_op_move_32_d_pd(void);\r
-void m68k_op_move_32_d_di(void);\r
-void m68k_op_move_32_d_ix(void);\r
-void m68k_op_move_32_d_aw(void);\r
-void m68k_op_move_32_d_al(void);\r
-void m68k_op_move_32_d_pcdi(void);\r
-void m68k_op_move_32_d_pcix(void);\r
-void m68k_op_move_32_d_i(void);\r
-void m68k_op_move_32_ai_d(void);\r
-void m68k_op_move_32_ai_a(void);\r
-void m68k_op_move_32_ai_ai(void);\r
-void m68k_op_move_32_ai_pi(void);\r
-void m68k_op_move_32_ai_pd(void);\r
-void m68k_op_move_32_ai_di(void);\r
-void m68k_op_move_32_ai_ix(void);\r
-void m68k_op_move_32_ai_aw(void);\r
-void m68k_op_move_32_ai_al(void);\r
-void m68k_op_move_32_ai_pcdi(void);\r
-void m68k_op_move_32_ai_pcix(void);\r
-void m68k_op_move_32_ai_i(void);\r
-void m68k_op_move_32_pi_d(void);\r
-void m68k_op_move_32_pi_a(void);\r
-void m68k_op_move_32_pi_ai(void);\r
-void m68k_op_move_32_pi_pi(void);\r
-void m68k_op_move_32_pi_pd(void);\r
-void m68k_op_move_32_pi_di(void);\r
-void m68k_op_move_32_pi_ix(void);\r
-void m68k_op_move_32_pi_aw(void);\r
-void m68k_op_move_32_pi_al(void);\r
-void m68k_op_move_32_pi_pcdi(void);\r
-void m68k_op_move_32_pi_pcix(void);\r
-void m68k_op_move_32_pi_i(void);\r
-void m68k_op_move_32_pd_d(void);\r
-void m68k_op_move_32_pd_a(void);\r
-void m68k_op_move_32_pd_ai(void);\r
-void m68k_op_move_32_pd_pi(void);\r
-void m68k_op_move_32_pd_pd(void);\r
-void m68k_op_move_32_pd_di(void);\r
-void m68k_op_move_32_pd_ix(void);\r
-void m68k_op_move_32_pd_aw(void);\r
-void m68k_op_move_32_pd_al(void);\r
-void m68k_op_move_32_pd_pcdi(void);\r
-void m68k_op_move_32_pd_pcix(void);\r
-void m68k_op_move_32_pd_i(void);\r
-void m68k_op_move_32_di_d(void);\r
-void m68k_op_move_32_di_a(void);\r
-void m68k_op_move_32_di_ai(void);\r
-void m68k_op_move_32_di_pi(void);\r
-void m68k_op_move_32_di_pd(void);\r
-void m68k_op_move_32_di_di(void);\r
-void m68k_op_move_32_di_ix(void);\r
-void m68k_op_move_32_di_aw(void);\r
-void m68k_op_move_32_di_al(void);\r
-void m68k_op_move_32_di_pcdi(void);\r
-void m68k_op_move_32_di_pcix(void);\r
-void m68k_op_move_32_di_i(void);\r
-void m68k_op_move_32_ix_d(void);\r
-void m68k_op_move_32_ix_a(void);\r
-void m68k_op_move_32_ix_ai(void);\r
-void m68k_op_move_32_ix_pi(void);\r
-void m68k_op_move_32_ix_pd(void);\r
-void m68k_op_move_32_ix_di(void);\r
-void m68k_op_move_32_ix_ix(void);\r
-void m68k_op_move_32_ix_aw(void);\r
-void m68k_op_move_32_ix_al(void);\r
-void m68k_op_move_32_ix_pcdi(void);\r
-void m68k_op_move_32_ix_pcix(void);\r
-void m68k_op_move_32_ix_i(void);\r
-void m68k_op_move_32_aw_d(void);\r
-void m68k_op_move_32_aw_a(void);\r
-void m68k_op_move_32_aw_ai(void);\r
-void m68k_op_move_32_aw_pi(void);\r
-void m68k_op_move_32_aw_pd(void);\r
-void m68k_op_move_32_aw_di(void);\r
-void m68k_op_move_32_aw_ix(void);\r
-void m68k_op_move_32_aw_aw(void);\r
-void m68k_op_move_32_aw_al(void);\r
-void m68k_op_move_32_aw_pcdi(void);\r
-void m68k_op_move_32_aw_pcix(void);\r
-void m68k_op_move_32_aw_i(void);\r
-void m68k_op_move_32_al_d(void);\r
-void m68k_op_move_32_al_a(void);\r
-void m68k_op_move_32_al_ai(void);\r
-void m68k_op_move_32_al_pi(void);\r
-void m68k_op_move_32_al_pd(void);\r
-void m68k_op_move_32_al_di(void);\r
-void m68k_op_move_32_al_ix(void);\r
-void m68k_op_move_32_al_aw(void);\r
-void m68k_op_move_32_al_al(void);\r
-void m68k_op_move_32_al_pcdi(void);\r
-void m68k_op_move_32_al_pcix(void);\r
-void m68k_op_move_32_al_i(void);\r
-void m68k_op_movea_16_d(void);\r
-void m68k_op_movea_16_a(void);\r
-void m68k_op_movea_16_ai(void);\r
-void m68k_op_movea_16_pi(void);\r
-void m68k_op_movea_16_pd(void);\r
-void m68k_op_movea_16_di(void);\r
-void m68k_op_movea_16_ix(void);\r
-void m68k_op_movea_16_aw(void);\r
-void m68k_op_movea_16_al(void);\r
-void m68k_op_movea_16_pcdi(void);\r
-void m68k_op_movea_16_pcix(void);\r
-void m68k_op_movea_16_i(void);\r
-void m68k_op_movea_32_d(void);\r
-void m68k_op_movea_32_a(void);\r
-void m68k_op_movea_32_ai(void);\r
-void m68k_op_movea_32_pi(void);\r
-void m68k_op_movea_32_pd(void);\r
-void m68k_op_movea_32_di(void);\r
-void m68k_op_movea_32_ix(void);\r
-void m68k_op_movea_32_aw(void);\r
-void m68k_op_movea_32_al(void);\r
-void m68k_op_movea_32_pcdi(void);\r
-void m68k_op_movea_32_pcix(void);\r
-void m68k_op_movea_32_i(void);\r
-void m68k_op_move_16_frc_d(void);\r
-void m68k_op_move_16_frc_ai(void);\r
-void m68k_op_move_16_frc_pi(void);\r
-void m68k_op_move_16_frc_pd(void);\r
-void m68k_op_move_16_frc_di(void);\r
-void m68k_op_move_16_frc_ix(void);\r
-void m68k_op_move_16_frc_aw(void);\r
-void m68k_op_move_16_frc_al(void);\r
-void m68k_op_move_16_toc_d(void);\r
-void m68k_op_move_16_toc_ai(void);\r
-void m68k_op_move_16_toc_pi(void);\r
-void m68k_op_move_16_toc_pd(void);\r
-void m68k_op_move_16_toc_di(void);\r
-void m68k_op_move_16_toc_ix(void);\r
-void m68k_op_move_16_toc_aw(void);\r
-void m68k_op_move_16_toc_al(void);\r
-void m68k_op_move_16_toc_pcdi(void);\r
-void m68k_op_move_16_toc_pcix(void);\r
-void m68k_op_move_16_toc_i(void);\r
-void m68k_op_move_16_frs_d(void);\r
-void m68k_op_move_16_frs_ai(void);\r
-void m68k_op_move_16_frs_pi(void);\r
-void m68k_op_move_16_frs_pd(void);\r
-void m68k_op_move_16_frs_di(void);\r
-void m68k_op_move_16_frs_ix(void);\r
-void m68k_op_move_16_frs_aw(void);\r
-void m68k_op_move_16_frs_al(void);\r
-void m68k_op_move_16_tos_d(void);\r
-void m68k_op_move_16_tos_ai(void);\r
-void m68k_op_move_16_tos_pi(void);\r
-void m68k_op_move_16_tos_pd(void);\r
-void m68k_op_move_16_tos_di(void);\r
-void m68k_op_move_16_tos_ix(void);\r
-void m68k_op_move_16_tos_aw(void);\r
-void m68k_op_move_16_tos_al(void);\r
-void m68k_op_move_16_tos_pcdi(void);\r
-void m68k_op_move_16_tos_pcix(void);\r
-void m68k_op_move_16_tos_i(void);\r
-void m68k_op_move_32_fru(void);\r
-void m68k_op_move_32_tou(void);\r
-void m68k_op_movec_32_cr(void);\r
-void m68k_op_movec_32_rc(void);\r
-void m68k_op_movem_16_re_pd(void);\r
-void m68k_op_movem_16_re_ai(void);\r
-void m68k_op_movem_16_re_di(void);\r
-void m68k_op_movem_16_re_ix(void);\r
-void m68k_op_movem_16_re_aw(void);\r
-void m68k_op_movem_16_re_al(void);\r
-void m68k_op_movem_32_re_pd(void);\r
-void m68k_op_movem_32_re_ai(void);\r
-void m68k_op_movem_32_re_di(void);\r
-void m68k_op_movem_32_re_ix(void);\r
-void m68k_op_movem_32_re_aw(void);\r
-void m68k_op_movem_32_re_al(void);\r
-void m68k_op_movem_16_er_pi(void);\r
-void m68k_op_movem_16_er_pcdi(void);\r
-void m68k_op_movem_16_er_pcix(void);\r
-void m68k_op_movem_16_er_ai(void);\r
-void m68k_op_movem_16_er_di(void);\r
-void m68k_op_movem_16_er_ix(void);\r
-void m68k_op_movem_16_er_aw(void);\r
-void m68k_op_movem_16_er_al(void);\r
-void m68k_op_movem_32_er_pi(void);\r
-void m68k_op_movem_32_er_pcdi(void);\r
-void m68k_op_movem_32_er_pcix(void);\r
-void m68k_op_movem_32_er_ai(void);\r
-void m68k_op_movem_32_er_di(void);\r
-void m68k_op_movem_32_er_ix(void);\r
-void m68k_op_movem_32_er_aw(void);\r
-void m68k_op_movem_32_er_al(void);\r
-void m68k_op_movep_16_re(void);\r
-void m68k_op_movep_32_re(void);\r
-void m68k_op_movep_16_er(void);\r
-void m68k_op_movep_32_er(void);\r
-void m68k_op_moves_8_ai(void);\r
-void m68k_op_moves_8_pi(void);\r
-void m68k_op_moves_8_pi7(void);\r
-void m68k_op_moves_8_pd(void);\r
-void m68k_op_moves_8_pd7(void);\r
-void m68k_op_moves_8_di(void);\r
-void m68k_op_moves_8_ix(void);\r
-void m68k_op_moves_8_aw(void);\r
-void m68k_op_moves_8_al(void);\r
-void m68k_op_moves_16_ai(void);\r
-void m68k_op_moves_16_pi(void);\r
-void m68k_op_moves_16_pd(void);\r
-void m68k_op_moves_16_di(void);\r
-void m68k_op_moves_16_ix(void);\r
-void m68k_op_moves_16_aw(void);\r
-void m68k_op_moves_16_al(void);\r
-void m68k_op_moves_32_ai(void);\r
-void m68k_op_moves_32_pi(void);\r
-void m68k_op_moves_32_pd(void);\r
-void m68k_op_moves_32_di(void);\r
-void m68k_op_moves_32_ix(void);\r
-void m68k_op_moves_32_aw(void);\r
-void m68k_op_moves_32_al(void);\r
-void m68k_op_moveq_32(void);\r
-void m68k_op_move16_32(void);\r
-void m68k_op_muls_16_d(void);\r
-void m68k_op_muls_16_ai(void);\r
-void m68k_op_muls_16_pi(void);\r
-void m68k_op_muls_16_pd(void);\r
-void m68k_op_muls_16_di(void);\r
-void m68k_op_muls_16_ix(void);\r
-void m68k_op_muls_16_aw(void);\r
-void m68k_op_muls_16_al(void);\r
-void m68k_op_muls_16_pcdi(void);\r
-void m68k_op_muls_16_pcix(void);\r
-void m68k_op_muls_16_i(void);\r
-void m68k_op_mulu_16_d(void);\r
-void m68k_op_mulu_16_ai(void);\r
-void m68k_op_mulu_16_pi(void);\r
-void m68k_op_mulu_16_pd(void);\r
-void m68k_op_mulu_16_di(void);\r
-void m68k_op_mulu_16_ix(void);\r
-void m68k_op_mulu_16_aw(void);\r
-void m68k_op_mulu_16_al(void);\r
-void m68k_op_mulu_16_pcdi(void);\r
-void m68k_op_mulu_16_pcix(void);\r
-void m68k_op_mulu_16_i(void);\r
-void m68k_op_mull_32_d(void);\r
-void m68k_op_mull_32_ai(void);\r
-void m68k_op_mull_32_pi(void);\r
-void m68k_op_mull_32_pd(void);\r
-void m68k_op_mull_32_di(void);\r
-void m68k_op_mull_32_ix(void);\r
-void m68k_op_mull_32_aw(void);\r
-void m68k_op_mull_32_al(void);\r
-void m68k_op_mull_32_pcdi(void);\r
-void m68k_op_mull_32_pcix(void);\r
-void m68k_op_mull_32_i(void);\r
-void m68k_op_nbcd_8_d(void);\r
-void m68k_op_nbcd_8_ai(void);\r
-void m68k_op_nbcd_8_pi(void);\r
-void m68k_op_nbcd_8_pi7(void);\r
-void m68k_op_nbcd_8_pd(void);\r
-void m68k_op_nbcd_8_pd7(void);\r
-void m68k_op_nbcd_8_di(void);\r
-void m68k_op_nbcd_8_ix(void);\r
-void m68k_op_nbcd_8_aw(void);\r
-void m68k_op_nbcd_8_al(void);\r
-void m68k_op_neg_8_d(void);\r
-void m68k_op_neg_8_ai(void);\r
-void m68k_op_neg_8_pi(void);\r
-void m68k_op_neg_8_pi7(void);\r
-void m68k_op_neg_8_pd(void);\r
-void m68k_op_neg_8_pd7(void);\r
-void m68k_op_neg_8_di(void);\r
-void m68k_op_neg_8_ix(void);\r
-void m68k_op_neg_8_aw(void);\r
-void m68k_op_neg_8_al(void);\r
-void m68k_op_neg_16_d(void);\r
-void m68k_op_neg_16_ai(void);\r
-void m68k_op_neg_16_pi(void);\r
-void m68k_op_neg_16_pd(void);\r
-void m68k_op_neg_16_di(void);\r
-void m68k_op_neg_16_ix(void);\r
-void m68k_op_neg_16_aw(void);\r
-void m68k_op_neg_16_al(void);\r
-void m68k_op_neg_32_d(void);\r
-void m68k_op_neg_32_ai(void);\r
-void m68k_op_neg_32_pi(void);\r
-void m68k_op_neg_32_pd(void);\r
-void m68k_op_neg_32_di(void);\r
-void m68k_op_neg_32_ix(void);\r
-void m68k_op_neg_32_aw(void);\r
-void m68k_op_neg_32_al(void);\r
-void m68k_op_negx_8_d(void);\r
-void m68k_op_negx_8_ai(void);\r
-void m68k_op_negx_8_pi(void);\r
-void m68k_op_negx_8_pi7(void);\r
-void m68k_op_negx_8_pd(void);\r
-void m68k_op_negx_8_pd7(void);\r
-void m68k_op_negx_8_di(void);\r
-void m68k_op_negx_8_ix(void);\r
-void m68k_op_negx_8_aw(void);\r
-void m68k_op_negx_8_al(void);\r
-void m68k_op_negx_16_d(void);\r
-void m68k_op_negx_16_ai(void);\r
-void m68k_op_negx_16_pi(void);\r
-void m68k_op_negx_16_pd(void);\r
-void m68k_op_negx_16_di(void);\r
-void m68k_op_negx_16_ix(void);\r
-void m68k_op_negx_16_aw(void);\r
-void m68k_op_negx_16_al(void);\r
-void m68k_op_negx_32_d(void);\r
-void m68k_op_negx_32_ai(void);\r
-void m68k_op_negx_32_pi(void);\r
-void m68k_op_negx_32_pd(void);\r
-void m68k_op_negx_32_di(void);\r
-void m68k_op_negx_32_ix(void);\r
-void m68k_op_negx_32_aw(void);\r
-void m68k_op_negx_32_al(void);\r
-void m68k_op_nop(void);\r
-void m68k_op_not_8_d(void);\r
-void m68k_op_not_8_ai(void);\r
-void m68k_op_not_8_pi(void);\r
-void m68k_op_not_8_pi7(void);\r
-void m68k_op_not_8_pd(void);\r
-void m68k_op_not_8_pd7(void);\r
-void m68k_op_not_8_di(void);\r
-void m68k_op_not_8_ix(void);\r
-void m68k_op_not_8_aw(void);\r
-void m68k_op_not_8_al(void);\r
-void m68k_op_not_16_d(void);\r
-void m68k_op_not_16_ai(void);\r
-void m68k_op_not_16_pi(void);\r
-void m68k_op_not_16_pd(void);\r
-void m68k_op_not_16_di(void);\r
-void m68k_op_not_16_ix(void);\r
-void m68k_op_not_16_aw(void);\r
-void m68k_op_not_16_al(void);\r
-void m68k_op_not_32_d(void);\r
-void m68k_op_not_32_ai(void);\r
-void m68k_op_not_32_pi(void);\r
-void m68k_op_not_32_pd(void);\r
-void m68k_op_not_32_di(void);\r
-void m68k_op_not_32_ix(void);\r
-void m68k_op_not_32_aw(void);\r
-void m68k_op_not_32_al(void);\r
-void m68k_op_or_8_er_d(void);\r
-void m68k_op_or_8_er_ai(void);\r
-void m68k_op_or_8_er_pi(void);\r
-void m68k_op_or_8_er_pi7(void);\r
-void m68k_op_or_8_er_pd(void);\r
-void m68k_op_or_8_er_pd7(void);\r
-void m68k_op_or_8_er_di(void);\r
-void m68k_op_or_8_er_ix(void);\r
-void m68k_op_or_8_er_aw(void);\r
-void m68k_op_or_8_er_al(void);\r
-void m68k_op_or_8_er_pcdi(void);\r
-void m68k_op_or_8_er_pcix(void);\r
-void m68k_op_or_8_er_i(void);\r
-void m68k_op_or_16_er_d(void);\r
-void m68k_op_or_16_er_ai(void);\r
-void m68k_op_or_16_er_pi(void);\r
-void m68k_op_or_16_er_pd(void);\r
-void m68k_op_or_16_er_di(void);\r
-void m68k_op_or_16_er_ix(void);\r
-void m68k_op_or_16_er_aw(void);\r
-void m68k_op_or_16_er_al(void);\r
-void m68k_op_or_16_er_pcdi(void);\r
-void m68k_op_or_16_er_pcix(void);\r
-void m68k_op_or_16_er_i(void);\r
-void m68k_op_or_32_er_d(void);\r
-void m68k_op_or_32_er_ai(void);\r
-void m68k_op_or_32_er_pi(void);\r
-void m68k_op_or_32_er_pd(void);\r
-void m68k_op_or_32_er_di(void);\r
-void m68k_op_or_32_er_ix(void);\r
-void m68k_op_or_32_er_aw(void);\r
-void m68k_op_or_32_er_al(void);\r
-void m68k_op_or_32_er_pcdi(void);\r
-void m68k_op_or_32_er_pcix(void);\r
-void m68k_op_or_32_er_i(void);\r
-void m68k_op_or_8_re_ai(void);\r
-void m68k_op_or_8_re_pi(void);\r
-void m68k_op_or_8_re_pi7(void);\r
-void m68k_op_or_8_re_pd(void);\r
-void m68k_op_or_8_re_pd7(void);\r
-void m68k_op_or_8_re_di(void);\r
-void m68k_op_or_8_re_ix(void);\r
-void m68k_op_or_8_re_aw(void);\r
-void m68k_op_or_8_re_al(void);\r
-void m68k_op_or_16_re_ai(void);\r
-void m68k_op_or_16_re_pi(void);\r
-void m68k_op_or_16_re_pd(void);\r
-void m68k_op_or_16_re_di(void);\r
-void m68k_op_or_16_re_ix(void);\r
-void m68k_op_or_16_re_aw(void);\r
-void m68k_op_or_16_re_al(void);\r
-void m68k_op_or_32_re_ai(void);\r
-void m68k_op_or_32_re_pi(void);\r
-void m68k_op_or_32_re_pd(void);\r
-void m68k_op_or_32_re_di(void);\r
-void m68k_op_or_32_re_ix(void);\r
-void m68k_op_or_32_re_aw(void);\r
-void m68k_op_or_32_re_al(void);\r
-void m68k_op_ori_8_d(void);\r
-void m68k_op_ori_8_ai(void);\r
-void m68k_op_ori_8_pi(void);\r
-void m68k_op_ori_8_pi7(void);\r
-void m68k_op_ori_8_pd(void);\r
-void m68k_op_ori_8_pd7(void);\r
-void m68k_op_ori_8_di(void);\r
-void m68k_op_ori_8_ix(void);\r
-void m68k_op_ori_8_aw(void);\r
-void m68k_op_ori_8_al(void);\r
-void m68k_op_ori_16_d(void);\r
-void m68k_op_ori_16_ai(void);\r
-void m68k_op_ori_16_pi(void);\r
-void m68k_op_ori_16_pd(void);\r
-void m68k_op_ori_16_di(void);\r
-void m68k_op_ori_16_ix(void);\r
-void m68k_op_ori_16_aw(void);\r
-void m68k_op_ori_16_al(void);\r
-void m68k_op_ori_32_d(void);\r
-void m68k_op_ori_32_ai(void);\r
-void m68k_op_ori_32_pi(void);\r
-void m68k_op_ori_32_pd(void);\r
-void m68k_op_ori_32_di(void);\r
-void m68k_op_ori_32_ix(void);\r
-void m68k_op_ori_32_aw(void);\r
-void m68k_op_ori_32_al(void);\r
-void m68k_op_ori_16_toc(void);\r
-void m68k_op_ori_16_tos(void);\r
-void m68k_op_pack_16_rr(void);\r
-void m68k_op_pack_16_mm_ax7(void);\r
-void m68k_op_pack_16_mm_ay7(void);\r
-void m68k_op_pack_16_mm_axy7(void);\r
-void m68k_op_pack_16_mm(void);\r
-void m68k_op_pea_32_ai(void);\r
-void m68k_op_pea_32_di(void);\r
-void m68k_op_pea_32_ix(void);\r
-void m68k_op_pea_32_aw(void);\r
-void m68k_op_pea_32_al(void);\r
-void m68k_op_pea_32_pcdi(void);\r
-void m68k_op_pea_32_pcix(void);\r
-void m68k_op_pflush_32(void);\r
-void m68k_op_reset(void);\r
-void m68k_op_ror_8_s(void);\r
-void m68k_op_ror_16_s(void);\r
-void m68k_op_ror_32_s(void);\r
-void m68k_op_ror_8_r(void);\r
-void m68k_op_ror_16_r(void);\r
-void m68k_op_ror_32_r(void);\r
-void m68k_op_ror_16_ai(void);\r
-void m68k_op_ror_16_pi(void);\r
-void m68k_op_ror_16_pd(void);\r
-void m68k_op_ror_16_di(void);\r
-void m68k_op_ror_16_ix(void);\r
-void m68k_op_ror_16_aw(void);\r
-void m68k_op_ror_16_al(void);\r
-void m68k_op_rol_8_s(void);\r
-void m68k_op_rol_16_s(void);\r
-void m68k_op_rol_32_s(void);\r
-void m68k_op_rol_8_r(void);\r
-void m68k_op_rol_16_r(void);\r
-void m68k_op_rol_32_r(void);\r
-void m68k_op_rol_16_ai(void);\r
-void m68k_op_rol_16_pi(void);\r
-void m68k_op_rol_16_pd(void);\r
-void m68k_op_rol_16_di(void);\r
-void m68k_op_rol_16_ix(void);\r
-void m68k_op_rol_16_aw(void);\r
-void m68k_op_rol_16_al(void);\r
-void m68k_op_roxr_8_s(void);\r
-void m68k_op_roxr_16_s(void);\r
-void m68k_op_roxr_32_s(void);\r
-void m68k_op_roxr_8_r(void);\r
-void m68k_op_roxr_16_r(void);\r
-void m68k_op_roxr_32_r(void);\r
-void m68k_op_roxr_16_ai(void);\r
-void m68k_op_roxr_16_pi(void);\r
-void m68k_op_roxr_16_pd(void);\r
-void m68k_op_roxr_16_di(void);\r
-void m68k_op_roxr_16_ix(void);\r
-void m68k_op_roxr_16_aw(void);\r
-void m68k_op_roxr_16_al(void);\r
-void m68k_op_roxl_8_s(void);\r
-void m68k_op_roxl_16_s(void);\r
-void m68k_op_roxl_32_s(void);\r
-void m68k_op_roxl_8_r(void);\r
-void m68k_op_roxl_16_r(void);\r
-void m68k_op_roxl_32_r(void);\r
-void m68k_op_roxl_16_ai(void);\r
-void m68k_op_roxl_16_pi(void);\r
-void m68k_op_roxl_16_pd(void);\r
-void m68k_op_roxl_16_di(void);\r
-void m68k_op_roxl_16_ix(void);\r
-void m68k_op_roxl_16_aw(void);\r
-void m68k_op_roxl_16_al(void);\r
-void m68k_op_rtd_32(void);\r
-void m68k_op_rte_32(void);\r
-void m68k_op_rtm_32(void);\r
-void m68k_op_rtr_32(void);\r
-void m68k_op_rts_32(void);\r
-void m68k_op_sbcd_8_rr(void);\r
-void m68k_op_sbcd_8_mm_ax7(void);\r
-void m68k_op_sbcd_8_mm_ay7(void);\r
-void m68k_op_sbcd_8_mm_axy7(void);\r
-void m68k_op_sbcd_8_mm(void);\r
-void m68k_op_st_8_d(void);\r
-void m68k_op_st_8_ai(void);\r
-void m68k_op_st_8_pi(void);\r
-void m68k_op_st_8_pi7(void);\r
-void m68k_op_st_8_pd(void);\r
-void m68k_op_st_8_pd7(void);\r
-void m68k_op_st_8_di(void);\r
-void m68k_op_st_8_ix(void);\r
-void m68k_op_st_8_aw(void);\r
-void m68k_op_st_8_al(void);\r
-void m68k_op_sf_8_d(void);\r
-void m68k_op_sf_8_ai(void);\r
-void m68k_op_sf_8_pi(void);\r
-void m68k_op_sf_8_pi7(void);\r
-void m68k_op_sf_8_pd(void);\r
-void m68k_op_sf_8_pd7(void);\r
-void m68k_op_sf_8_di(void);\r
-void m68k_op_sf_8_ix(void);\r
-void m68k_op_sf_8_aw(void);\r
-void m68k_op_sf_8_al(void);\r
-void m68k_op_shi_8_d(void);\r
-void m68k_op_sls_8_d(void);\r
-void m68k_op_scc_8_d(void);\r
-void m68k_op_scs_8_d(void);\r
-void m68k_op_sne_8_d(void);\r
-void m68k_op_seq_8_d(void);\r
-void m68k_op_svc_8_d(void);\r
-void m68k_op_svs_8_d(void);\r
-void m68k_op_spl_8_d(void);\r
-void m68k_op_smi_8_d(void);\r
-void m68k_op_sge_8_d(void);\r
-void m68k_op_slt_8_d(void);\r
-void m68k_op_sgt_8_d(void);\r
-void m68k_op_sle_8_d(void);\r
-void m68k_op_shi_8_ai(void);\r
-void m68k_op_shi_8_pi(void);\r
-void m68k_op_shi_8_pi7(void);\r
-void m68k_op_shi_8_pd(void);\r
-void m68k_op_shi_8_pd7(void);\r
-void m68k_op_shi_8_di(void);\r
-void m68k_op_shi_8_ix(void);\r
-void m68k_op_shi_8_aw(void);\r
-void m68k_op_shi_8_al(void);\r
-void m68k_op_sls_8_ai(void);\r
-void m68k_op_sls_8_pi(void);\r
-void m68k_op_sls_8_pi7(void);\r
-void m68k_op_sls_8_pd(void);\r
-void m68k_op_sls_8_pd7(void);\r
-void m68k_op_sls_8_di(void);\r
-void m68k_op_sls_8_ix(void);\r
-void m68k_op_sls_8_aw(void);\r
-void m68k_op_sls_8_al(void);\r
-void m68k_op_scc_8_ai(void);\r
-void m68k_op_scc_8_pi(void);\r
-void m68k_op_scc_8_pi7(void);\r
-void m68k_op_scc_8_pd(void);\r
-void m68k_op_scc_8_pd7(void);\r
-void m68k_op_scc_8_di(void);\r
-void m68k_op_scc_8_ix(void);\r
-void m68k_op_scc_8_aw(void);\r
-void m68k_op_scc_8_al(void);\r
-void m68k_op_scs_8_ai(void);\r
-void m68k_op_scs_8_pi(void);\r
-void m68k_op_scs_8_pi7(void);\r
-void m68k_op_scs_8_pd(void);\r
-void m68k_op_scs_8_pd7(void);\r
-void m68k_op_scs_8_di(void);\r
-void m68k_op_scs_8_ix(void);\r
-void m68k_op_scs_8_aw(void);\r
-void m68k_op_scs_8_al(void);\r
-void m68k_op_sne_8_ai(void);\r
-void m68k_op_sne_8_pi(void);\r
-void m68k_op_sne_8_pi7(void);\r
-void m68k_op_sne_8_pd(void);\r
-void m68k_op_sne_8_pd7(void);\r
-void m68k_op_sne_8_di(void);\r
-void m68k_op_sne_8_ix(void);\r
-void m68k_op_sne_8_aw(void);\r
-void m68k_op_sne_8_al(void);\r
-void m68k_op_seq_8_ai(void);\r
-void m68k_op_seq_8_pi(void);\r
-void m68k_op_seq_8_pi7(void);\r
-void m68k_op_seq_8_pd(void);\r
-void m68k_op_seq_8_pd7(void);\r
-void m68k_op_seq_8_di(void);\r
-void m68k_op_seq_8_ix(void);\r
-void m68k_op_seq_8_aw(void);\r
-void m68k_op_seq_8_al(void);\r
-void m68k_op_svc_8_ai(void);\r
-void m68k_op_svc_8_pi(void);\r
-void m68k_op_svc_8_pi7(void);\r
-void m68k_op_svc_8_pd(void);\r
-void m68k_op_svc_8_pd7(void);\r
-void m68k_op_svc_8_di(void);\r
-void m68k_op_svc_8_ix(void);\r
-void m68k_op_svc_8_aw(void);\r
-void m68k_op_svc_8_al(void);\r
-void m68k_op_svs_8_ai(void);\r
-void m68k_op_svs_8_pi(void);\r
-void m68k_op_svs_8_pi7(void);\r
-void m68k_op_svs_8_pd(void);\r
-void m68k_op_svs_8_pd7(void);\r
-void m68k_op_svs_8_di(void);\r
-void m68k_op_svs_8_ix(void);\r
-void m68k_op_svs_8_aw(void);\r
-void m68k_op_svs_8_al(void);\r
-void m68k_op_spl_8_ai(void);\r
-void m68k_op_spl_8_pi(void);\r
-void m68k_op_spl_8_pi7(void);\r
-void m68k_op_spl_8_pd(void);\r
-void m68k_op_spl_8_pd7(void);\r
-void m68k_op_spl_8_di(void);\r
-void m68k_op_spl_8_ix(void);\r
-void m68k_op_spl_8_aw(void);\r
-void m68k_op_spl_8_al(void);\r
-void m68k_op_smi_8_ai(void);\r
-void m68k_op_smi_8_pi(void);\r
-void m68k_op_smi_8_pi7(void);\r
-void m68k_op_smi_8_pd(void);\r
-void m68k_op_smi_8_pd7(void);\r
-void m68k_op_smi_8_di(void);\r
-void m68k_op_smi_8_ix(void);\r
-void m68k_op_smi_8_aw(void);\r
-void m68k_op_smi_8_al(void);\r
-void m68k_op_sge_8_ai(void);\r
-void m68k_op_sge_8_pi(void);\r
-void m68k_op_sge_8_pi7(void);\r
-void m68k_op_sge_8_pd(void);\r
-void m68k_op_sge_8_pd7(void);\r
-void m68k_op_sge_8_di(void);\r
-void m68k_op_sge_8_ix(void);\r
-void m68k_op_sge_8_aw(void);\r
-void m68k_op_sge_8_al(void);\r
-void m68k_op_slt_8_ai(void);\r
-void m68k_op_slt_8_pi(void);\r
-void m68k_op_slt_8_pi7(void);\r
-void m68k_op_slt_8_pd(void);\r
-void m68k_op_slt_8_pd7(void);\r
-void m68k_op_slt_8_di(void);\r
-void m68k_op_slt_8_ix(void);\r
-void m68k_op_slt_8_aw(void);\r
-void m68k_op_slt_8_al(void);\r
-void m68k_op_sgt_8_ai(void);\r
-void m68k_op_sgt_8_pi(void);\r
-void m68k_op_sgt_8_pi7(void);\r
-void m68k_op_sgt_8_pd(void);\r
-void m68k_op_sgt_8_pd7(void);\r
-void m68k_op_sgt_8_di(void);\r
-void m68k_op_sgt_8_ix(void);\r
-void m68k_op_sgt_8_aw(void);\r
-void m68k_op_sgt_8_al(void);\r
-void m68k_op_sle_8_ai(void);\r
-void m68k_op_sle_8_pi(void);\r
-void m68k_op_sle_8_pi7(void);\r
-void m68k_op_sle_8_pd(void);\r
-void m68k_op_sle_8_pd7(void);\r
-void m68k_op_sle_8_di(void);\r
-void m68k_op_sle_8_ix(void);\r
-void m68k_op_sle_8_aw(void);\r
-void m68k_op_sle_8_al(void);\r
-void m68k_op_stop(void);\r
-void m68k_op_sub_8_er_d(void);\r
-void m68k_op_sub_8_er_ai(void);\r
-void m68k_op_sub_8_er_pi(void);\r
-void m68k_op_sub_8_er_pi7(void);\r
-void m68k_op_sub_8_er_pd(void);\r
-void m68k_op_sub_8_er_pd7(void);\r
-void m68k_op_sub_8_er_di(void);\r
-void m68k_op_sub_8_er_ix(void);\r
-void m68k_op_sub_8_er_aw(void);\r
-void m68k_op_sub_8_er_al(void);\r
-void m68k_op_sub_8_er_pcdi(void);\r
-void m68k_op_sub_8_er_pcix(void);\r
-void m68k_op_sub_8_er_i(void);\r
-void m68k_op_sub_16_er_d(void);\r
-void m68k_op_sub_16_er_a(void);\r
-void m68k_op_sub_16_er_ai(void);\r
-void m68k_op_sub_16_er_pi(void);\r
-void m68k_op_sub_16_er_pd(void);\r
-void m68k_op_sub_16_er_di(void);\r
-void m68k_op_sub_16_er_ix(void);\r
-void m68k_op_sub_16_er_aw(void);\r
-void m68k_op_sub_16_er_al(void);\r
-void m68k_op_sub_16_er_pcdi(void);\r
-void m68k_op_sub_16_er_pcix(void);\r
-void m68k_op_sub_16_er_i(void);\r
-void m68k_op_sub_32_er_d(void);\r
-void m68k_op_sub_32_er_a(void);\r
-void m68k_op_sub_32_er_ai(void);\r
-void m68k_op_sub_32_er_pi(void);\r
-void m68k_op_sub_32_er_pd(void);\r
-void m68k_op_sub_32_er_di(void);\r
-void m68k_op_sub_32_er_ix(void);\r
-void m68k_op_sub_32_er_aw(void);\r
-void m68k_op_sub_32_er_al(void);\r
-void m68k_op_sub_32_er_pcdi(void);\r
-void m68k_op_sub_32_er_pcix(void);\r
-void m68k_op_sub_32_er_i(void);\r
-void m68k_op_sub_8_re_ai(void);\r
-void m68k_op_sub_8_re_pi(void);\r
-void m68k_op_sub_8_re_pi7(void);\r
-void m68k_op_sub_8_re_pd(void);\r
-void m68k_op_sub_8_re_pd7(void);\r
-void m68k_op_sub_8_re_di(void);\r
-void m68k_op_sub_8_re_ix(void);\r
-void m68k_op_sub_8_re_aw(void);\r
-void m68k_op_sub_8_re_al(void);\r
-void m68k_op_sub_16_re_ai(void);\r
-void m68k_op_sub_16_re_pi(void);\r
-void m68k_op_sub_16_re_pd(void);\r
-void m68k_op_sub_16_re_di(void);\r
-void m68k_op_sub_16_re_ix(void);\r
-void m68k_op_sub_16_re_aw(void);\r
-void m68k_op_sub_16_re_al(void);\r
-void m68k_op_sub_32_re_ai(void);\r
-void m68k_op_sub_32_re_pi(void);\r
-void m68k_op_sub_32_re_pd(void);\r
-void m68k_op_sub_32_re_di(void);\r
-void m68k_op_sub_32_re_ix(void);\r
-void m68k_op_sub_32_re_aw(void);\r
-void m68k_op_sub_32_re_al(void);\r
-void m68k_op_suba_16_d(void);\r
-void m68k_op_suba_16_a(void);\r
-void m68k_op_suba_16_ai(void);\r
-void m68k_op_suba_16_pi(void);\r
-void m68k_op_suba_16_pd(void);\r
-void m68k_op_suba_16_di(void);\r
-void m68k_op_suba_16_ix(void);\r
-void m68k_op_suba_16_aw(void);\r
-void m68k_op_suba_16_al(void);\r
-void m68k_op_suba_16_pcdi(void);\r
-void m68k_op_suba_16_pcix(void);\r
-void m68k_op_suba_16_i(void);\r
-void m68k_op_suba_32_d(void);\r
-void m68k_op_suba_32_a(void);\r
-void m68k_op_suba_32_ai(void);\r
-void m68k_op_suba_32_pi(void);\r
-void m68k_op_suba_32_pd(void);\r
-void m68k_op_suba_32_di(void);\r
-void m68k_op_suba_32_ix(void);\r
-void m68k_op_suba_32_aw(void);\r
-void m68k_op_suba_32_al(void);\r
-void m68k_op_suba_32_pcdi(void);\r
-void m68k_op_suba_32_pcix(void);\r
-void m68k_op_suba_32_i(void);\r
-void m68k_op_subi_8_d(void);\r
-void m68k_op_subi_8_ai(void);\r
-void m68k_op_subi_8_pi(void);\r
-void m68k_op_subi_8_pi7(void);\r
-void m68k_op_subi_8_pd(void);\r
-void m68k_op_subi_8_pd7(void);\r
-void m68k_op_subi_8_di(void);\r
-void m68k_op_subi_8_ix(void);\r
-void m68k_op_subi_8_aw(void);\r
-void m68k_op_subi_8_al(void);\r
-void m68k_op_subi_16_d(void);\r
-void m68k_op_subi_16_ai(void);\r
-void m68k_op_subi_16_pi(void);\r
-void m68k_op_subi_16_pd(void);\r
-void m68k_op_subi_16_di(void);\r
-void m68k_op_subi_16_ix(void);\r
-void m68k_op_subi_16_aw(void);\r
-void m68k_op_subi_16_al(void);\r
-void m68k_op_subi_32_d(void);\r
-void m68k_op_subi_32_ai(void);\r
-void m68k_op_subi_32_pi(void);\r
-void m68k_op_subi_32_pd(void);\r
-void m68k_op_subi_32_di(void);\r
-void m68k_op_subi_32_ix(void);\r
-void m68k_op_subi_32_aw(void);\r
-void m68k_op_subi_32_al(void);\r
-void m68k_op_subq_8_d(void);\r
-void m68k_op_subq_8_ai(void);\r
-void m68k_op_subq_8_pi(void);\r
-void m68k_op_subq_8_pi7(void);\r
-void m68k_op_subq_8_pd(void);\r
-void m68k_op_subq_8_pd7(void);\r
-void m68k_op_subq_8_di(void);\r
-void m68k_op_subq_8_ix(void);\r
-void m68k_op_subq_8_aw(void);\r
-void m68k_op_subq_8_al(void);\r
-void m68k_op_subq_16_d(void);\r
-void m68k_op_subq_16_a(void);\r
-void m68k_op_subq_16_ai(void);\r
-void m68k_op_subq_16_pi(void);\r
-void m68k_op_subq_16_pd(void);\r
-void m68k_op_subq_16_di(void);\r
-void m68k_op_subq_16_ix(void);\r
-void m68k_op_subq_16_aw(void);\r
-void m68k_op_subq_16_al(void);\r
-void m68k_op_subq_32_d(void);\r
-void m68k_op_subq_32_a(void);\r
-void m68k_op_subq_32_ai(void);\r
-void m68k_op_subq_32_pi(void);\r
-void m68k_op_subq_32_pd(void);\r
-void m68k_op_subq_32_di(void);\r
-void m68k_op_subq_32_ix(void);\r
-void m68k_op_subq_32_aw(void);\r
-void m68k_op_subq_32_al(void);\r
-void m68k_op_subx_8_rr(void);\r
-void m68k_op_subx_16_rr(void);\r
-void m68k_op_subx_32_rr(void);\r
-void m68k_op_subx_8_mm_ax7(void);\r
-void m68k_op_subx_8_mm_ay7(void);\r
-void m68k_op_subx_8_mm_axy7(void);\r
-void m68k_op_subx_8_mm(void);\r
-void m68k_op_subx_16_mm(void);\r
-void m68k_op_subx_32_mm(void);\r
-void m68k_op_swap_32(void);\r
-void m68k_op_tas_8_d(void);\r
-void m68k_op_tas_8_ai(void);\r
-void m68k_op_tas_8_pi(void);\r
-void m68k_op_tas_8_pi7(void);\r
-void m68k_op_tas_8_pd(void);\r
-void m68k_op_tas_8_pd7(void);\r
-void m68k_op_tas_8_di(void);\r
-void m68k_op_tas_8_ix(void);\r
-void m68k_op_tas_8_aw(void);\r
-void m68k_op_tas_8_al(void);\r
-void m68k_op_trap(void);\r
-void m68k_op_trapt(void);\r
-void m68k_op_trapt_16(void);\r
-void m68k_op_trapt_32(void);\r
-void m68k_op_trapf(void);\r
-void m68k_op_trapf_16(void);\r
-void m68k_op_trapf_32(void);\r
-void m68k_op_traphi(void);\r
-void m68k_op_trapls(void);\r
-void m68k_op_trapcc(void);\r
-void m68k_op_trapcs(void);\r
-void m68k_op_trapne(void);\r
-void m68k_op_trapeq(void);\r
-void m68k_op_trapvc(void);\r
-void m68k_op_trapvs(void);\r
-void m68k_op_trappl(void);\r
-void m68k_op_trapmi(void);\r
-void m68k_op_trapge(void);\r
-void m68k_op_traplt(void);\r
-void m68k_op_trapgt(void);\r
-void m68k_op_traple(void);\r
-void m68k_op_traphi_16(void);\r
-void m68k_op_trapls_16(void);\r
-void m68k_op_trapcc_16(void);\r
-void m68k_op_trapcs_16(void);\r
-void m68k_op_trapne_16(void);\r
-void m68k_op_trapeq_16(void);\r
-void m68k_op_trapvc_16(void);\r
-void m68k_op_trapvs_16(void);\r
-void m68k_op_trappl_16(void);\r
-void m68k_op_trapmi_16(void);\r
-void m68k_op_trapge_16(void);\r
-void m68k_op_traplt_16(void);\r
-void m68k_op_trapgt_16(void);\r
-void m68k_op_traple_16(void);\r
-void m68k_op_traphi_32(void);\r
-void m68k_op_trapls_32(void);\r
-void m68k_op_trapcc_32(void);\r
-void m68k_op_trapcs_32(void);\r
-void m68k_op_trapne_32(void);\r
-void m68k_op_trapeq_32(void);\r
-void m68k_op_trapvc_32(void);\r
-void m68k_op_trapvs_32(void);\r
-void m68k_op_trappl_32(void);\r
-void m68k_op_trapmi_32(void);\r
-void m68k_op_trapge_32(void);\r
-void m68k_op_traplt_32(void);\r
-void m68k_op_trapgt_32(void);\r
-void m68k_op_traple_32(void);\r
-void m68k_op_trapv(void);\r
-void m68k_op_tst_8_d(void);\r
-void m68k_op_tst_8_ai(void);\r
-void m68k_op_tst_8_pi(void);\r
-void m68k_op_tst_8_pi7(void);\r
-void m68k_op_tst_8_pd(void);\r
-void m68k_op_tst_8_pd7(void);\r
-void m68k_op_tst_8_di(void);\r
-void m68k_op_tst_8_ix(void);\r
-void m68k_op_tst_8_aw(void);\r
-void m68k_op_tst_8_al(void);\r
-void m68k_op_tst_8_pcdi(void);\r
-void m68k_op_tst_8_pcix(void);\r
-void m68k_op_tst_8_i(void);\r
-void m68k_op_tst_16_d(void);\r
-void m68k_op_tst_16_a(void);\r
-void m68k_op_tst_16_ai(void);\r
-void m68k_op_tst_16_pi(void);\r
-void m68k_op_tst_16_pd(void);\r
-void m68k_op_tst_16_di(void);\r
-void m68k_op_tst_16_ix(void);\r
-void m68k_op_tst_16_aw(void);\r
-void m68k_op_tst_16_al(void);\r
-void m68k_op_tst_16_pcdi(void);\r
-void m68k_op_tst_16_pcix(void);\r
-void m68k_op_tst_16_i(void);\r
-void m68k_op_tst_32_d(void);\r
-void m68k_op_tst_32_a(void);\r
-void m68k_op_tst_32_ai(void);\r
-void m68k_op_tst_32_pi(void);\r
-void m68k_op_tst_32_pd(void);\r
-void m68k_op_tst_32_di(void);\r
-void m68k_op_tst_32_ix(void);\r
-void m68k_op_tst_32_aw(void);\r
-void m68k_op_tst_32_al(void);\r
-void m68k_op_tst_32_pcdi(void);\r
-void m68k_op_tst_32_pcix(void);\r
-void m68k_op_tst_32_i(void);\r
-void m68k_op_unlk_32_a7(void);\r
-void m68k_op_unlk_32(void);\r
-void m68k_op_unpk_16_rr(void);\r
-void m68k_op_unpk_16_mm_ax7(void);\r
-void m68k_op_unpk_16_mm_ay7(void);\r
-void m68k_op_unpk_16_mm_axy7(void);\r
-void m68k_op_unpk_16_mm(void);\r
-/* Build the opcode handler table */\r
-void m68ki_build_opcode_table(void);\r
-\r
-extern void (*m68ki_instruction_jump_table[0x10000])(void); /* opcode handler jump table */\r
-extern unsigned char m68ki_cycles[][0x10000];\r
-\r
-\r
-/* ======================================================================== */\r
-/* ============================== END OF FILE ============================= */\r
-/* ======================================================================== */\r
-\r
-#endif /* M68KOPS__HEADER */\r
-\r
-\r